aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-04-13 13:04:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-13 13:04:05 +0200
commita3de0b3b86deb37c2adc993c6357c1a31b7ecb5b (patch)
tree19aa5e71448b03b2aea9aa2cad42a9a5d9066dc1 /loginutils
parent335681ca8e39144fa19814f7ba10d0fe760e4055 (diff)
downloadbusybox-a3de0b3b86deb37c2adc993c6357c1a31b7ecb5b.tar.gz
libbb: make check_password() also return CHECKPASS_PW_HAS_EMPTY_PASSWORD
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c2
-rw-r--r--loginutils/su.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 661a87448..be05def09 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -486,7 +486,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
if (opt & LOGIN_OPT_f)
break; /* -f USER: success without asking passwd */
- if (pw->pw_uid == 0 && !check_securetty(short_tty))
+ if (pw->pw_uid == 0 && !is_tty_secure(short_tty))
goto auth_failed;
/* Don't check the password if password entry is empty (!) */
diff --git a/loginutils/su.c b/loginutils/su.c
index f2cd799ae..ef74aa77d 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -134,7 +134,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
if (r > 0) {
if (ENABLE_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY
&& r == CHECKPASS_PW_HAS_EMPTY_PASSWORD
- && !check_securetty(tty)
+ && !is_tty_secure(tty)
) {
goto fail;
}