From b131aab00e16a416f3ebfc1f8b6fca8db0ed5327 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 8 Jul 2005 06:05:02 +0000 Subject: [PATCH] Streamline call to lutil_passwd_scheme --- servers/slapd/overlays/ppolicy.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index af9804807a..4b29520517 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -417,11 +417,7 @@ password_scheme( struct berval *cred, struct berval *sch ) for(e = 1; cred->bv_val[e] && cred->bv_val[e] != '}'; e++); if (cred->bv_val[e]) { int rc; - char *sc = ch_calloc( sizeof(char), e + 2); - sc[e + 1] = '\0'; /* terminate string */ - strncpy( sc, cred->bv_val, e + 1); - rc = lutil_passwd_scheme( sc ); - free( sc ); + rc = lutil_passwd_scheme( cred->bv_val ); if (rc && sch) { sch->bv_val = cred->bv_val; sch->bv_len = e; -- 2.39.5