From: Pierangelo Masarati Date: Wed, 5 Feb 2003 19:39:34 +0000 (+0000) Subject: allow 'sub' and 'subtree' in acl (fix ITS#2300) X-Git-Tag: NO_SLAP_OP_BLOCKS~432 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=381e293b4126b074b3816602521da88b9a3288b1;p=openldap allow 'sub' and 'subtree' in acl (fix ITS#2300) --- diff --git a/doc/man/man5/slapd.access.5 b/doc/man/man5/slapd.access.5 index 2ab4a3c4e3..f124f940d5 100644 --- a/doc/man/man5/slapd.access.5 +++ b/doc/man/man5/slapd.access.5 @@ -95,6 +95,8 @@ for an exact match of the entry, to indicate all the entries immediately below the .BR pattern , .B sub +or +.B subtree to indicate all the subentries of an entry including the entry itself, .B children to indicate all the subentries of an entry not including the entry itself. @@ -258,6 +260,8 @@ case apply. The .BR domain clause also allows the +.B sub +or .B subtree style, which succeeds when a fully qualified name exactly matches the .BR domain diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index f0a05a77ca..bcf96a8a27 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -185,7 +185,7 @@ parse_acl( } else if ( strcasecmp( style, "one" ) == 0 ) { a->acl_dn_style = ACL_STYLE_ONE; ber_str2bv( right, 0, 1, &a->acl_dn_pat ); - } else if ( strcasecmp( style, "subtree" ) == 0 ) { + } else if ( strcasecmp( style, "subtree" ) == 0 || strcasecmp( style, "sub" ) == 0 ) { a->acl_dn_style = ACL_STYLE_SUBTREE; ber_str2bv( right, 0, 1, &a->acl_dn_pat ); } else if ( strcasecmp( style, "children" ) == 0 ) { @@ -307,7 +307,7 @@ parse_acl( sty = ACL_STYLE_BASE; } else if ( strcasecmp( style, "one" ) == 0 ) { sty = ACL_STYLE_ONE; - } else if ( strcasecmp( style, "subtree" ) == 0 ) { + } else if ( strcasecmp( style, "subtree" ) == 0 || strcasecmp( style, "sub" ) == 0 ) { sty = ACL_STYLE_SUBTREE; } else if ( strcasecmp( style, "children" ) == 0 ) { sty = ACL_STYLE_CHILDREN; @@ -1282,7 +1282,7 @@ acl_usage( void ) "\t[aci=]\n" #endif "\t[ssf=] [transport_ssf=] [tls_ssf=] [sasl_ssf=]\n" - " ::= regex | base | exact (alias of base) | one | sub | children\n" + " ::= regex | base | exact (alias of base) | one | sub[tree] | children\n" "