]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/aclparse.c
slapi_dn_normalize() should pretty DN; slapi_dn_normalize_case() should normalize it
[openldap] / servers / slapd / aclparse.c
index f0a05a77ca3915c5c2354e104cb4c6ba6750c884..0032846346699260a925059317b70088e9a86f91 100644 (file)
@@ -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 ) {
@@ -239,7 +239,7 @@ parse_acl(
                        {
                                if ( a->acl_dn_style != ACL_STYLE_REGEX ) {
                                        struct berval bv;
-                                       rc = dnNormalize2( NULL, &a->acl_dn_pat, &bv);
+                                       rc = dnNormalize2( NULL, &a->acl_dn_pat, &bv, NULL);
                                        if ( rc != LDAP_SUCCESS ) {
                                                fprintf( stderr,
                                                        "%s: line %d: bad DN \"%s\"\n",
@@ -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;
@@ -410,7 +410,7 @@ parse_acl(
                                        }
 
                                        if ( sty != ACL_STYLE_REGEX && expand == 0 ) {
-                                               rc = dnNormalize2(NULL, &bv, &b->a_dn_pat);
+                                               rc = dnNormalize2(NULL, &bv, &b->a_dn_pat, NULL);
                                                if ( rc != LDAP_SUCCESS ) {
                                                        fprintf( stderr,
                                                                "%s: line %d: bad DN \"%s\"\n",
@@ -520,7 +520,7 @@ parse_acl(
                                                b->a_group_pat = bv;
                                        } else {
                                                ber_str2bv( right, 0, 0, &bv );
-                                               rc = dnNormalize2( NULL, &bv, &b->a_group_pat );
+                                               rc = dnNormalize2( NULL, &bv, &b->a_group_pat, NULL );
                                                if ( rc != LDAP_SUCCESS ) {
                                                        fprintf( stderr,
                                                                "%s: line %d: bad DN \"%s\"\n",
@@ -1282,7 +1282,7 @@ acl_usage( void )
                        "\t[aci=<attrname>]\n"
 #endif
                        "\t[ssf=<n>] [transport_ssf=<n>] [tls_ssf=<n>] [sasl_ssf=<n>]\n"
-               "<dnstyle> ::= regex | base | exact (alias of base) | one | sub | children\n"
+               "<dnstyle> ::= regex | base | exact (alias of base) | one | subtree | children\n"
                "<style> ::= regex | base | exact (alias of base)\n"
                "<groupflags> ::= R\n"
                "<access> ::= [self]{<level>|<priv>}\n"