]> git.sur5r.net Git - openldap/commitdiff
Fix slappasswd
authorKurt Zeilenga <kurt@openldap.org>
Thu, 15 Jun 2000 16:09:36 +0000 (16:09 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 15 Jun 2000 16:09:36 +0000 (16:09 +0000)
servers/slapd/tools/slappasswd.c

index b7bedd6cdc59e28703cd729fb0d4b0fe27e901e1..37c32c4e94a1e41c58e30341831a929c6f7f1269 100644 (file)
@@ -28,7 +28,7 @@ static void
 usage(const char *s)
 {
        fprintf(stderr,
-               "Usage: %s [options] dn\n"
+               "Usage: %s [options]\n"
                "  -h hash\tpassword scheme\n"
                "  -s secret\tnew password\n"
                "  -v\t\tincrease verbosity\n"
@@ -49,9 +49,6 @@ main( int argc, char *argv[] )
        struct berval passwd;
        struct berval *hash = NULL;
 
-       if (argc == 1)
-               usage (argv[0]);
-
        while( (i = getopt( argc, argv,
                "d:h:s:v" )) != EOF )
        {
@@ -87,8 +84,8 @@ main( int argc, char *argv[] )
        if( newpw == NULL ) {
                /* prompt for new password */
                char *cknewpw;
-               newpw = strdup(getpass("New password: "));
-               cknewpw = getpass("Re-enter new password: ");
+               newpw = strdup(getpassphrase("New password: "));
+               cknewpw = getpassphrase("Re-enter new password: ");
 
                if( strncmp( newpw, cknewpw, strlen(newpw) )) {
                        fprintf( stderr, "passwords do not match\n" );