* Globals
*/
static char logline[MAXLOGLEN + 8];
+extern int errorlineno;
/**********************************************************************
break;
case VALIDATE_ERROR:
- (void) sprintf(p, "error in %s ; PWD=%s ; command: ",
- _PATH_SUDO_SUDOERS, cwd);
+ (void) sprintf(p, "error in %s, line %d ; PWD=%s. ",
+ _PATH_SUDO_SUDOERS, errorlineno, cwd);
#if (LOGGING & SLOG_SYSLOG)
pri = Syslog_priority_NO;
#endif /* LOGGING & SLOG_SYSLOG */
/*
- * if this error is from load_globals() don't put argv in the message
+ * If this is a parse error or if the error is from load_globals()
+ * don't put argv in the message.
*/
- if (!(code & GLOBAL_PROBLEM)) {
+ if (code != VALIDATE_ERROR && !(code & GLOBAL_PROBLEM)) {
strcat(logline, cmnd); /* stuff the command into the logline */
strcat(logline, " ");
#ifdef POSIX_SIGNALS
struct sigaction action;
- (void) bzero((char *)(&action), sizeof(action));
+ (void) memset((VOID *)&action, 0, sizeof(action));
#endif /* POSIX_SIGNALS */
if ((mailer = find_path(MAILER)) == NULL) {