PERM_FULL_ROOT is now no different than PERM_ROOT so remove PERM_FULL_ROOT
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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)");
|
||||
|
13
sudo.h
13
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.
|
||||
|
Reference in New Issue
Block a user