From 490e1e4aa90fc0f6d9b2e0796ac5e255287259df Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 9 Mar 2004 15:59:01 +0000 Subject: [PATCH] move limits check and preparation in a helper function --- servers/slapd/config.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 9460263f39..d161180a17 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -686,6 +686,15 @@ read_config( const char *fname, int depth ) } else if ( strncasecmp( cargv[0], "sasl", 4 ) == 0 ) { if ( slap_sasl_config( cargc, cargv, line, fname, lineno ) ) return 1; +#ifdef SLAP_X_SASL_REWRITE + /* use authid rewrite instead of sasl regexp */ + } else if ( strncasecmp( cargv[0], "authid-rewrite", sizeof("authid-rewrite") - 1 ) == 0 ) { + int rc = slap_sasl_rewrite_config( fname, lineno, + cargc, cargv ); + if ( rc ) { + return rc; + } +#endif /* SLAP_X_SASL_REWRITE */ } else if ( strcasecmp( cargv[0], "schemadn" ) == 0 ) { struct berval dn; @@ -784,7 +793,7 @@ read_config( const char *fname, int depth ) for ( i = 1; i < cargc; i++ ) { if ( strncasecmp( cargv[i], "size", 4 ) == 0 ) { - rc = parse_limit( cargv[i], lim ); + rc = limits_parse_one( cargv[i], lim ); if ( rc ) { #ifdef NEW_LOGGING LDAP_LOG( CONFIG, CRIT, @@ -864,7 +873,7 @@ read_config( const char *fname, int depth ) for ( i = 1; i < cargc; i++ ) { if ( strncasecmp( cargv[i], "time", 4 ) == 0 ) { - rc = parse_limit( cargv[i], lim ); + rc = limits_parse_one( cargv[i], lim ); if ( rc ) { #ifdef NEW_LOGGING LDAP_LOG( CONFIG, CRIT, @@ -932,7 +941,7 @@ read_config( const char *fname, int depth ) return( 1 ); } - if ( parse_limits( be, fname, lineno, cargc, cargv ) ) { + if ( limits_parse( be, fname, lineno, cargc, cargv ) ) { return( 1 ); } -- 2.39.5