]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorTomas Mraz <tm@t8m.info>
Fri, 12 Dec 2008 14:05:41 +0000 (14:05 +0000)
committerTomas Mraz <tm@t8m.info>
Fri, 12 Dec 2008 14:05:41 +0000 (14:05 +0000)
Purpose of commit: bugfix

Commit summary:
---------------
2008-12-12  Tomas Mraz <t8m@centrum.cz>

        * modules/pam_tally2/pam_tally2.c (get_tally): Test for EACCES
        instead of EPERM.
        * modules/pam_tally2/pam_tally2.8.xml: Fix documentation.

ChangeLog
modules/pam_tally2/pam_tally2.8.xml
modules/pam_tally2/pam_tally2.c

index c5c2337ae2098a93f0c3802ac1e7b56e90452b0a..e1203d339c69c45b7dc85543c2357dc62dd47f63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-12  Tomas Mraz <t8m@centrum.cz>
+
+       * modules/pam_tally2/pam_tally2.c (get_tally): Test for EACCES
+       instead of EPERM.
+       * modules/pam_tally2/pam_tally2.8.xml: Fix documentation.
+
 2008-12-10  Thorsten Kukuk  <kukuk@thkukuk.de>
 
        * doc/man/pam_item_types_ext.inc.xml: Document PAM_AUTHTOK_TYPE.
index dc284a1d3456e9a22c845162154d3ece5774bb9c..a7a3fc474a34c53692af2408b782a2a01fe746fa 100644 (file)
       xscreensaver. As this would make it impossible to share PAM configuration
       with such services the following workaround is used: If the data file
       cannot be opened because of insufficient permissions
-      (<errorcode>EPERM</errorcode>) the module returns
+      (<errorcode>EACCES</errorcode>) the module returns
       <errorcode>PAM_IGNORE</errorcode>.
     </para>
   </refsect1>
index 5924edf927912cefe7ce08a36547fa518af99e7b..faa6942e0d7e93c9972b829501311125ab7da39b 100644 (file)
@@ -351,7 +351,7 @@ get_tally(pam_handle_t *pamh, uid_t uid, const char *filename,
       umask(oldmask);
       if ( !*tfile ) {
 #ifndef MAIN
-        if (save_errno == EPERM) {
+        if (save_errno == EACCES) {
            return PAM_IGNORE; /* called with insufficient access rights */
        }
 #endif
@@ -380,7 +380,7 @@ get_tally(pam_handle_t *pamh, uid_t uid, const char *filename,
 
     if (!(*tfile = fopen(filename, "r+"))) {
 #ifndef MAIN
-      if (errno == EPERM) /* called with insufficient access rights */
+      if (errno == EACCES) /* called with insufficient access rights */
          return PAM_IGNORE;
 #endif 
       pam_syslog(pamh, LOG_ALERT, "Error opening %s for update: %m", filename);