Diff for /embedaddon/sudo/plugins/sudoers/linux_audit.c between versions 1.1.1.4 and 1.1.1.6

version 1.1.1.4, 2013/07/22 10:46:12 version 1.1.1.6, 2014/06/15 16:12:54
Line 31 Line 31
 #include <string.h>  #include <string.h>
 #include <libaudit.h>  #include <libaudit.h>
   
   #define DEFAULT_TEXT_DOMAIN     "sudoers"
   #include "gettext.h"            /* must be included before missing.h */
   
 #include "missing.h"  #include "missing.h"
#include "error.h"#include "fatal.h"
 #include "alloc.h"  #include "alloc.h"
 #include "gettext.h"  
 #include "sudo_debug.h"  #include "sudo_debug.h"
 #include "linux_audit.h"  #include "linux_audit.h"
   
Line 54  static linux_audit_open(void) Line 56  static linux_audit_open(void)
     if (au_fd == -1) {      if (au_fd == -1) {
         /* Kernel may not have audit support. */          /* Kernel may not have audit support. */
         if (errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT)          if (errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT)
            fatal(_("unable to open audit system"));            fatal(U_("unable to open audit system"));
     } else {      } else {
         (void)fcntl(au_fd, F_SETFD, FD_CLOEXEC);          (void)fcntl(au_fd, F_SETFD, FD_CLOEXEC);
     }      }
Line 79  linux_audit_command(char *argv[], int result) Line 81  linux_audit_command(char *argv[], int result)
     for (av = argv; *av != NULL; av++) {      for (av = argv; *av != NULL; av++) {
         n = strlcpy(cp, *av, size - (cp - command));          n = strlcpy(cp, *av, size - (cp - command));
         if (n >= size - (cp - command)) {          if (n >= size - (cp - command)) {
            fatalx(_("internal error, %s overflow"),            fatalx(U_("internal error, %s overflow"),
                 "linux_audit_command()");                  "linux_audit_command()");
         }          }
         cp += n;          cp += n;
Line 90  linux_audit_command(char *argv[], int result) Line 92  linux_audit_command(char *argv[], int result)
     /* Log command, ignoring ECONNREFUSED on error. */      /* Log command, ignoring ECONNREFUSED on error. */
     rc = audit_log_user_command(au_fd, AUDIT_USER_CMD, command, NULL, result);      rc = audit_log_user_command(au_fd, AUDIT_USER_CMD, command, NULL, result);
     if (rc <= 0 && errno != ECONNREFUSED)      if (rc <= 0 && errno != ECONNREFUSED)
        warning(_("unable to send audit message"));        warning(U_("unable to send audit message"));
   
     efree(command);      efree(command);
   

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>