From d5b1892ccc375c024211b1515cc49267802e6652 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 21 Jul 1999 21:08:05 +0000 Subject: [PATCH] Fix acl parse bug --- servers/slapd/aclparse.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 0aaf463d1f..83a3bee8c6 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -184,7 +184,7 @@ parse_acl( /* get */ for ( ; i < argc; i++ ) { - char* pat; + char *pat; split( argv[i], '=', &left, &right ); if ( strcasecmp( argv[i], "*" ) == 0 ) { @@ -196,6 +196,8 @@ parse_acl( } else if ( strcasecmp( left, "dn" ) == 0 ) { regtest(fname, lineno, right); pat = ch_strdup( right ); + } else { + pat = NULL; } if( pat != NULL ) { @@ -430,10 +432,11 @@ acl_usage( void ) " ::= * | [dn=] [filter=] [attrs=]\n" " ::= | , \n" " ::= | entry | children\n" - " ::= * | anonymous | self | dn=\n" - "\t| dnattr= | group[/[/]]=\n" - "\t| peername= | sockname=\n" - "\t| domain= | sockurl=\n" + " ::= [ * | anonymous | self | dn= ]\n" + "\t[dnattr=]\t" + "\t[group[/[/]]=]\n" + "\t[peername=] [sockname=]\n" + "\t[domain=] [sockurl=]\n" " ::= [self]{none|auth|compare|search|read|write}\n" ); exit( 1 ); -- 2.39.5