]> git.sur5r.net Git - openldap/commitdiff
This really should work... but it's no more broken than last commit
authorKurt Zeilenga <kurt@openldap.org>
Mon, 24 Dec 2001 20:20:29 +0000 (20:20 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 24 Dec 2001 20:20:29 +0000 (20:20 +0000)
servers/slapd/entry.c
servers/slapd/tools/slapcommon.c

index 78ca41f9af6f62ee41d7ee65fc3aab26466759ca..6bf1fac5358b748aae8460950d3e67f05fafa52d 100644 (file)
@@ -307,7 +307,8 @@ str2entry( char *s )
                        return NULL;
                }
 
-               e->e_nname = *ndn;
+               e->e_nname.bv_val = ndn->bv_val;
+               e->e_nname.bv_len = ndn->bv_len;
                free( ndn );
        }
 
index 7cee79bbb63001f437b7eed634a5b4af6c149e2d..ffa14fa6e4253830cc9dac93bc0ce8d64bef0ba6 100644 (file)
@@ -121,7 +121,7 @@ slap_tool_init(
                switch ( i ) {
                case 'b':
                        base.bv_val = strdup( optarg );
-                       base.bv_len = strlen( optarg );
+                       base.bv_len = strlen( base.bv_val );
 
                case 'c':       /* enable continue mode */
                        continuemode++;
@@ -226,7 +226,7 @@ slap_tool_init(
 
                if( be == NULL ) {
                        fprintf( stderr, "%s: slap_init no backend for \"%s\"\n",
-                               progname, base );
+                               progname, base.bv_val );
                        exit( EXIT_FAILURE );
                }
                /* If the named base is a glue master, operate on the
@@ -248,7 +248,8 @@ slap_tool_init(
        } else if ( dbnum < 0 || dbnum > (nbackends-1) ) {
                fprintf( stderr,
                        "Database number selected via -n is out of range\n"
-                       "Must be in the range 1 to %d (number of databases in the config file)\n",
+                       "Must be in the range 1 to %d"
+                               " (number of databases in the config file)\n",
                        nbackends );
                exit( EXIT_FAILURE );