Only retrieve password policies in pam_auth when WBFLAG_PAM_GET_PWD_POLICY is set.
authorMichael Adam <obnox@samba.org>
Wed, 19 Dec 2007 16:53:14 +0000 (17:53 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 20 Dec 2007 01:05:55 +0000 (02:05 +0100)
commit6d765e0de523211a2d0b43a2c4c4117f5f0c662f
tree22056f6b18c4cf4498a53c04998c4632341d6800
parentb5f600fab53c9d159a958c59795db3ba4a8acc63
Only retrieve password policies in pam_auth when WBFLAG_PAM_GET_PWD_POLICY is set.

This essentially re-establishes r14496 (2155bb0535656f294bd054d6a0a7d16a9a71c31b)
which was undone in r17723 (43bd8c00abb38eb23a1497a255d194fb1bbffffb) for
reasons that are unclear to me. Maybe I am being too naive.

Now we do again only retrieve the password policy when called from
the pam_winbind module. This fixes logons delegated to AD trusted
domain controllers: We need to connect to the sam to retrieve the
password policy. But auhtenticated session setup is not possible
when contacting the trusted domain dc and afterwards, SamrConnect
also fails with whatever credentials and method used.

Michael
source/nsswitch/pam_winbind.c
source/nsswitch/winbind_struct_protocol.h
source/winbindd/winbindd_pam.c