o timestamp_uid should be uid_t, not int

o clarify error message when sudo is run by root and no_root_sudo is set
This commit is contained in:
Todd C. Miller
2002-11-22 18:23:24 +00:00
parent 06cd79be8e
commit 4f2d87e28c

7
sudo.c
View File

@@ -131,7 +131,7 @@ FILE *sudoers_fp = NULL;
struct interface *interfaces; struct interface *interfaces;
int num_interfaces; int num_interfaces;
int tgetpass_flags; int tgetpass_flags;
int timestamp_uid; uid_t timestamp_uid;
extern int errorlineno; extern int errorlineno;
#if defined(RLIMIT_CORE) && !defined(SUDO_DEVEL) #if defined(RLIMIT_CORE) && !defined(SUDO_DEVEL)
static struct rlimit corelimit; static struct rlimit corelimit;
@@ -315,8 +315,9 @@ main(argc, argv, envp)
/* Is root even allowed to run sudo? */ /* Is root even allowed to run sudo? */
if (user_uid == 0 && !def_flag(I_ROOT_SUDO)) { if (user_uid == 0 && !def_flag(I_ROOT_SUDO)) {
(void) fputs("You are already root, you don't need to use sudo.\n", (void) fprintf(stderr,
stderr); "Sorry, %s has been configured to not allow root to run it.\n",
Argv[0]);
exit(1); exit(1);
} }