diff options
author | Denys Vlasenko | 2013-11-19 13:09:06 +0100 |
---|---|---|
committer | Denys Vlasenko | 2013-11-19 13:09:06 +0100 |
commit | 9c1c605b1a8f34aef347bd9c2e4aea251e556d1b (patch) | |
tree | 1854674f7025a8679bd42bd4f056d22a6df891a3 /include | |
parent | f6beef63c64abfc126ea4e73147af29d152f1a9e (diff) | |
download | busybox-9c1c605b1a8f34aef347bd9c2e4aea251e556d1b.zip busybox-9c1c605b1a8f34aef347bd9c2e4aea251e556d1b.tar.gz |
sulogin: use common password-checking routine.
This needed some extensions correct_passwd() function,
which got renamed ask_and_check_password() to better describe what it does.
function old new delta
ask_and_check_password_extended - 215 +215
ask_and_check_password - 12 +12
vlock_main 394 397 +3
sulogin_main 494 326 -168
correct_password 207 - -207
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/1 up/down: 230/-375) Total: -145 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 5827165..e99bb92 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1301,7 +1301,8 @@ int sd_listen_fds(void); #define SETUP_ENV_TO_TMP (1 << 2) #define SETUP_ENV_NO_CHDIR (1 << 4) extern void setup_environment(const char *shell, int flags, const struct passwd *pw) FAST_FUNC; -extern int correct_password(const struct passwd *pw) FAST_FUNC; +extern int ask_and_check_password_extended(const struct passwd *pw, int timeout, const char *prompt) FAST_FUNC; +extern int ask_and_check_password(const struct passwd *pw) FAST_FUNC; /* Returns a malloced string */ #if !ENABLE_USE_BB_CRYPT #define pw_encrypt(clear, salt, cleanup) pw_encrypt(clear, salt) |