aboutsummaryrefslogtreecommitdiff
path: root/libbb/bb_askpass.c
AgeCommit message (Collapse)Author
2021-02-03libbb: introduce and use fputs_stdoutRon Yorston
function old new delta fputs_stdout - 12 +12 zxc_vm_process 7237 7230 -7 yes_main 85 78 -7 write_block 380 373 -7 wrapf 305 298 -7 strings_main 437 430 -7 show_bridge 353 346 -7 rev_main 384 377 -7 put_prompt_custom 58 51 -7 put_cur_glyph_and_inc_cursor 168 161 -7 print_numbered_lines 152 145 -7 print_named_ascii 130 123 -7 print_name 135 128 -7 print_login_issue 386 379 -7 print_ascii 208 201 -7 powertop_main 1249 1242 -7 od_main 1789 1782 -7 logread_main 518 511 -7 head_main 804 797 -7 display_process_list 1319 1312 -7 cut_main 1002 995 -7 bb_dump_dump 1550 1543 -7 bb_ask_noecho 393 386 -7 baseNUM_main 702 695 -7 expand_main 755 745 -10 dumpleases_main 497 487 -10 write1 12 - -12 putcsi 37 23 -14 print_login_prompt 55 41 -14 paste_main 525 511 -14 cat_main 440 426 -14 print_it 245 230 -15 print_addrinfo 1188 1171 -17 print_rule 770 750 -20 print_linkinfo 842 822 -20 httpd_main 791 771 -20 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/34 up/down: 12/-341) Total: -329 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-07libbb: switch bb_ask_noecho() to "mallocing" string return APIDenys Vlasenko
function old new delta bb_ask_noecho 313 330 +17 get_cred_or_die 125 115 -10 passwd_main 995 958 -37 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 17/-47) Total: -30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-07libbb: rename bb_ask -> bb_ask_noecho, bb_ask_confirmation -> ↵Denys Vlasenko
bb_ask_y_confirmation Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-07telnet: move winsize detection closer to I/O loop, delete non-functioning ↵Denys Vlasenko
debug code Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-05whitespace and comment format fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-09use auto_string() where appropriate to kill a few staticsDenys Vlasenko
Custom linker script 'busybox_ldscript' found, using it function old new delta static.str 4 - -4 static.passwd 4 0 -4 bb_ask 322 311 -11 ether_print 63 47 -16 UNSPEC_print 82 66 -16 INET_sprint 59 38 -21 INET6_sprint 54 30 -24 make_human_readable_str 292 235 -57 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/7 up/down: 0/-153) Total: -153 bytes text data bss dec hex filename 939880 992 17480 958352 e9f90 busybox_old 939736 992 17456 958184 e9ee8 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-07-01libbb: fix bb_ask() to flush input before prompt, not after. Closes 7190Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-21sulogin: allow system maintenance login if root password is emptyJonathan Liu
The current password checking is unable to distinguish between the user entering an empty password or pressing Control-D. As a result, an empty password always results in normal startup. We modify bb_ask to return NULL if Control-D is pressed without entering a password. The sulogin applet is then modified to only proceed to normal startup if bb_ask returns NULL. This covers EOF with no password, interrupt by timeout and ^C. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-22getty,login: tighten up handling of ctty, pgrp, and tty attr restoring on ↵Denys Vlasenko
timeout Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-03libbb: fix bb_ask() to operate on correct fdDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-01remove now-unneeded memsetDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-01make echo -e "foo\nfoo" | passwd USER workDenys Vlasenko
Suggested by Michael Zhu (linuxsir320 AT gmail.com) function old new delta bb_ask 333 340 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02*: introduce and use ffulsh_all()Denys Vlasenko
function old new delta buffer_fill_and_print 179 196 +17 fflush_all - 9 +9 spawn 87 92 +5 rtcwake_main 455 453 -2 ... alarm_intr 93 84 -9 readcmd 1072 1062 -10 bb_ask 345 333 -12 more_main 845 832 -13 flush_stdout_stderr 42 23 -19 xfflush_stdout 27 - -27 flush_stderr 30 - -30 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05Patches to enable FreeBSD buildDenys Vlasenko
platform.h: fix wrong check for endianness, fix lchown aliasing to chown on uclibc. Code seems to not be affected in my testing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2008-12-03- add new applet mkpasswd(1)Bernhard Reutner-Fischer
function old new delta bb_ask - 355 +355 mkpasswd_main - 296 +296 .rodata 121746 121847 +101 packed_usage 24632 24689 +57 static.methods - 21 +21 gmatch 229 248 +19 bb_ask_stdin - 11 +11 applet_names 1949 1958 +9 applet_main 1172 1176 +4 sulogin_main 503 505 +2 applet_nameofs 586 588 +2 sha256_hash 329 327 -2 correct_password 208 206 -2 parse_command 1442 1439 -3 get_cred_or_die 145 141 -4 passwd_main 1054 1044 -10 bb_askpass 348 - -348 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 7/5 up/down: 877/-369) Total: 508 bytes
2008-11-25ash,hush: add TODO for rare build failureDenis Vlasenko
*: remove some redundant includes
2008-11-05*: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, ↵Denis Vlasenko
xx) op function old new delta tcsetattr_stdin_TCSANOW - 14 +14 set_sane_term 116 113 -3 top_main 1277 1273 -4 make_new_session 421 415 -6 rawmode 133 126 -7 reset_term 18 10 -8 die 43 35 -8 cookmode 62 54 -8 vlock_main 425 415 -10 read_line_input 3165 3155 -10 bb_askpass 357 347 -10 fsck_minix_main 3079 3065 -14 getty_main 2375 2332 -43 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131) Total: -117 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-27*: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko
text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
2008-03-12libbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_setDenis Vlasenko
signal_SA_RESTART_empty_mask - 65 +65 signal_no_SA_RESTART_empty_mask - 54 +54 dd_main 1325 1369 +44 sigaction_set - 19 +19 dname_enc 373 377 +4 UNSPEC_print 64 66 +2 setsignal 296 294 -2 bb_signals_recursive 95 92 -3 bb_askpass 367 361 -6 inetd_main 1810 1797 -13 rx_main 912 883 -29 sigdelset 32 - -32 __sigdelset 32 - -32 __GI_sigdelset 32 - -32 sighup_handler 84 37 -47 arping_main 1844 1797 -47 fsck_main 1869 1807 -62 run_list 1917 1844 -73 vlock_main 492 409 -83 progressmeter 883 798 -85 handle_incoming_and_exit 2737 2651 -86 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 3/12 up/down: 188/-632) Total: -444 bytes
2007-10-20bb_askpass: handle Ctrl-C, restore termoios on Ctrl-C.Denis Vlasenko
sulogin: remove alarm handling, as it is redundant there. code shrink. After all differences cancel out: text data bss dec hex filename 777543 1000 9532 788075 c066b busybox_old 777543 1000 9532 788075 c066b busybox_unstripped
2007-09-27introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko
2007-06-18libbb: random hunt for staticsDenis Vlasenko
function old new delta bb_askpass 306 321 +15 pw_encrypt 38 39 +1 static.passwd 64 4 -60 static.cipher 128 4 -124 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-184) Total: -168 bytes # size busybox_old busybox_unstripped text data bss dec hex filename 683705 2704 14240 700649 ab0e9 busybox_old 683721 2704 14064 700489 ab049 busybox_unstripped
2007-05-31delete tons of extra #includesDenis Vlasenko
2006-11-30passwd: rework:Denis Vlasenko
* do not make backup copy by copying (just retain old file) * correctly fall back to /etc/passwd if user is not in shadow * fix bug with overlong passwd entries * be permissive on some kinds of failures * reduce stack usage * code size: -500 bytes
2006-09-23bb_askpass: shorten static password buffer. 256 is way too large.Denis Vlasenko
simplify code a bit.
2006-01-30- add some ATTRIBUTE_UNUSED.Bernhard Reutner-Fischer
- use shorter boilerplate while at it.
2005-12-12Flush input when prompting for a password (bug 373).Rob Landley
2004-05-01Do not use getpass(3)Eric Andersen