mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#6109 fix readonly restriction
This commit is contained in:
parent
aa9e241581
commit
01b0ca7603
@ -1296,7 +1296,8 @@ backend_check_restrictions(
|
||||
}
|
||||
|
||||
if( ( restrictops & opflag )
|
||||
|| ( exopflag && ( restrictops & exopflag ) ) ) {
|
||||
|| ( exopflag && ( restrictops & exopflag ) )
|
||||
|| (( restrictops & SLAP_RESTRICT_READONLY ) && updateop )) {
|
||||
if( ( restrictops & SLAP_RESTRICT_OP_MASK) == SLAP_RESTRICT_OP_READS ) {
|
||||
rs->sr_text = "read operations restricted";
|
||||
} else if ( restrictops & exopflag ) {
|
||||
|
@ -896,8 +896,7 @@ config_generic(ConfigArgs *c) {
|
||||
if ( !c->rvalue_vals ) rc = 1;
|
||||
break;
|
||||
case CFG_RO:
|
||||
c->value_int = (c->be->be_restrictops & SLAP_RESTRICT_OP_WRITES) ==
|
||||
SLAP_RESTRICT_OP_WRITES;
|
||||
c->value_int = (c->be->be_restrictops & SLAP_RESTRICT_READONLY);
|
||||
break;
|
||||
case CFG_AZPOLICY:
|
||||
c->value_string = ch_strdup( slap_sasl_getpolicy());
|
||||
@ -1469,9 +1468,9 @@ config_generic(ConfigArgs *c) {
|
||||
|
||||
case CFG_RO:
|
||||
if(c->value_int)
|
||||
c->be->be_restrictops |= SLAP_RESTRICT_OP_WRITES;
|
||||
c->be->be_restrictops |= SLAP_RESTRICT_READONLY;
|
||||
else
|
||||
c->be->be_restrictops &= ~SLAP_RESTRICT_OP_WRITES;
|
||||
c->be->be_restrictops &= ~SLAP_RESTRICT_READONLY;
|
||||
break;
|
||||
|
||||
case CFG_AZPOLICY:
|
||||
|
Loading…
Reference in New Issue
Block a user