From: Kurt Zeilenga Date: Mon, 6 Nov 2000 15:53:02 +0000 (+0000) Subject: Fix passwd clearing bug X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1653 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ba37cbc233a791cde63b4e9e08b8fb5e95963ba4;p=openldap Fix passwd clearing bug --- diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 660ba44c28..2bbb3c826f 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -376,7 +376,7 @@ main( int argc, char **argv ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 3eb7d1f597..3851ad550d 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -436,7 +436,7 @@ main( int argc, char **argv ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index fe225d9af4..3ab276dc33 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -113,7 +113,7 @@ main(int argc, char **argv) infile = NULL; not = contoper = verbose = remove = want_bindpw = debug = manageDSAit = referrals = 0; - authmethod = LDAP_AUTH_SIMPLE; + authmethod = -1; version = -1; prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1; @@ -398,7 +398,7 @@ main(int argc, char **argv) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 098b1a778b..667d10ec39 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -124,7 +124,7 @@ main( int argc, char *argv[] ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } @@ -139,7 +139,7 @@ main( int argc, char *argv[] ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } @@ -397,7 +397,7 @@ main( int argc, char *argv[] ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index a7d55c44b6..28571422cd 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -507,7 +507,7 @@ main( int argc, char **argv ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } } diff --git a/servers/slapd/tools/slappasswd.c b/servers/slapd/tools/slappasswd.c index 7222b13db2..64b7a1be5e 100644 --- a/servers/slapd/tools/slappasswd.c +++ b/servers/slapd/tools/slappasswd.c @@ -56,6 +56,7 @@ main( int argc, char *argv[] ) switch (i) { case 'h': /* scheme */ scheme = strdup (optarg); + break; case 's': /* new password (secret) */ newpw = strdup (optarg); @@ -63,7 +64,7 @@ main( int argc, char *argv[] ) { char* p; - for( p = optarg; *p == '\0'; p++ ) { + for( p = optarg; *p != '\0'; p++ ) { *p = '\0'; } }