From ba37cbc233a791cde63b4e9e08b8fb5e95963ba4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 6 Nov 2000 15:53:02 +0000 Subject: [PATCH] Fix passwd clearing bug --- clients/tools/ldapdelete.c | 2 +- clients/tools/ldapmodify.c | 2 +- clients/tools/ldapmodrdn.c | 4 ++-- clients/tools/ldappasswd.c | 6 +++--- clients/tools/ldapsearch.c | 2 +- servers/slapd/tools/slappasswd.c | 3 ++- 6 files changed, 10 insertions(+), 9 deletions(-) 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'; } } -- 2.39.5