mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix inverted bvmatch logic in modrdn
This commit is contained in:
parent
d250339576
commit
1c75a7f25c
@ -53,8 +53,8 @@ struct berval default_search_base = { 0, NULL };
|
||||
struct berval default_search_nbase = { 0, NULL };
|
||||
unsigned num_subordinates = 0;
|
||||
#ifdef SLAPD_SCHEMA_DN
|
||||
struct berval global_schemadn;
|
||||
struct berval global_schemandn;
|
||||
struct berval global_schemadn = { 0, NULL };
|
||||
struct berval global_schemandn = { 0, NULL };
|
||||
#endif
|
||||
|
||||
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
|
||||
|
@ -202,12 +202,14 @@ do_modrdn(
|
||||
goto cleanup;
|
||||
|
||||
#ifdef SLAPD_SCHEMA_DN
|
||||
} else if ( bvmatch( &ndn, &global_schemandn ) == 0 ) {
|
||||
} else if ( bvmatch( &ndn, &global_schemandn ) ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR,
|
||||
"do_modrdn: attempt to modify subschema subentry\n", 0, 0, 0 );
|
||||
"do_modrdn: attempt to modify subschema subentry: %s (%ld)\n",
|
||||
global_schemandn.bv_val, (long) global_schemandn.bv_len, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY, "do_modrdn: subschema subentry!\n", 0, 0, 0 );
|
||||
Debug( LDAP_DEBUG_ANY, "do_modrdn: subschema subentry: %s (%ld)\n",
|
||||
global_schemandn.bv_val, (long) global_schemandn.bv_len, 0 );
|
||||
#endif
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
|
||||
|
@ -341,7 +341,7 @@ LDAP_SLAPD_F (void) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
|
||||
*/
|
||||
|
||||
#define dn_match(dn1, dn2) ( ber_bvcmp((dn1), (dn2)) == 0 )
|
||||
#define bvmatch(bv1, bv2) ( ((bv1)->bv_len == (bv2)->bv_len) && memcmp((bv1)->bv_val, (bv2)->bv_val, (bv1)->bv_len) == 0 )
|
||||
#define bvmatch(bv1, bv2) ( ((bv1)->bv_len == (bv2)->bv_len) && (memcmp((bv1)->bv_val, (bv2)->bv_val, (bv1)->bv_len) == 0) )
|
||||
|
||||
LDAP_SLAPD_V( const struct berval ) slap_empty_bv;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user