#ifdef NEW_LOGGING
LDAP_LOG( BACK_LDBM, ENTRY,
- "ldbm_back_exop_passwd: \"%s\"\n", id.bv_val ? id.bv_val : "", 0,0 );
+ "ldbm_back_exop_passwd: \"%s\"\n", id.bv_val ? id.bv_val : "", 0,0 );
#else
Debug( LDAP_DEBUG_ARGS, "==> ldbm_back_exop_passwd: \"%s\"\n",
id.bv_val ? id.bv_val : "", 0, 0 );
#endif
-
if( rc != LDAP_SUCCESS ) {
goto done;
}
rs->sr_rspdata = slap_passwd_return( &new );
}
- slap_passwd_hash( &new, &hash );
+ slap_passwd_hash( &new, &hash, &rs->sr_text );
if( hash.bv_len == 0 ) {
- rs->sr_text = "password hash failed";
+ if( !rs->sr_text ) rs->sr_text = "password hash failed";
rc = LDAP_OTHER;
goto done;
}
goto done;
}
- rc = dnNormalize2( NULL, &dn, &ndn, op->o_tmpmemctx );
+ rc = dnNormalize( 0, NULL, NULL, &dn, &ndn, op->o_tmpmemctx );
if( rc != LDAP_SUCCESS ) {
rs->sr_text = "Invalid DN";
goto done;
ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
e = dn2entry_w( op->o_bd, &ndn, NULL );
- if( e == NULL ) {
+
+ if ( e == NULL || is_entry_glue( e )) {
+ /* FIXME : dn2entry() should return non-glue entry */
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
rs->sr_text = "could not locate authorization entry";
rc = LDAP_NO_SUCH_OBJECT;
goto done;
}
+#ifdef LDBM_SUBENTRIES
+ if( is_entry_subentry( e ) ) {
+ /* entry is a subentry, don't allow operation */
+ rs->sr_text = "authorization entry is subentry";
+ rc = LDAP_OTHER;
+ goto done;
+ }
+#endif
+
if( is_entry_alias( e ) ) {
/* entry is an alias, don't allow operation */
rs->sr_text = "authorization entry is alias";