From 103392b9a36a0595f887db9f8364cf1253927086 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 13 Jun 2006 19:45:11 +0000 Subject: [PATCH] fix scheme recognition (ITS#4575) --- servers/slapd/overlays/ppolicy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } } -- 2.39.5