ITS#6109 fix readonly restriction

This commit is contained in:
Howard Chu 2009-05-17 22:23:33 +00:00
parent aa9e241581
commit 01b0ca7603
2 changed files with 5 additions and 5 deletions

View File

@ -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 ) {

View File

@ -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: