[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.11 and 1.12

version 1.11, 2003/03/28 18:55:30 version 1.12, 2003/04/03 19:15:34
Line 57 
Line 57 
 #ifdef HAVE_UNISTD_H  #ifdef HAVE_UNISTD_H
 # include <unistd.h>  # include <unistd.h>
 #endif /* HAVE_UNISTD_H */  #endif /* HAVE_UNISTD_H */
   #ifdef HAVE_ERR_H
   # include <err.h>
   #else
   # include "emul/err.h"
   #endif /* HAVE_ERR_H */
 #include <pwd.h>  #include <pwd.h>
 #include <signal.h>  #include <signal.h>
 #include <time.h>  #include <time.h>
Line 65 
Line 70 
 #include "sudo.h"  #include "sudo.h"
   
 #ifndef lint  #ifndef lint
 static const char rcsid[] = "$Sudo: logging.c,v 1.159 2003/03/24 21:09:27 millert Exp $";  static const char rcsid[] = "$Sudo: logging.c,v 1.160 2003/04/02 18:25:19 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 static void do_syslog           __P((int, char *));  static void do_syslog           __P((int, char *));
Line 107 
Line 112 
     va_start(ap);      va_start(ap);
 #endif  #endif
 #ifdef LOG_NFACILITIES  #ifdef LOG_NFACILITIES
     openlog(Argv[0], 0, def_ival(I_LOGFAC));      openlog("sudo", 0, def_ival(I_LOGFAC));
 #else  #else
     openlog(Argv[0], 0);      openlog("sudo", 0);
 #endif  #endif
     vsnprintf(buf, sizeof(buf), fmt, ap);      vsnprintf(buf, sizeof(buf), fmt, ap);
 #ifdef BROKEN_SYSLOG  #ifdef BROKEN_SYSLOG
Line 400 
Line 405 
     /*      /*
      * Tell the user.       * Tell the user.
      */       */
     (void) fprintf(stderr, "%s: %s", Argv[0], message);  
     if (flags & USE_ERRNO)      if (flags & USE_ERRNO)
         (void) fprintf(stderr, ": %s", strerror(serrno));          warn("%s", message);
     (void) fputc('\n', stderr);      else
           warnx("%s", message);
   
     /*      /*
      * Send a copy of the error via mail.       * Send a copy of the error via mail.
Line 459 
Line 464 
     (void) sigaddset(&set, SIGCHLD);      (void) sigaddset(&set, SIGCHLD);
     (void) sigprocmask(SIG_BLOCK, &set, &oset);      (void) sigprocmask(SIG_BLOCK, &set, &oset);
   
     if (pipe(pfd) == -1) {      if (pipe(pfd) == -1)
         (void) fprintf(stderr, "%s: cannot open pipe: %s\n",          err(1, "cannot open pipe");
             Argv[0], strerror(errno));  
         exit(1);  
     }  
   
     switch (pid = fork()) {      switch (pid = fork()) {
         case -1:          case -1:
             /* Error. */              /* Error. */
             (void) fprintf(stderr, "%s: cannot fork: %s\n",              err(1, "cannot fork");
                 Argv[0], strerror(errno));  
             exit(1);  
             break;              break;
         case 0:          case 0:
             {              {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12