mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Apply ACLs to front end objects (root DSE, subschema) consistently
This commit is contained in:
parent
0c13c5bbdd
commit
f10028ba06
@ -103,11 +103,18 @@ access_allowed(
|
|||||||
e->e_dn, attr );
|
e->e_dn, attr );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert( be != NULL );
|
|
||||||
assert( e != NULL );
|
assert( e != NULL );
|
||||||
assert( attr != NULL );
|
assert( attr != NULL );
|
||||||
assert( access > ACL_NONE );
|
assert( access > ACL_NONE );
|
||||||
|
|
||||||
|
if ( op == NULL ) {
|
||||||
|
/* no-op call */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( be == NULL ) be = &backends[0];
|
||||||
|
assert( be != NULL );
|
||||||
|
|
||||||
/* grant database root access */
|
/* grant database root access */
|
||||||
if ( be != NULL && be_isroot( be, op->o_ndn ) ) {
|
if ( be != NULL && be_isroot( be, op->o_ndn ) ) {
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
@ -234,7 +234,7 @@ test_ava_filter(
|
|||||||
int i;
|
int i;
|
||||||
Attribute *a;
|
Attribute *a;
|
||||||
|
|
||||||
if ( be != NULL && ! access_allowed( be, conn, op, e,
|
if ( !access_allowed( be, conn, op, e,
|
||||||
ava->aa_desc, ava->aa_value, ACL_SEARCH ) )
|
ava->aa_desc, ava->aa_value, ACL_SEARCH ) )
|
||||||
{
|
{
|
||||||
return LDAP_INSUFFICIENT_ACCESS;
|
return LDAP_INSUFFICIENT_ACCESS;
|
||||||
@ -319,8 +319,7 @@ test_presence_filter(
|
|||||||
AttributeDescription *desc
|
AttributeDescription *desc
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( be != NULL && ! access_allowed( be, conn, op, e,
|
if ( !access_allowed( be, conn, op, e, desc, NULL, ACL_SEARCH ) )
|
||||||
desc, NULL, ACL_SEARCH ) )
|
|
||||||
{
|
{
|
||||||
return LDAP_INSUFFICIENT_ACCESS;
|
return LDAP_INSUFFICIENT_ACCESS;
|
||||||
}
|
}
|
||||||
@ -440,7 +439,7 @@ test_substrings_filter(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if ( be != NULL && ! access_allowed( be, conn, op, e,
|
if ( !access_allowed( be, conn, op, e,
|
||||||
f->f_sub_desc, NULL, ACL_SEARCH ) )
|
f->f_sub_desc, NULL, ACL_SEARCH ) )
|
||||||
{
|
{
|
||||||
return LDAP_INSUFFICIENT_ACCESS;
|
return LDAP_INSUFFICIENT_ACCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user