mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
Fix slapi_dn_beparent() behaviour (again)
This commit is contained in:
parent
f0101fe5a7
commit
2b5cf310e6
1 changed files with 5 additions and 3 deletions
|
|
@ -952,6 +952,8 @@ char *slapi_dn_beparent( Slapi_PBlock *pb, const char *_dn )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PBLOCK_ASSERT_OP( pb, 0 );
|
||||
|
||||
if ( slapi_is_rootdse( _dn ) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -963,7 +965,7 @@ char *slapi_dn_beparent( Slapi_PBlock *pb, const char *_dn )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
be = select_backend( &dn, 0, 0 );
|
||||
be = select_backend( &pb->pb_op->o_req_ndn, 0, 0 );
|
||||
|
||||
if ( be == NULL || be_issuffix( be, &normalizedDN ) == 0 ) {
|
||||
dnParent( &prettyDN, &parentDN );
|
||||
|
|
@ -972,8 +974,8 @@ char *slapi_dn_beparent( Slapi_PBlock *pb, const char *_dn )
|
|||
parent = slapi_ch_strdup( parentDN.bv_val );
|
||||
}
|
||||
|
||||
slapi_ch_free( (void **)&prettyDN.bv_val );
|
||||
slapi_ch_free( (void **)&normalizedDN.bv_val );
|
||||
slapi_ch_free_string( &prettyDN.bv_val );
|
||||
slapi_ch_free_string( &normalizedDN.bv_val );
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue