summaryrefslogtreecommitdiff
path: root/modules/pam_unix
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-11-07 20:09:42 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-11-07 20:09:42 +0000
commit6c22ab1b705ee1e990ef3436ffbbbf18dc4c52d6 (patch)
tree8453856643c82bdea214511549d2d9b6ea806e69 /modules/pam_unix
parent8f587b822fa7bc9943ea37e113710a2dd3298237 (diff)
Relevant BUGIDs:
Purpose of commit: bugfix Commit summary: --------------- 2005-11-07 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_unix/pam_unix_passwd.c (_unix_verify_shadow): Use correct variable names. And adjust .cvsignore files for libtool generated files.
Diffstat (limited to 'modules/pam_unix')
-rw-r--r--modules/pam_unix/.cvsignore9
-rw-r--r--modules/pam_unix/pam_unix_passwd.c15
2 files changed, 14 insertions, 10 deletions
diff --git a/modules/pam_unix/.cvsignore b/modules/pam_unix/.cvsignore
index 699aea32..8de09aa5 100644
--- a/modules/pam_unix/.cvsignore
+++ b/modules/pam_unix/.cvsignore
@@ -1,6 +1,9 @@
-dynamic
-unix_chkpwd
+*.la
+*.lo
*.so
-*~
+.deps
+.libs
Makefile
Makefile.in
+bigcrypt
+unix_chkpwd
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index f433ab2c..09988816 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -923,11 +923,11 @@ static int _unix_verify_shadow(pam_handle_t *pamh, const char *user, unsigned in
if (off(UNIX__IAMROOT, ctrl)) {
/* Get the current number of days since 1970 */
curdays = time(NULL) / (60 * 60 * 24);
- if (curdays < spent->sp_lstchg) {
+ if (curdays < spwdent->sp_lstchg) {
pam_syslog(pamh, LOG_DEBUG,
"account %s has password changed in future",
- uname);
- curdays = spent->sp_lstchg;
+ user);
+ curdays = spwdent->sp_lstchg;
}
if ((curdays - spwdent->sp_lstchg < spwdent->sp_min)
&& (spwdent->sp_min != -1))
@@ -935,9 +935,10 @@ static int _unix_verify_shadow(pam_handle_t *pamh, const char *user, unsigned in
* The last password change was too recent.
*/
retval = PAM_AUTHTOK_ERR;
- else if ((curdays - spent->sp_lstchg > spent->sp_max)
- && (curdays - spent->sp_lstchg > spent->sp_inact)
- && (curdays - spent->sp_lstchg > spent->sp_max + spent->sp_inact)
+ else if ((curdays - spwdent->sp_lstchg > spwdent->sp_max)
+ && (curdays - spwdent->sp_lstchg > spwdent->sp_inact)
+ && (curdays - spwdent->sp_lstchg >
+ spwdent->sp_max + spwdent->sp_inact)
&& (spwdent->sp_max != -1) && (spwdent->sp_inact != -1)
&& (spwdent->sp_lstchg != 0))
/*
@@ -1366,7 +1367,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
_pam_delete(tpass);
pass_old = pass_new = NULL;
} else { /* something has broken with the module */
- pam_syslog(pamh, LOG_ALERT,
+ pam_syslog(pamh, LOG_ALERT,
"password received unknown request");
retval = PAM_ABORT;
}