aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/pam_unix_acct.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2022-08-16 22:06:15 -0700
committerSteve Langasek <steve.langasek@canonical.com>2022-08-16 22:11:24 -0700
commit7561896529a7af05201dc31e959a05897ef99e19 (patch)
tree14514b088f45d4fecd3b7a6ede5e0a99f6c10f6a /modules/pam_unix/pam_unix_acct.c
parentd071f8c9829cbd60e2a98ab5e6b1ddfdffb9b549 (diff)
parent99d0d1c5c4f07332daa86e73981267a761bc966e (diff)
downloadpam-7561896529a7af05201dc31e959a05897ef99e19.tar.gz
pam-7561896529a7af05201dc31e959a05897ef99e19.tar.bz2
pam-7561896529a7af05201dc31e959a05897ef99e19.zip
Merge new upstream version 1.5.2.
Diffstat (limited to 'modules/pam_unix/pam_unix_acct.c')
-rw-r--r--modules/pam_unix/pam_unix_acct.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
index de8d65c1..8f5ed3e0 100644
--- a/modules/pam_unix/pam_unix_acct.c
+++ b/modules/pam_unix/pam_unix_acct.c
@@ -189,7 +189,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
unsigned long long ctrl;
const void *void_uname;
const char *uname;
- int retval, daysleft;
+ int retval, daysleft = -1;
char buf[256];
D(("called."));
@@ -252,6 +252,10 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
_("Your account has expired; please contact your system administrator."));
break;
case PAM_AUTHTOK_ERR:
+ /*
+ * We ignore "password changed too early" error
+ * as it is relevant only for password change.
+ */
retval = PAM_SUCCESS;
/* fallthrough */
case PAM_SUCCESS: