]> 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:59:10 +0000 (16:59 -0700)
servers/slapd/slapcommon.c

index 8ce253e62d5dad25d103b9977a603d20de8dd332..e827d18c955c9031373f016356d1335b34c0e3cd 100644 (file)
@@ -779,6 +779,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;
@@ -787,11 +792,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
                 */