]> granicus.if.org Git - sudo/commitdiff
o timestamp_uid should be uid_t, not int
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 22 Nov 2002 18:23:24 +0000 (18:23 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 22 Nov 2002 18:23:24 +0000 (18:23 +0000)
o clarify error message when sudo is run by root and no_root_sudo is set

sudo.c

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