Only retrieve password policies in pam_auth when WBFLAG_PAM_GET_PWD is set.
authorMichael Adam <obnox@samba.org>
Wed, 19 Dec 2007 17:18:30 +0000 (18:18 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 19 Dec 2007 17:19:13 +0000 (18:19 +0100)
commitf76f994e471ff8f62714a51bdc15469e08aa7062
tree8dbe0b5d5a511fa7bd7c9b1155ec94b1f896aac1
parentbce6c238edbbfe54807b549d17a07366feff2497
Only retrieve password policies in pam_auth when WBFLAG_PAM_GET_PWD 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/winbindd_nss.h
source/nsswitch/winbindd_pam.c