=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/logging.c,v retrieving revision 1.4.2.1 retrieving revision 1.5 diff -c -r1.4.2.1 -r1.5 *** src/usr.bin/sudo/Attic/logging.c 2002/01/18 16:14:46 1.4.2.1 --- src/usr.bin/sudo/Attic/logging.c 2002/01/03 03:49:16 1.5 *************** *** 65,71 **** #include "sudo.h" #ifndef lint ! static const char rcsid[] = "$Sudo: logging.c,v 1.153 2002/01/16 21:28:25 millert Exp $"; #endif /* lint */ static void do_syslog __P((int, char *)); --- 65,71 ---- #include "sudo.h" #ifndef lint ! static const char rcsid[] = "$Sudo: logging.c,v 1.151 2001/12/14 23:33:38 millert Exp $"; #endif /* lint */ static void do_syslog __P((int, char *)); *************** *** 439,453 **** char *p; int pfd[2], pid, status; sigset_t set, oset; - #ifndef NO_ROOT_MAILER - static char *root_envp[] = { - "HOME=/", - "PATH=/usr/bin:/bin", - "LOGNAME=root", - "USER=root", - NULL - }; - #endif /* Just return if mailer is disabled. */ if (!def_str(I_MAILERPATH) || !def_str(I_MAILTO)) --- 439,444 ---- *************** *** 502,518 **** /* Close password file so we don't leak the fd. */ endpwent(); ! /* ! * Depending on the config, either run the mailer as root ! * (so user cannot kill it) or as the user (for the paranoid). ! */ ! #ifndef NO_ROOT_MAILER ! set_perms(PERM_FULL_ROOT, 0); ! execve(mpath, argv, root_envp); ! #else ! set_perms(PERM_FULL_USER, 0); execv(mpath, argv); - #endif /* NO_ROOT_MAILER */ _exit(127); } break; --- 493,501 ---- /* Close password file so we don't leak the fd. */ endpwent(); ! /* Run mailer as root so user cannot kill it. */ ! set_perms(PERM_ROOT, 0); execv(mpath, argv); _exit(127); } break;