From: Pierangelo Masarati Date: Mon, 3 Mar 2003 23:06:58 +0000 (+0000) Subject: apply a different fix for ITS#2342 X-Git-Tag: NO_SLAP_OP_BLOCKS~193 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=118bf1e9f95f1a3b5c147dad6afbb936c9b06e89;p=openldap apply a different fix for ITS#2342 --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 081fe2a58e..6aa83ee433 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -1504,7 +1504,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 ); @@ -1534,7 +1546,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 );