]> git.sur5r.net Git - openldap/commitdiff
More from jon@symas.com - argv[0] comparison must exclude EXEEXT.
authorHoward Chu <hyc@openldap.org>
Wed, 12 Dec 2001 00:26:42 +0000 (00:26 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 12 Dec 2001 00:26:42 +0000 (00:26 +0000)
clients/tools/ldapmodify.c

index 82390b7fdd8c2861b19d8639742088bc4afd2555..1c18b176a2a278687824b6e39e2cbcc97d07a868 100644 (file)
@@ -151,7 +151,8 @@ main( int argc, char **argv )
     /* Print usage when no parameters */
     if( argc < 2 ) usage( prog );
 
-    ldapadd = ( strcmp( prog, "ldapadd" ) == 0 );
+       /* strncmp instead of strcmp since NT binaries carry .exe extension */
+    ldapadd = ( strncmp( prog, "ldapadd", 7 ) == 0 );
 
     infile = NULL;
     not = verbose = want_bindpw = debug = manageDSAit = referrals = 0;