aboutsummaryrefslogtreecommitdiff
path: root/loginutils/passwd.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-07 15:08:12 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-07 15:08:12 +0200
commit77cb6b99a436c20bb171e6cdad7b8b8b5ce3692c (patch)
treed00b5b460baa99be5547a2236790dbea31f90a5d /loginutils/passwd.c
parent2f094ae82106e91cb210e79ddc2e5285377b549e (diff)
downloadbusybox-w32-77cb6b99a436c20bb171e6cdad7b8b8b5ce3692c.tar.gz
busybox-w32-77cb6b99a436c20bb171e6cdad7b8b8b5ce3692c.tar.bz2
busybox-w32-77cb6b99a436c20bb171e6cdad7b8b8b5ce3692c.zip
libbb: rename bb_ask -> bb_ask_noecho, bb_ask_confirmation -> bb_ask_y_confirmation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils/passwd.c')
-rw-r--r--loginutils/passwd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index 3e1ef9abf..02303b575 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -52,7 +52,7 @@ static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo
52 if (myuid != 0 && pw->pw_passwd[0]) { 52 if (myuid != 0 && pw->pw_passwd[0]) {
53 char *encrypted; 53 char *encrypted;
54 54
55 orig = bb_ask_stdin("Old password: "); /* returns ptr to static */ 55 orig = bb_ask_noecho_stdin("Old password: "); /* returns ptr to static */
56 if (!orig) 56 if (!orig)
57 goto err_ret; 57 goto err_ret;
58 encrypted = pw_encrypt(orig, pw->pw_passwd, 1); /* returns malloced str */ 58 encrypted = pw_encrypt(orig, pw->pw_passwd, 1); /* returns malloced str */
@@ -65,11 +65,11 @@ static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo
65 if (ENABLE_FEATURE_CLEAN_UP) 65 if (ENABLE_FEATURE_CLEAN_UP)
66 free(encrypted); 66 free(encrypted);
67 } 67 }
68 orig = xstrdup(orig); /* or else bb_ask_stdin() will destroy it */ 68 orig = xstrdup(orig); /* or else bb_ask_noecho_stdin() will destroy it */
69 newp = bb_ask_stdin("New password: "); /* returns ptr to static */ 69 newp = bb_ask_noecho_stdin("New password: "); /* returns ptr to static */
70 if (!newp) 70 if (!newp)
71 goto err_ret; 71 goto err_ret;
72 newp = xstrdup(newp); /* we are going to bb_ask_stdin() again, so save it */ 72 newp = xstrdup(newp); /* we are going to bb_ask_noecho_stdin() again, so save it */
73 if (ENABLE_FEATURE_PASSWD_WEAK_CHECK 73 if (ENABLE_FEATURE_PASSWD_WEAK_CHECK
74 && obscure(orig, newp, pw) 74 && obscure(orig, newp, pw)
75 && myuid != 0 75 && myuid != 0
@@ -77,7 +77,7 @@ static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo
77 goto err_ret; /* non-root is not allowed to have weak passwd */ 77 goto err_ret; /* non-root is not allowed to have weak passwd */
78 } 78 }
79 79
80 cp = bb_ask_stdin("Retype password: "); 80 cp = bb_ask_noecho_stdin("Retype password: ");
81 if (!cp) 81 if (!cp)
82 goto err_ret; 82 goto err_ret;
83 if (strcmp(cp, newp) != 0) { 83 if (strcmp(cp, newp) != 0) {