]> git.sur5r.net Git - openldap/commitdiff
fix ITS#3805
authorPierangelo Masarati <ando@openldap.org>
Tue, 28 Jun 2005 15:58:33 +0000 (15:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 28 Jun 2005 15:58:33 +0000 (15:58 +0000)
servers/slapd/passwd.c

index 0917bd2273a7216ce47e897e28a874c10b467228..db44ffe17a9fe2d5de7585b4e5c2d027a697acc7 100644 (file)
@@ -510,8 +510,10 @@ static int slapd_crypt( const char *key, const char *salt, char **hash )
                if ( hash ) {
                        *hash = ber_strdup( cr );
                        rc = LUTIL_PASSWD_OK;
+
+               } else {
+                       rc = strcmp( salt, cr ) ? LUTIL_PASSWD_ERR : LUTIL_PASSWD_OK;
                }
-               rc = strcmp( salt, cr ) ? LUTIL_PASSWD_ERR : LUTIL_PASSWD_OK;
        }
 
        ldap_pvt_thread_mutex_unlock( &passwd_mutex );