aboutsummaryrefslogtreecommitdiff
path: root/libbb/correct_password.c
AgeCommit message (Collapse)Author
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>
2017-10-05whitespace and comment format fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-02do not use `a' quoting style in commentsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-13libbb: make check_password() also return CHECKPASS_PW_HAS_EMPTY_PASSWORDDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-13su: FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTYDenys Vlasenko
When this feature is enabled, blank passwords are not accepted by su unless the user is on a secure TTY defined in /etc/securetty. This resembles the default PAM configuration of some Linux distros which specify the nullok_secure option for pam_unix.so. Based on patch by Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-08-05ftpd: add optional support for authenticationMorten Kvistgaard
function old new delta cmdio_get_cmd_and_arg - 237 +237 get_passwd - 97 +97 check_password - 82 +82 ftpd_main 2297 2178 -119 ask_and_check_password_extended 206 84 -122 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/2 up/down: 416/-241) Total: 175 bytes Signed-off-by: Morten Kvistgaard <MK@pch-engineering.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31fix failures found by randomconfig buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19libbb: move nuke_str() from passwd into libbbDenys Vlasenko
function old new delta nuke_str - 15 +15 ask_and_check_password_extended 215 206 -9 init_main 781 771 -10 nuke_str 27 - -27 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 15/-46) Total: -31 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19comment tweakDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19sulogin: use common password-checking routine.Denys Vlasenko
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>
2012-09-04refactor correct_password.c to avoid one ifwalter harms
Signed-off-by: walter harms <wharms@bfs.de> 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-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-06-13udhcpc: kill undocumented -W, it was a no-op.Denis Vlasenko
fix option parsing in the case some CONFIG_x are off. disable -b on NOMMU, make backgrounding work correctly (if a bit differently from MMU case). Previously, it wasn't working at all. stop using global data for flags in main(), opt bitfield works as well. function old new delta cryptpw_main 177 153 -24 packed_usage 24478 24452 -26 client_background 26 - -26 udhcpc_main 2462 2372 -90 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/3 up/down: 0/-166) Total: -166 bytes
2008-06-12make pw_encrypt() return malloc'ed string.Denis Vlasenko
text data bss dec hex filename 759802 604 6684 767090 bb472 busybox_old 759804 604 6676 767084 bb46c busybox_unstripped
2008-06-12uclibc insists on having 70k static buffer for crypt.Denis Vlasenko
For bbox it's not acceptable. Roll our own des and md5 crypt implementation. Against older uclibc: text data bss dec hex filename 759945 604 6684 767233 bb501 busybox_old 759766 604 6684 767054 bb44e busybox_unstripped so, we still save on code size.
2007-10-29appletlib.c: make it actally follow _BB_SUID_ALWAYS rulesDenis Vlasenko
adduser: implement -S and code shrink / fix uid selection *: sanitize getspnam_r use text data bss dec hex filename 777042 974 9676 787692 c04ec busybox_old 776883 974 9676 787533 c044d busybox_unstripped
2007-07-03correct_password: if password is 'x' or '*' and there is no shadow, useDenis Vlasenko
fake encrypted password 'aa' (which is guaranteed to fail password check).
2007-07-03correct_password: do not print "no shadow passwd..." messageDenis Vlasenko
function old new delta correct_password 204 191 -13 .rodata 129530 129466 -64 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-77) Total: -77 bytes text data bss dec hex filename 675984 2744 13968 692696 a91d8 busybox_old 675908 2744 13968 692620 a918c busybox_unstripped
2007-06-16remove obsolete commentDenis Vlasenko
2007-06-15- vda perfers not to use the bannerBernhard Reutner-Fischer
2007-06-13*: BB_BANNER -> bb_banner (it is not a const or #define)!Denis Vlasenko
correct_password: explain in detail why it is ok to use bb_banner fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one Marginal size difference: text data bss dec hex filename 679119 2700 15632 697451 aa46b busybox_old 679091 2700 15632 697423 aa44f busybox_unstripped
2007-06-11- use bb_msg_full_version instead of a separate string. Saves a minor 3 bytes.Bernhard Reutner-Fischer
2007-06-08login: ask passwords even for wrong usernames.Denis Vlasenko
# size busybox_old busybox_unstripped text data bss dec hex filename 680099 2704 15648 698451 aa853 busybox_old 680110 2704 15648 698462 aa85e busybox_unstripped
2007-03-13Do not fail password check if shadow password does not exist -Denis Vlasenko
fall back to ordinary one Reduced usage of functions returning datain static buffers. (mostly passwd/group/shadow related): function old new delta correct_password 143 193 +50 sulogin_main 490 533 +43 adduser_main 732 774 +42 passwd_main 1875 1915 +40 addgroup_main 330 365 +35 bb_internal_getspnam 38 - -38 bb_internal_fgetpwent 38 - -38 bb_internal_fgetgrent 38 - -38 static.resultbuf 168 88 -80 static.buffer 1872 1104 -768 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 5/2 up/down: 210/-962) Total: -752 bytes
2006-12-21introduce LONE_CHAR (optimized strcmp with one-char string)Denis Vlasenko
2006-09-23correct_password: undo whitespace damage.Denis Vlasenko
vlock + correct_password: fix incorrect line breaks in messages.
2006-05-07Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytesRob Landley
as the old optimization did (actually does slightly better under gcc 4.0), and simplifies the code.
2006-01-25just whitespaceTim Riker
2006-01-09Minor cosmetic fix from Tito.Rob Landley
2004-09-24Remove this error message at Vodz request, it was misleading.Glenn L McGrath
2004-05-01Do not use getpass(3)Eric Andersen
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2003-03-19Major coreutils update.Manuel Novoa III
2002-06-23Port over the last of the tinylogin appletsEric Andersen
-Erik