]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Fix maxDeref directive
[openldap] / servers / slapd / config.c
index ce402b1c8cc15148490c88ea89942b6ae6b4a4b9..3a9e7b4d61dd193ab94cb6132b3259d83c7f8c4e 100644 (file)
@@ -21,7 +21,7 @@
  */
 int            defsize = SLAPD_DEFAULT_SIZELIMIT;
 int            deftime = SLAPD_DEFAULT_TIMELIMIT;
-struct acl     *global_acl = NULL;
+AccessControl  *global_acl = NULL;
 int            global_default_access = ACL_READ;
 char           *replogfile;
 int            global_lastmod;
@@ -45,8 +45,10 @@ read_config( char *fname )
        char    *line, *savefname, *saveline;
        int     cargc, savelineno;
        char    *cargv[MAXARGS];
-       int     lineno, i, rc;
-
+       int     lineno, i;
+#ifdef HAVE_TLS
+       int rc;
+#endif
        struct berval *vals[2];
        struct berval val;
 
@@ -220,7 +222,7 @@ read_config( char *fname )
                                char *dn = ch_strdup( cargv[1] );
                                (void) dn_normalize( dn );
                                charray_add( &be->be_suffix, dn );
-                               (void) dn_upcase( dn );
+                               (void) str2upper( dn );
                                charray_add( &be->be_nsuffix, dn );
                                free( dn );
                        }
@@ -238,7 +240,7 @@ read_config( char *fname )
                                Debug( LDAP_DEBUG_ANY,
 "%s: line %d: depth line must appear inside a database definition (ignored)\n",
                                    fname, lineno, 0 );
-                       } else if ((i = atoi(cargv[i])) < 0) {
+                       } else if ((i = atoi(cargv[1])) < 0) {
                                Debug( LDAP_DEBUG_ANY,
 "%s: line %d: depth must be positive (ignored)\n",
                                    fname, lineno, 0 );
@@ -588,47 +590,53 @@ read_config( char *fname )
 #endif /*SLAPD_MODULES*/
 
 #ifdef HAVE_TLS
-               } else if ( !strcasecmp( cargv[0], "SSLProtocol" ) ) {
+               } else if ( !strcasecmp( cargv[0], "TLSProtocol" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_PROTOCOL,
                                                      cargv[1] );
                        if ( rc )
                                return rc;
 
-               } else if ( !strcasecmp( cargv[0], "SSLCipherSuite" ) ) {
+               } else if ( !strcasecmp( cargv[0], "TLSCipherSuite" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_CIPHER_SUITE,
                                                      cargv[1] );
                        if ( rc )
                                return rc;
 
-               } else if ( !strcasecmp( cargv[0], "SSLCertificateFile" ) ) {
+               } else if ( !strcasecmp( cargv[0], "TLSCertificateFile" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_CERTFILE,
                                                      cargv[1] );
                        if ( rc )
                                return rc;
 
-               } else if ( !strcasecmp( cargv[0], "SSLCertificateKeyFile" ) ) {
+               } else if ( !strcasecmp( cargv[0], "TLSCertificateKeyFile" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_KEYFILE,
                                                      cargv[1] );
                        if ( rc )
                                return rc;
 
-               } else if ( !strcasecmp( cargv[0], "SSLCACertificatePath" ) ) {
+               } else if ( !strcasecmp( cargv[0], "TLSCACertificatePath" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_CACERTDIR,
                                                      cargv[1] );
                        if ( rc )
                                return rc;
 
-               } else if ( !strcasecmp( cargv[0], "SSLCACertificateFile" ) ) {
+               } else if ( !strcasecmp( cargv[0], "TLSCACertificateFile" ) ) {
                        rc = ldap_pvt_tls_set_option( NULL,
                                                      LDAP_OPT_X_TLS_CACERTFILE,
                                                      cargv[1] );
                        if ( rc )
                                return rc;
+               } else if ( !strcasecmp( cargv[0], "TLSVerifyClient" ) ) {
+                       rc = ldap_pvt_tls_set_option( NULL,
+                                                     LDAP_OPT_X_TLS_REQUIRE_CERT,
+                                                     cargv[1] );
+                       if ( rc )
+                               return rc;
 
 #endif