[BACK]Return to logging.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Diff for /src/usr.bin/sudo/Attic/logging.c between version 1.6 and 1.7

version 1.6, 2002/01/14 00:11:44 version 1.7, 2002/01/17 01:03:21
Line 65 
Line 65 
 #include "sudo.h"  #include "sudo.h"
   
 #ifndef lint  #ifndef lint
 static const char rcsid[] = "$Sudo: logging.c,v 1.152 2002/01/13 18:27:25 millert Exp $";  static const char rcsid[] = "$Sudo: logging.c,v 1.153 2002/01/16 21:28:25 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 static void do_syslog           __P((int, char *));  static void do_syslog           __P((int, char *));
Line 439 
Line 439 
     char *p;      char *p;
     int pfd[2], pid, status;      int pfd[2], pid, status;
     sigset_t set, oset;      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. */      /* Just return if mailer is disabled. */
     if (!def_str(I_MAILERPATH) || !def_str(I_MAILTO))      if (!def_str(I_MAILERPATH) || !def_str(I_MAILTO))
Line 493 
Line 502 
                 /* Close password file so we don't leak the fd. */                  /* Close password file so we don't leak the fd. */
                 endpwent();                  endpwent();
   
                 /* Run mailer as root so user cannot kill it. */                  /*
                    * 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);                  set_perms(PERM_FULL_ROOT, 0);
                   execve(mpath, argv, root_envp);
   #else
                   set_perms(PERM_FULL_USER, 0);
                 execv(mpath, argv);                  execv(mpath, argv);
   #endif /* NO_ROOT_MAILER */
                 _exit(127);                  _exit(127);
             }              }
             break;              break;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7