From: Todd C. Miller Date: Fri, 6 Jul 2007 14:04:40 +0000 (+0000) Subject: PERM_FULL_ROOT is now no different than PERM_ROOT so remove PERM_FULL_ROOT X-Git-Tag: SUDO_1_7_0~506 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3ef73825473d6a0d3bfdd1ee4d0c6fae9fbb38f;p=sudo PERM_FULL_ROOT is now no different than PERM_ROOT so remove PERM_FULL_ROOT --- diff --git a/logging.c b/logging.c index 29b784c9f..6d251f67b 100644 --- a/logging.c +++ b/logging.c @@ -527,7 +527,7 @@ send_mail(line) * (so user cannot kill it) or as the user (for the paranoid). */ #ifndef NO_ROOT_MAILER - set_perms(PERM_FULL_ROOT); + set_perms(PERM_ROOT); execve(mpath, argv, root_envp); #else set_perms(PERM_FULL_USER); diff --git a/mon_systrace.c b/mon_systrace.c index 29ea9718c..f6fbcfe01 100644 --- a/mon_systrace.c +++ b/mon_systrace.c @@ -165,7 +165,7 @@ systrace_attach(pid) } /* become a daemon */ - set_perms(PERM_FULL_ROOT); + set_perms(PERM_ROOT); if (setsid() == -1) { warning("setsid"); kill(pid, SIGKILL); diff --git a/set_perms.c b/set_perms.c index 9cd5b8513..464540ca8 100644 --- a/set_perms.c +++ b/set_perms.c @@ -78,7 +78,6 @@ set_perms(perm) int perm; { switch (perm) { - case PERM_FULL_ROOT: case PERM_ROOT: if (setresuid(ROOT_UID, ROOT_UID, ROOT_UID)) errorx(1, "setresuid(ROOT_UID, ROOT_UID, ROOT_UID) failed, your operating system may have a broken setresuid() function\nTry running configure with --disable-setresuid"); @@ -152,7 +151,6 @@ set_perms(perm) int perm; { switch (perm) { - case PERM_FULL_ROOT: case PERM_ROOT: if (setreuid(-1, ROOT_UID)) errorx(1, "setreuid(-1, ROOT_UID) failed, your operating system may have a broken setreuid() function\nTry running configure with --disable-setreuid"); @@ -235,7 +233,6 @@ set_perms(perm) error(1, "setuid(ROOT_UID)"); switch (perm) { - case PERM_FULL_ROOT: case PERM_ROOT: /* already set above */ break; @@ -304,7 +301,6 @@ set_perms(perm) { switch (perm) { - case PERM_FULL_ROOT: case PERM_ROOT: if (setuid(ROOT_UID)) error(1, "setuid(ROOT_UID)"); diff --git a/sudo.h b/sudo.h index 290e1b527..1f6e26e5e 100644 --- a/sudo.h +++ b/sudo.h @@ -109,13 +109,12 @@ struct sudo_user { * Used with set_perms() */ #define PERM_ROOT 0x00 -#define PERM_FULL_ROOT 0x01 -#define PERM_USER 0x02 -#define PERM_FULL_USER 0x03 -#define PERM_SUDOERS 0x04 -#define PERM_RUNAS 0x05 -#define PERM_FULL_RUNAS 0x06 -#define PERM_TIMESTAMP 0x07 +#define PERM_USER 0x01 +#define PERM_FULL_USER 0x02 +#define PERM_SUDOERS 0x03 +#define PERM_RUNAS 0x04 +#define PERM_FULL_RUNAS 0x05 +#define PERM_TIMESTAMP 0x06 /* * Shortcuts for sudo_user contents.