From: Pierangelo Masarati Date: Tue, 13 Jun 2006 19:45:11 +0000 (+0000) Subject: fix scheme recognition (ITS#4575) X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~126 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=103392b9a36a0595f887db9f8364cf1253927086;p=openldap fix scheme recognition (ITS#4575) --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index f9cea26ce9..f8c7971a08 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -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; } }