ITS#7249 Disallow memberof-addcheck when memberof is global

This commit is contained in:
Ondřej Kuzník 2025-01-16 15:27:20 +00:00 committed by Quanah Gibson-Mount
parent 993f488e7b
commit f2cba910d8

View file

@ -2151,6 +2151,15 @@ mo_cf_gen( ConfigArgs *c )
case MO_ADDCHECK:
if ( c->value_int ) {
if ( SLAP_ISGLOBALOVERLAY( c->be ) ) {
snprintf( c->cr_msg, sizeof( c->cr_msg ),
"addcheck functionality not supported "
"when memberof is a global overlay",
c->argv[ 1 ] );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n",
c->log, c->cr_msg );
return 1;
}
mo->mo_flags |= MEMBEROF_FADDCHECK;
} else {