X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Faclparse.c;h=567e2b63f37071d511e0c52fc0900a31a022fef7;hb=fa1f4d3c38b332fc5faf6d84911df2618ce9af09;hp=c9ae1809fe136d431487383bd6cff6ae994cb110;hpb=6459cbb7cedb281ae451448c99b3a66adaff6f46;p=openldap diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index c9ae1809fe..567e2b63f3 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2005 The OpenLDAP Foundation. + * Copyright 1998-2006 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -475,7 +475,8 @@ parse_acl( } } else if ( strncasecmp( left, "val", 3 ) == 0 ) { - char *mr; + struct berval bv; + char *mr; if ( !BER_BVISEMPTY( &a->acl_attrval ) ) { Debug( LDAP_DEBUG_ANY, @@ -491,7 +492,7 @@ parse_acl( return acl_usage(); } - ber_str2bv( right, 0, 1, &a->acl_attrval ); + ber_str2bv( right, 0, 0, &bv ); a->acl_attrval_style = ACL_STYLE_BASE; mr = strchr( left, '/' ); @@ -525,7 +526,7 @@ parse_acl( if ( style != NULL ) { if ( strcasecmp( style, "regex" ) == 0 ) { - int e = regcomp( &a->acl_attrval_re, a->acl_attrval.bv_val, + int e = regcomp( &a->acl_attrval_re, bv.bv_val, REG_EXTENDED | REG_ICASE | REG_NOSUB ); if ( e ) { char err[SLAP_TEXT_BUFLEN], @@ -553,8 +554,6 @@ parse_acl( } else if ( a->acl_attrs[0].an_desc->ad_type-> sat_syntax == slap_schema.si_syn_distinguishedName ) { - struct berval bv; - if ( !strcasecmp( style, "baseObject" ) || !strcasecmp( style, "base" ) ) { @@ -575,23 +574,18 @@ parse_acl( /* FIXME: should be an error */ snprintf( buf, sizeof( buf ), - "unknown val.