summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2015-11-25 14:04:24 +0100
committerBjoern Jacke <bj@sernet.de>2016-12-13 14:12:06 +0100
commit69f10080c3765a9b139fbad7f3dc633066fdded2 (patch)
treef410fee5a7579c98cefd47e510d5e2493517be16 /nsswitch
parentdcd4fed82d25c40ac61fe3aa42083b47eca94389 (diff)
downloadsamba-69f10080c3765a9b139fbad7f3dc633066fdded2.tar.gz
pam: map more NT password errors to PAM errors
NT_STATUS_ACCOUNT_DISABLED, NT_STATUS_PASSWORD_RESTRICTION, NT_STATUS_PWD_HISTORY_CONFLICT, NT_STATUS_PWD_TOO_RECENT, NT_STATUS_PWD_TOO_SHORT now map to PAM_AUTHTOK_ERR (Authentication token manipulation error), which is the closest match. BUG: https://bugzilla.samba.org/show_bug.cgi?id=2210 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/pam_winbind.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 42c4f8e5964..4ae78b35f00 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -775,6 +775,11 @@ static int pam_winbind_request_log(struct pwb_context *ctx,
return PAM_IGNORE;
}
return retval;
+ case PAM_AUTHTOK_ERR:
+ /* Authentication token manipulation error */
+ _pam_log(ctx, LOG_WARNING, "user `%s' authentication token change failed "
+ "(pwd complexity/history/min_age not met?)", user);
+ return retval;
case PAM_SUCCESS:
/* Otherwise, the authentication looked good */
if (strcmp(fn, "wbcLogonUser") == 0) {