]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/ppolicy.c
Omit logpurge attr if no purge time was configured
[openldap] / 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;
                }
        }