Index: passdb/pdb_nds.c =================================================================== --- passdb/pdb_nds.c (revision 5995) +++ passdb/pdb_nds.c (working copy) @@ -663,7 +663,7 @@ int pdb_nds_get_password( struct smbldap_state *ldap_state, char *object_dn, - int *pwd_len, + size_t *pwd_len, char *pwd ) { LDAP *ld = ldap_state->ldap_struct; @@ -793,8 +793,8 @@ DEBUG(3, ("pdb_nds_update_login_attempts: username %s found dn '%s'\n", username, dn)); - pwd_len = sizeof(clear_text_pw); if (success == True) { + pwd_len = sizeof(clear_text_pw); if (pdb_nds_get_password(ldap_state->smbldap_state, dn, &pwd_len, clear_text_pw) == LDAP_SUCCESS) { /* Got clear text password. Use simple ldap bind */ got_clear_text_pw = True;