summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2008-12-12 14:05:41 +0000
committerTomas Mraz <tm@t8m.info>2008-12-12 14:05:41 +0000
commit54febaaeb968aa3d9aa85583cd49ff058c6e1368 (patch)
treecb494a2513ea8d43f83f3005b3b7c8e7d5481034
parenta1131337d71a61da5b3b5e129545d3257a709480 (diff)
Relevant BUGIDs:
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.
-rw-r--r--ChangeLog6
-rw-r--r--modules/pam_tally2/pam_tally2.8.xml2
-rw-r--r--modules/pam_tally2/pam_tally2.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c5c2337a..e1203d33 100644
--- 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.
diff --git a/modules/pam_tally2/pam_tally2.8.xml b/modules/pam_tally2/pam_tally2.8.xml
index dc284a1d..a7a3fc47 100644
--- a/modules/pam_tally2/pam_tally2.8.xml
+++ b/modules/pam_tally2/pam_tally2.8.xml
@@ -370,7 +370,7 @@
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>
diff --git a/modules/pam_tally2/pam_tally2.c b/modules/pam_tally2/pam_tally2.c
index 5924edf9..faa6942e 100644
--- a/modules/pam_tally2/pam_tally2.c
+++ b/modules/pam_tally2/pam_tally2.c
@@ -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);