From: Pierangelo Masarati Date: Mon, 15 Nov 2004 22:57:03 +0000 (+0000) Subject: partially revert previous commit (the "creator" special DN pattern is redundant as... X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~298 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=947268c5ee8c9ee5820c537435914729b9bc182c;p=openldap partially revert previous commit (the "creator" special DN pattern is redundant as "dnattr" is more expressive --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index b16987e4e4..d422534d76 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -55,7 +55,6 @@ static struct berval aci_bv_public = BER_BVC("public"), aci_bv_users = BER_BVC("users"), aci_bv_self = BER_BVC("self"), - aci_bv_creator = BER_BVC("creator"), aci_bv_dnattr = BER_BVC("dnattr"), aci_bv_group = BER_BVC("group"), aci_bv_role = BER_BVC("role"), @@ -698,10 +697,10 @@ acl_mask( * the entry, OR the given dn matches the dn pattern */ /* - * NOTE: styles "anonymous", "users", "self" - * and "creator" have been moved to an enumeration, - * whose value is set in a_dn_style; however, - * the string is maintaned in a_dn_pat. + * NOTE: styles "anonymous", "users" and "self" + * have been moved to an enumeration, * whose value + * is set in a_dn_style; however, the string + * is maintaned in a_dn_pat. */ if ( b->a_dn_style == ACL_STYLE_ANONYMOUS /* bvmatch( &b->a_dn_pat, &aci_bv_anonymous ) */ ) { if ( op->o_ndn.bv_len != 0 ) { @@ -722,20 +721,6 @@ acl_mask( continue; } - } else if ( b->a_dn_style == ACL_STYLE_CREATOR /* bvmatch ( &b->a_dn_pat, &aci_bv_creator ) */ ) { - /* creator */ - Attribute *a; - - for ( a = e->e_attrs; a; a = a->a_next ) { - if ( a->a_desc == slap_schema.si_ad_creatorsName ) { - break; - } - } - - if ( a == NULL || !dn_match( &a->a_nvals[ 0 ], &op->o_ndn ) ) { - continue; - } - } else if ( b->a_dn_style == ACL_STYLE_REGEX ) { if ( !ber_bvccmp( &b->a_dn_pat, '*' ) ) { int tmp_nmatch; @@ -2415,19 +2400,6 @@ aci_mask( return 1; } - } else if ( ber_bvstrcasecmp( &aci_bv_creator, &bv ) == 0 ) { - Attribute *a; - - for ( a = e->e_attrs; a; a = a->a_next ) { - if ( a->a_desc == slap_schema.si_ad_creatorsName ) { - break; - } - } - - if ( a != NULL && dn_match( &op->o_ndn, &a->a_nvals[ 0 ] ) ) { - return 1; - } - } else if ( ber_bvstrcasecmp( &aci_bv_dnattr, &bv ) == 0 ) { Attribute *at; AttributeDescription *ad = NULL; diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 0f78503599..69bf5db066 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -647,10 +647,6 @@ parse_acl( ber_str2bv("self", STRLENOF( "self" ), 1, &bv); sty = ACL_STYLE_SELF; - } else if ( strcasecmp( argv[i], "creator" ) == 0 ) { - ber_str2bv("creator", STRLENOF( "creator" ), 1, &bv); - sty = ACL_STYLE_CREATOR; - } else if ( strcasecmp( left, "dn" ) == 0 ) { if ( sty == ACL_STYLE_REGEX ) { b->a_dn_style = ACL_STYLE_REGEX; @@ -733,7 +729,6 @@ parse_acl( sty != ACL_STYLE_ANONYMOUS && sty != ACL_STYLE_USERS && sty != ACL_STYLE_SELF && - sty != ACL_STYLE_CREATOR && expand == 0 ) { rc = dnNormalize(0, NULL, NULL, @@ -1797,7 +1792,7 @@ acl_usage( void ) " ::= * | [dn[.]=] [filter=] [attrs=]\n" " ::= [val[.