]> git.sur5r.net Git - openldap/commitdiff
partially revert previous commit (the "creator" special DN pattern is redundant as...
authorPierangelo Masarati <ando@openldap.org>
Mon, 15 Nov 2004 22:57:03 +0000 (22:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 15 Nov 2004 22:57:03 +0000 (22:57 +0000)
servers/slapd/acl.c
servers/slapd/aclparse.c
servers/slapd/slap.h

index b16987e4e424a710035da0d13dd58565e4acfe66..d422534d76c46ebcd0d12ae234b252bbb31eb634 100644 (file)
@@ -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;
index 0f7850359962822988a4d9762c4ff1bd72e0874b..69bf5db066ec8a9905be0f668744dad9bd8c7c86 100644 (file)
@@ -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 )
                "<what> ::= * | [dn[.<dnstyle>]=<DN>] [filter=<filter>] [attrs=<attrlist>]\n"
                "<attrlist> ::= <attr> [val[.<style>]=<value>] | <attr> , <attrlist>\n"
                "<attr> ::= <attrname> | entry | children\n",
-               "<who> ::= [ * | anonymous | users | self | creator | dn[.<dnstyle>]=<DN> ]\n"
+               "<who> ::= [ * | anonymous | users | self | dn[.<dnstyle>]=<DN> ]\n"
                        "\t[dnattr=<attrname>]\n"
                        "\t[group[/<objectclass>[/<attrname>]][.<style>]=<group>]\n"
                        "\t[peername[.<peernamestyle>]=<peer>] [sockname[.<style>]=<name>]\n"
@@ -2032,8 +2027,7 @@ print_access( Access *b )
                if ( ber_bvccmp( &b->a_dn_pat, '*' ) ||
                        b->a_dn_style == ACL_STYLE_ANONYMOUS /* strcmp( b->a_dn_pat.bv_val, "anonymous" ) == 0 */ ||
                        b->a_dn_style == ACL_STYLE_USERS /* strcmp( b->a_dn_pat.bv_val, "users" ) == 0 */ ||
-                       b->a_dn_style == ACL_STYLE_SELF /* strcmp( b->a_dn_pat.bv_val, "self" ) == 0 */ ||
-                       b->a_dn_style == ACL_STYLE_CREATOR /* strcmp( b->a_dn_pat.bv_val, "creator" ) == 0 */ )
+                       b->a_dn_style == ACL_STYLE_SELF /* strcmp( b->a_dn_pat.bv_val, "self" ) == 0 */ )
                {
                        fprintf( stderr, " %s", b->a_dn_pat.bv_val );
 
index fd37cf3881853922f27f8b086d1a5460398b0d65..2ec8b7ec7a2235689ae21b91ffe291f72f1b78c3 100644 (file)
@@ -1139,7 +1139,6 @@ typedef enum slap_style_e {
        ACL_STYLE_ANONYMOUS,
        ACL_STYLE_USERS,
        ACL_STYLE_SELF,
-       ACL_STYLE_CREATOR,
        ACL_STYLE_IP,
        ACL_STYLE_PATH
 } slap_style_t;