diff options
author | Günther Deschner <gd@samba.org> | 2006-03-16 23:54:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:34 -0500 |
commit | 3cbdb090b98bf724e69c5e5fc0d8b3e1b61f6b90 (patch) | |
tree | 4b54c221395abef66d9e3461683c7f64dd9d2cf1 /source3/nsswitch/winbindd_pam.c | |
parent | 99a3f68eb59e7d00c87081ff2f22449ebe4081ed (diff) | |
download | samba-3cbdb090b98bf724e69c5e5fc0d8b3e1b61f6b90.tar.gz samba-3cbdb090b98bf724e69c5e5fc0d8b3e1b61f6b90.tar.bz2 samba-3cbdb090b98bf724e69c5e5fc0d8b3e1b61f6b90.zip |
r14496: Add WBFLAG_PAM_GET_PWD_POLICY bit to only callout for domain password
policies when requested.
No panic, the flags is uint32 so we are not running out of WBFLAG bits.
Guenther
(This used to be commit 2155bb0535656f294bd054d6a0a7d16a9a71c31b)
Diffstat (limited to 'source3/nsswitch/winbindd_pam.c')
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 9cd2dd9c0c..12455db8f6 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -1210,11 +1210,14 @@ process_result: } - result = fillup_password_policy(domain, state); + /* this is required to provide password expiry warning */ + if (state->request.flags & WBFLAG_PAM_GET_PWD_POLICY) { + result = fillup_password_policy(domain, state); - if (!NT_STATUS_IS_OK(result)) { - DEBUG(10,("Failed to get password policies: %s\n", nt_errstr(result))); - goto done; + if (!NT_STATUS_IS_OK(result)) { + DEBUG(10,("Failed to get password policies: %s\n", nt_errstr(result))); + goto done; + } } } |