ITS#1530: fix ACLs on empty replace bug

This commit is contained in:
Kurt Zeilenga 2002-01-14 17:47:39 +00:00
parent 79ee9bda40
commit 5b4b96b3b1
2 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,7 @@
OpenLDAP 2.0 Change Log
OpenLDAP 2.0.20 Engineering
Fixed slapd ACL empty replace bug (ITS#1530)
Fixed slapd ACL peername/sockname exact match bug (ITS#1516)
Fixed back-passwd db_config bug
Fixed -lldap cache debug bug (ITS#1501)

View File

@ -899,10 +899,20 @@ acl_check_modlist(
switch ( mlist->sml_op ) {
case LDAP_MOD_REPLACE:
case LDAP_MOD_ADD:
if ( mlist->sml_bvalues == NULL ) {
if ( ! access_allowed( be, conn, op, e,
mlist->sml_desc, NULL, ACL_WRITE ) )
{
return( 0 );
}
break;
}
/* fall thru */
case LDAP_MOD_ADD:
assert( mlist->sml_bvalues != NULL );
for ( i = 0; mlist->sml_bvalues[i] != NULL; i++ ) {
if ( ! access_allowed( be, conn, op, e,
mlist->sml_desc, mlist->sml_bvalues[i], ACL_WRITE ) )
@ -929,6 +939,10 @@ acl_check_modlist(
}
}
break;
default:
assert( 0 );
return( 0 );
}
}