From: Kurt Zeilenga Date: Thu, 6 Mar 2003 00:37:29 +0000 (+0000) Subject: attributetype/objectclass no args fix X-Git-Tag: OPENLDAP_REL_ENG_2_1_15~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0db680fde0d816d92165fa9e9042f486c97ea8b;p=thirdparty%2Fopenldap.git attributetype/objectclass no args fix --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 5ac38071fe..b87ec56645 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -1505,7 +1505,19 @@ read_config( const char *fname, int depth ) /* specify an objectclass */ } else if ( strcasecmp( cargv[0], "objectclass" ) == 0 ) { - if ( *cargv[1] == '(' /*')'*/) { + if ( cargc < 2 ) { +#ifdef NEW_LOGGING + LDAP_LOG( CONFIG, INFO, + "%s: line %d: illegal objectclass format.\n", + fname, lineno , 0 ); +#else + Debug( LDAP_DEBUG_ANY, + "%s: line %d: illegal objectclass format.\n", + fname, lineno, 0 ); +#endif + return( 1 ); + + } else if ( *cargv[1] == '(' /*')'*/) { char * p; p = strchr(saveline,'(' /*')'*/); rc = parse_oc( fname, lineno, p, cargv ); @@ -1535,7 +1547,19 @@ read_config( const char *fname, int depth ) } else if (( strcasecmp( cargv[0], "attributetype" ) == 0 ) || ( strcasecmp( cargv[0], "attribute" ) == 0 )) { - if ( *cargv[1] == '(' /*')'*/) { + if ( cargc < 2 ) { +#ifdef NEW_LOGGING + LDAP_LOG( CONFIG, INFO, "%s: line %d: " + "illegal attribute type format.\n", + fname, lineno , 0 ); +#else + Debug( LDAP_DEBUG_ANY, "%s: line %d: " + "illegal attribute type format.\n", + fname, lineno, 0 ); +#endif + return( 1 ); + + } else if ( *cargv[1] == '(' /*')'*/) { char * p; p = strchr(saveline,'(' /*')'*/); rc = parse_at( fname, lineno, p, cargv );