From 9d307b424291ed7cd7c4ba1a99050ca25be88a70 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 14 Jan 2002 17:19:05 +0000 Subject: [PATCH] ITS#1530 no value replace ACL fix --- servers/slapd/acl.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 89720fcf9e..f3a51b3046 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -1091,10 +1091,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 ( bv = mlist->sml_bvalues; bv->bv_val != NULL; bv++ ) { if ( ! access_allowed( be, conn, op, e, mlist->sml_desc, bv, ACL_WRITE ) ) -- 2.39.5