]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/passwd.c
update for new backend types
[openldap] / servers / slapd / passwd.c
index 0917bd2273a7216ce47e897e28a874c10b467228..82acabab4a343a77d5b41ed08f82a2d431b662d2 100644 (file)
@@ -470,7 +470,7 @@ slap_passwd_hash_type(
        new->bv_len = 0;
        new->bv_val = NULL;
 
-       assert( hash );
+       assert( hash != NULL );
 
        lutil_passwd_hash( cred , hash, new, text );
 }
@@ -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 );