]> granicus.if.org Git - linux-pam/commitdiff
Relax the conditions for fatal failure on auditing.
authorTomas Mraz <tmraz@fedoraproject.org>
Thu, 17 Dec 2015 16:43:27 +0000 (17:43 +0100)
committerTomas Mraz <tmraz@fedoraproject.org>
Thu, 17 Dec 2015 16:43:27 +0000 (17:43 +0100)
The PAM library calls will not fail anymore for any uid if the return
value from the libaudit call is -EPERM.

* libpam/pam_audit.c (_pam_audit_writelog): Remove check for uid != 0.

libpam/pam_audit.c

index 24fb799a75e1bd3672239361ec1efabfc1ea5949..97a9a92959288f386f7963f4492779419f1ab2cd 100644 (file)
@@ -53,7 +53,7 @@ _pam_audit_writelog(pam_handle_t *pamh, int audit_fd, int type,
   pamh->audit_state |= PAMAUDIT_LOGGED;
 
   if (rc < 0) {
-      if (rc == -EPERM && getuid() != 0)
+      if (rc == -EPERM)
           return 0;
       if (errno != old_errno) {
           old_errno = errno;