]> git.sur5r.net Git - openldap/commitdiff
fix scheme recognition (ITS#4575)
authorPierangelo Masarati <ando@openldap.org>
Tue, 13 Jun 2006 19:45:11 +0000 (19:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 13 Jun 2006 19:45:11 +0000 (19:45 +0000)
servers/slapd/overlays/ppolicy.c

index f9cea26ce93c7a3933cab7524c845bd5ebdcefab..f8c7971a08b00bfee827339d2de3660ce2b9234b 100644 (file)
@@ -525,9 +525,11 @@ password_scheme( struct berval *cred, struct berval *sch )
        if (cred->bv_val[e]) {
                int rc;
                rc = lutil_passwd_scheme( cred->bv_val );
-               if (rc && sch) {
-                       sch->bv_val = cred->bv_val;
-                       sch->bv_len = e;
+               if (rc) {
+                       if (sch) {
+                               sch->bv_val = cred->bv_val;
+                               sch->bv_len = e;
+                       }
                        return LDAP_SUCCESS;
                }
        }