X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Faclparse.c;h=f41c702ca6f9e3efe76ce6fc861fada46f6a4b3f;hb=2ece0ee378a47df99a05a0dd0db3763bdf9bb125;hp=8d64d9aad8d9f7b4f0d16846a535acda6291122f;hpb=1bfcb4b03915b951392d3c36483b7ce84ba5a6e3;p=openldap diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 8d64d9aad8..f41c702ca6 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -279,7 +279,7 @@ parse_acl( { sty = ACL_STYLE_REGEX; } else if ( strcasecmp( style, "exact" ) == 0 ) { - sty = ACL_STYLE_BASE; + sty = ACL_STYLE_EXACT; } else if ( strcasecmp( style, "base" ) == 0 ) { sty = ACL_STYLE_BASE; } else if ( strcasecmp( style, "one" ) == 0 ) { @@ -466,7 +466,6 @@ parse_acl( } } -#if 0 if( is_object_subclass( b->a_group_oc, slap_schema.si_oc_referral ) ) { @@ -486,7 +485,6 @@ parse_acl( fname, lineno, value ); acl_usage(); } -#endif if (name && *name) { rc = slap_str2ad( right, &b->a_group_at, &text ); @@ -609,6 +607,27 @@ parse_acl( continue; } + if ( strcasecmp( left, "set" ) == 0 ) { + if( b->a_set_pat != NULL ) { + fprintf( stderr, + "%s: line %d: set attribute already specified.\n", + fname, lineno ); + acl_usage(); + } + + if ( right == NULL || *right == '\0' ) { + fprintf( stderr, + "%s: line %d: no set is defined\n", + fname, lineno ); + acl_usage(); + } + + b->a_set_style = sty; + b->a_set_pat = ch_strdup(right); + + continue; + } + #ifdef SLAPD_ACI_ENABLED if ( strcasecmp( left, "aci" ) == 0 ) { if( b->a_aci_at != NULL ) { @@ -866,7 +885,7 @@ str2accessmask( const char *str ) { slap_access_mask_t mask; - if( !isalpha(str[0]) ) { + if( !ASCII_ALPHA(str[0]) ) { int i; if ( str[0] == '=' ) {