]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#1497 use strcmp instead of strncmp
authorHoward Chu <hyc@openldap.org>
Mon, 17 Dec 2001 21:56:24 +0000 (21:56 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 17 Dec 2001 21:56:24 +0000 (21:56 +0000)
clients/tools/ldappasswd.c
servers/slapd/tools/slappasswd.c

index f161ac79ad927d905520f763c5bc97220f36f80f..7e61aebf0956dda79564a1d3185c4023d09a3fbc 100644 (file)
@@ -510,7 +510,7 @@ main( int argc, char *argv[] )
                ckoldpw = getpassphrase("Re-enter old password: ");
 
                if( oldpw== NULL || ckoldpw == NULL ||
-                       strncmp( oldpw, ckoldpw, strlen(oldpw) ))
+                       strcmp( oldpw, ckoldpw ))
                {
                        fprintf( stderr, "passwords do not match\n" );
                        return EXIT_FAILURE;
@@ -524,7 +524,7 @@ main( int argc, char *argv[] )
                cknewpw = getpassphrase("Re-enter new password: ");
 
                if( newpw== NULL || cknewpw == NULL ||
-                       strncmp( newpw, cknewpw, strlen(newpw) ))
+                       strcmp( newpw, cknewpw ))
                {
                        fprintf( stderr, "passwords do not match\n" );
                        return EXIT_FAILURE;
index 98d859a32eb4b41d0c0c5281bfef5dbd39415f26..639b8a3f2dfe87643315bd283b8a0ab87c6ff304 100644 (file)
@@ -97,7 +97,7 @@ main( int argc, char *argv[] )
                newpw = strdup(getpassphrase("New password: "));
                cknewpw = getpassphrase("Re-enter new password: ");
 
-               if( strncmp( newpw, cknewpw, strlen(newpw) )) {
+               if( strcmp( newpw, cknewpw )) {
                        fprintf( stderr, "Password values do not match\n" );
                        return EXIT_FAILURE;
                }