summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2017-03-27 15:11:08 -0700
committerChristof Schmitt <cs@samba.org>2017-03-29 22:54:47 +0200
commitbc39fb07ced84af4d97853d00d07fb4293352686 (patch)
tree88b5d7d86da304a43de8bf2098b80e907848eb91 /source3/winbindd
parent6e9879f6e2f8974730517fad22875db06f0738de (diff)
downloadsamba-bc39fb07ced84af4d97853d00d07fb4293352686.tar.gz
winbindd: Fix password policy for pam authentication
Authenticating users from trusted domains would return the password policy of the joined domain. Fix the code so that the password policy of the joined domain is only returned for users from that domain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12725 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Wed Mar 29 22:54:47 CEST 2017 on sn-devel-144
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_pam.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 606e6de0012..8139cbeca74 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1939,7 +1939,7 @@ process_result:
-- jerry */
result = NT_STATUS_NOT_SUPPORTED;
- if (our_domain == domain ) {
+ if (strequal(name_domain, our_domain->name)) {
result = fillup_password_policy(
our_domain, state->response);
}
@@ -1947,8 +1947,9 @@ process_result:
if (!NT_STATUS_IS_OK(result)
&& !NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED) )
{
- DEBUG(10,("Failed to get password policies for domain %s: %s\n",
- domain->name, nt_errstr(result)));
+ DBG_DEBUG("Failed to get password policies for "
+ "domain %s: %s\n", our_domain->name,
+ nt_errstr(result));
goto done;
}
}