2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Add errorfile global that contains the name of the file that caused the

error.
This commit is contained in:
Todd C. Miller
2004-09-29 18:33:06 +00:00
parent f8f41d69a7
commit e9b23cdee1
2 changed files with 7 additions and 4 deletions

4
sudo.c
View File

@@ -127,6 +127,7 @@ int num_interfaces;
int tgetpass_flags;
uid_t timestamp_uid;
extern int errorlineno;
extern char *errorfile;
#if defined(RLIMIT_CORE) && !defined(SUDO_DEVEL)
static struct rlimit corelimit;
#endif /* RLIMIT_CORE && !SUDO_DEVEL */
@@ -313,8 +314,7 @@ main(argc, argv, envp)
}
if (ISSET(validated, VALIDATE_ERROR))
log_error(0, "parse error in %s near line %d", _PATH_SUDOERS,
errorlineno);
log_error(0, "parse error in %s near line %d", errorfile, errorlineno);
/* Is root even allowed to run sudo? */
if (user_uid == 0 && !def_root_sudo) {