From: Howard Chu Date: Wed, 18 Mar 2015 20:50:19 +0000 (+0000) Subject: ITS#8080 nssov: use old pwd if it's given X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~141^2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d9f33072b046e27fd41d07bc777e1f96ba24952;p=thirdparty%2Fopenldap.git ITS#8080 nssov: use old pwd if it's given --- diff --git a/contrib/slapd-modules/nssov/pam.c b/contrib/slapd-modules/nssov/pam.c index 25ed22abdc..45302b55a8 100644 --- a/contrib/slapd-modules/nssov/pam.c +++ b/contrib/slapd-modules/nssov/pam.c @@ -808,8 +808,8 @@ int pam_pwmod(nssov_info *ni,TFILE *fp,Operation *op,uid_t calleruid) if (!BER_BVISEMPTY(&pi.dn)) ber_printf(ber, "tO", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, &pi.dn); - /* supply old pwd only when end-user changing pwd */ - if (pi.ispwdmgr == 0) + /* supply old pwd whenever it's given */ + if (!BER_BVISEMPTY(&pi.pwd)) ber_printf(ber, "tO", LDAP_TAG_EXOP_MODIFY_PASSWD_OLD, &pi.pwd); if (!BER_BVISEMPTY(&npw))