*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
} else {
/* check the time against the timestamp file */
now = time((time_t *) NULL);
- if (TIMEOUT && now - statbuf.st_mtime < 60 * TIMEOUT)
+ if (TIMEOUT && now - statbuf.st_mtime < 60 * TIMEOUT) {
/* check for bogus time on the stampfile */
if (statbuf.st_mtime > now + 60 * TIMEOUT * 2) {
timestamp_is_old = 2; /* bogus time value */
} else {
timestamp_is_old = 0; /* time value is reasonable */
}
- else
+ } else {
timestamp_is_old = 1; /* else make 'em enter password */
+ }
}
}
/*
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getcwd.c,v 1.5 1998/08/14 21:39:26 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: getcwd.c,v 1.5 1998/08/14 21:39:26 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
if (check_cmnd == FALSE)
while (top) {
- if (host_matches == TRUE)
+ if (host_matches == TRUE) {
/* user may always do validate or list on allowed hosts */
if (no_passwd == TRUE)
return(VALIDATE_OK_NOPASS);
else
return(VALIDATE_OK);
+ }
top--;
}
else
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#define MAIN
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id$";
#endif /* lint */
#include "config.h"
* If passesd -V then print version, else print usage
* if any other option...
*/
- if (argc == 2)
+ if (argc == 2) {
if (!strcmp(Argv[1], "-V")) {
(void) printf("visudo version %s\n", version);
exit(0);
} else {
usage();
}
- else if (argc != 1)
+ } else if (argc != 1) {
usage();
+ }
/* user_pw_ent needs to point to something... */
if ((user_pw_ent = getpwuid(getuid())) == NULL) {
* rename(2)'d to sudoers. If the rename(2) fails we try using
* mv(1) in case stmp and sudoers are on different filesystems.
*/
- if (rename(stmp, sudoers))
+ if (rename(stmp, sudoers)) {
if (errno == EXDEV) {
char *tmpbuf;
perror("");
Exit(-1);
}
+ }
return(0);
}