]> git.sur5r.net Git - openldap/commitdiff
ITS#7827 slapacl requires a valid suffix
authorHoward Chu <hyc@openldap.org>
Tue, 25 Mar 2014 22:18:17 +0000 (15:18 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 1 Apr 2014 23:56:13 +0000 (16:56 -0700)
servers/slapd/slapcommon.c

index ea97c51df643dfee013a8ad260e1d3fd57d223f8..01a49554ebc3cc06daf23c4c4a0f55138ace5d72 100644 (file)
@@ -786,6 +786,11 @@ slap_tool_init(
                ber_memfree( nbase.bv_val );
                BER_BVZERO( &nbase );
 
+               if( be == NULL ) {
+                       fprintf( stderr, "%s: slap_init no backend for \"%s\"\n",
+                               progname, base.bv_val );
+                       exit( EXIT_FAILURE );
+               }
                switch ( tool ) {
                case SLAPACL:
                        goto startup;
@@ -794,11 +799,6 @@ slap_tool_init(
                        break;
                }
 
-               if( be == NULL ) {
-                       fprintf( stderr, "%s: slap_init no backend for \"%s\"\n",
-                               progname, base.bv_val );
-                       exit( EXIT_FAILURE );
-               }
                /* If the named base is a glue master, operate on the
                 * entire context
                 */