]> git.sur5r.net Git - openldap/commitdiff
cosmetic changes
authorPierangelo Masarati <ando@openldap.org>
Wed, 12 Jan 2005 14:25:08 +0000 (14:25 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 12 Jan 2005 14:25:08 +0000 (14:25 +0000)
doc/man/man5/slapd.access.5
servers/slapd/acl.c
servers/slapd/aclparse.c

index 68ad715b54bea47103709b0fe8726e2ed2f51763..be14cf19fb9e821de9c067370c9d3b71cfcc11d1 100644 (file)
@@ -190,20 +190,19 @@ form is given,
 is implied, i.e. all attributes are addressed.
 .LP
 Using the form
-.B attrs=<attr> val[.<style>]=<attrval>
+.B attrs=<attr> val[.<attrstyle>]=<attrval>
 specifies access to a particular value of a single attribute.
-In this case, only a single attribute type may be given. A value
-.B <style>
-of
+In this case, only a single attribute type may be given. The
+.B <attrstyle>
 .B exact
 (the default) uses the attribute's equality matching rule to compare the
-value. If the value
-.B <style>
+value. If the
+.B <attrstyle>
 is
 .BR regex ,
 the provided value is used as a POSIX (''extended'') regular
-expression pattern.  If the attribute has DN syntax, the value
-.B <style>
+expression pattern.  If the attribute has DN syntax, the 
+.B <attrstyle>
 can be any of
 .BR base ,
 .BR onelevel ,
index 0150d1c7e9ad67b1b8f4e691054fddf22c0d1341..623f0b18a26b1fb76aedf1a97a34896e27d4a404 100644 (file)
@@ -541,8 +541,11 @@ acl_get(
                                Debug( LDAP_DEBUG_ACL,
                                        "acl_get: valpat %s\n",
                                        a->acl_attrval.bv_val, 0, 0 );
-                               if (regexec(&a->acl_attrval_re, val->bv_val, 0, NULL, 0))
+                               if ( regexec( &a->acl_attrval_re, val->bv_val, 0, NULL, 0 ) )
+                               {
                                        continue;
+                               }
+
                        } else {
                                int match = 0;
                                const char *text;
@@ -2113,8 +2116,9 @@ aci_match_set (
        int             rc = 0;
        AciSetCookie    cookie;
 
-       if (setref == 0) {
+       if ( setref == 0 ) {
                ber_dupbv_x( &set, subj, op->o_tmpmemctx );
+
        } else {
                struct berval           subjdn, ndn = BER_BVNULL;
                struct berval           setat;
@@ -2124,7 +2128,7 @@ aci_match_set (
 
                /* format of string is "entry/setAttrName" */
                if ( aci_get_part( subj, 0, '/', &subjdn ) < 0 ) {
-                       return(0);
+                       return 0;
                }
 
                if ( aci_get_part( subj, 1, '/', &setat ) < 0 ) {
index 516fa0aaca3c4e971260e30de1d86e86d5d85521..d682ef7c5178f7eba1e59a673e373eb59fa93caa 100644 (file)
@@ -504,7 +504,7 @@ parse_acl(
                                                                        a->acl_attrs[0].an_desc->ad_cname.bv_val );
                                                                a->acl_attrval_style = ACL_STYLE_BASE;
                                                        }
-                                                       
+
                                                } else {
                                                        fprintf( stderr, 
                                                                "%s: line %d: unknown val.<style> \"%s\" "
@@ -1898,7 +1898,7 @@ acl_usage( void )
                "<access clause> ::= access to <what> "
                                "[ by <who> <access> [ <control> ] ]+ \n"
                "<what> ::= * | [dn[.<dnstyle>]=<DN>] [filter=<filter>] [attrs=<attrlist>]\n"
-               "<attrlist> ::= <attr> [val[.<style>]=<value>] | <attr> , <attrlist>\n"
+               "<attrlist> ::= <attr> [val[.<attrstyle>]=<value>] | <attr> , <attrlist>\n"
                "<attr> ::= <attrname> | entry | children\n",
                "<who> ::= [ * | anonymous | users | self | dn[.<dnstyle>]=<DN> ]\n"
                        "\t[dnattr=<attrname>]\n"
@@ -1909,9 +1909,11 @@ acl_usage( void )
                        "\t[aci=<attrname>]\n"
 #endif
                        "\t[ssf=<n>] [transport_ssf=<n>] [tls_ssf=<n>] [sasl_ssf=<n>]\n",
+               "<style> ::= exact | regex | base(Object)\n"
                "<dnstyle> ::= base(Object) | one(level) | sub(tree) | children | "
                        "exact | regex\n"
-               "<style> ::= exact | regex | base(Object)\n"
+               "<attrstyle> ::= exact | regex | base(Object) | one(level) | "
+                       "sub(tree) | children\n"
                "<peernamestyle> ::= exact | regex | ip | path\n"
                "<domainstyle> ::= exact | regex | base(Object) | sub(tree)\n"
                "<access> ::= [self]{<level>|<priv>}\n"