From a3de0b3b86deb37c2adc993c6357c1a31b7ecb5b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 13 Apr 2017 13:04:05 +0200 Subject: libbb: make check_password() also return CHECKPASS_PW_HAS_EMPTY_PASSWORD Signed-off-by: Denys Vlasenko --- loginutils/login.c | 2 +- loginutils/su.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'loginutils') 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; } -- cgit v1.2.3