]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm pw: Use t_askpass() instead of getpass()
authorPascal Volk <user@localhost.localdomain.org>
Sat, 17 Oct 2009 20:27:09 +0000 (20:27 +0000)
committerPascal Volk <user@localhost.localdomain.org>
Sat, 17 Oct 2009 20:27:09 +0000 (20:27 +0000)
--HG--
branch : HEAD

src/doveadm/doveadm-pw.c

index 10ef833eb5fc9329710eca4af7109e4e991e62b7..3bbae6d5fa9ff3dc8ff2c004271e6078eef5f8c9 100644 (file)
@@ -5,6 +5,7 @@
 #include "password-scheme.h"
 #include "randgen.h"
 #include "doveadm.h"
+#include "askpass.h"
 
 #include <ctype.h>
 #include <fcntl.h>
@@ -67,8 +68,8 @@ static void cmd_pw(int argc, char *argv[])
                const char *check;
                static int lives = 3;
 
-               plaintext = t_strdup(getpass("Enter new password: "));
-               check = t_strdup(getpass("Retype new password: "));
+               plaintext = t_askpass("Enter new password: ");
+               check = t_askpass("Retype new password: ");
                if (strcmp(plaintext, check) != 0) {
                        fprintf(stderr, "Passwords don't match!\n");
                        if (--lives == 0)