]> git.sur5r.net Git - openldap/commitdiff
ITS#8080 nssov: use old pwd if it's given
authorHoward Chu <hyc@openldap.org>
Wed, 18 Mar 2015 20:50:19 +0000 (20:50 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 18 Mar 2015 20:50:19 +0000 (20:50 +0000)
contrib/slapd-modules/nssov/pam.c

index 25ed22abdc757be782394e27310186bfe7863476..45302b55a817a1324ed7ced4033a5c1fc98fa153 100644 (file)
@@ -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))