]> git.sur5r.net Git - openldap/commitdiff
improve tool mode selection by slapd switch
authorPierangelo Masarati <ando@openldap.org>
Fri, 16 Apr 2004 18:54:15 +0000 (18:54 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 16 Apr 2004 18:54:15 +0000 (18:54 +0000)
doc/man/man8/slapd.8
servers/slapd/main.c

index 839d830c60e85bada9b6a7113e7aad8ab65b331c..096b12eff596cea954c04a6853be1dfd062548b0 100644 (file)
@@ -7,7 +7,7 @@ slapd \- Stand-alone LDAP Daemon
 .SH SYNOPSIS
 .B LIBEXECDIR/slapd 
 .B [\-[4|6]]
-.B [\-T {a|c|d|i|p|t}]
+.B [\-T {add|auth|cat|dn|index|passwd|test}]
 .B [\-d debug\-level]
 .B [\-f slapd\-config\-file]
 .B [\-h URLs]
index bbb4374da1129046efc45833ec120395f4bf9e30..a09c61dc17d12f055d67cd6fc86be8d015a28dc0 100644 (file)
@@ -133,7 +133,8 @@ usage( char *name )
        fprintf( stderr,
                "\t-4\t\tIPv4 only\n"
                "\t-6\t\tIPv6 only\n"
-               "\t-T {acdipt}\tRun in Tool mode\n"
+               "\t-T {add|auth|cat|dn|index|passwd|test}\n"
+               "\t\t\tRun in Tool mode\n"
                "\t-c cookie\tSync cookie of consumer\n"
                "\t-d level\tDebug level" "\n"
                "\t-f filename\tConfiguration file\n"
@@ -387,7 +388,7 @@ int main( int argc, char **argv )
 
                case 'T':
                        for (i=0; tools[i].name; i++) {
-                               if ( optarg[0] == tools[i].name[4] ) {
+                               if ( strcmp( optarg, &tools[i].name[4] ) == 0 ) {
                                        rc = tools[i].func(argc, argv);
                                        MAIN_RETURN(rc);
                                }