winbindd: let WBFLAG_PAM_GET_PWD_POLICY only fake the password policy
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Apr 2017 07:24:11 +0000 (09:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 6 Apr 2017 12:03:09 +0000 (14:03 +0200)
commite69aa55c5dae0722e78fc67716c04dec2bec1c46
tree5ce3d72fea35087795c8b4a4f859bc7737e46010
parentfba7ed9a3fa6fcb2d90d1271ae81ec11b554bd2d
winbindd: let WBFLAG_PAM_GET_PWD_POLICY only fake the password policy

As WBFLAG_PAM_GET_PWD_POLICY is only kept for legacy external callers
of libwbclient, we should avoid having the complexity to do additional
network roundtrips to our domain, while we still can't garantee that
the returned password policy actually represents the reality for
the current authentication.

Instead we're calculating r->data.auth.policy.expire and
r->data.auth.policy.min_passwordage based on the effective
{last,allow,force}_password_change values.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr  6 14:03:09 CEST 2017 on sn-devel-144
source3/winbindd/winbindd_pam.c