aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2017-07-04libbb: new function bb_getgroups() - allocating wrapper around getgroups()Denys Vlasenko
function old new delta bb_getgroups - 111 +111 nexpr 843 757 -86 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/1 up/down: 111/-86) Total: 25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03fixes for bugs found by make_single_applets.shDenys 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>
2017-04-13login: move check_securetty to libbbKaarle Ritvanen
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-12Tweak GETOPT_RESET commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-12libbb: GETOPT_RESET macroKaarle Ritvanen
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-12fix errors found with make_single_applets.shDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-11libbb: move isqrt from factor, use it in diff tooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-05nl: new applet; also implement cat -nb (similar functionality to nl)Denys Vlasenko
function old new delta nl_main - 201 +201 print_numbered_lines - 115 +115 cat_main 36 149 +113 static.nl_longopts - 106 +106 packed_usage 31081 31182 +101 applet_main 1488 1492 +4 applet_names 2575 2578 +3 applet_suid 93 94 +1 applet_install_loc 186 187 +1 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 6/0 up/down: 645/0) Total: 645 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-03-16mount: create loop devices with LO_FLAGS_AUTOCLEAR flagDenys Vlasenko
The "autolooped" mount (mount [-oloop] IMAGE /DIR/DIR) always creates AUTOCLEARed loopdevs, so that umounting drops them (and this does not require any code in the umount userspace). This happens since circa linux-2.6.25: commit 96c5865559cee0f9cbc5173f3c949f6ce3525581 Date: Wed Feb 6 01:36:27 2008 -0800 Subject: Allow auto-destruction of loop devices IOW: in this case, umount does not have to use -d to drop the loopdev. The explicit loop mount (mount /dev/loopN /DIR/DIR) does not do this. In this case, umount without -d should not drop loopdev. Unfortunately, bbox umount currently always implies -d, this probably needs fixing. function old new delta set_loop 537 597 +60 singlemount 1101 1138 +37 losetup_main 419 432 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 110/0) Total: 110 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-30libbb: match_fstype() is unreadable in the extreme, fixing itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26libbb: spawn_and_wait() fflushes before forking NOEXEC; child reinits logmodeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24tls: can download kernels now :)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24tls: add 2nd cipher_id, TLS_RSA_WITH_AES_128_CBC_SHA, so far it doesn't workDenys Vlasenko
Good news that TLS_RSA_WITH_AES_256_CBC_SHA256 still works with new code ;) This change adds inevitable extension to have different sized hashes and AES key sizes. In libbb, md5_end() and shaX_end() are extended to return result size instead of void - this helps *a lot* in tls (the cost is ~5 bytes per _end() function). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23separate TLS code into a library, use in in wgetDenys Vlasenko
A new applet, ssl_client, is the TLS debug thing now. It doubles as wget's NOMMU helper. In MMU mode, wget still forks, but then directly calls TLS code, without execing. This can also be applied to sendmail/popmail (SMTPS / SMTP+starttls support) and nc --ssl (ncat, nmap's nc clone, has such option). function old new delta tls_handshake - 1691 +1691 tls_run_copy_loop - 443 +443 ssl_client_main - 128 +128 packed_usage 30978 31007 +29 wget_main 2508 2535 +27 applet_names 2553 2560 +7 ... xwrite_encrypted 360 342 -18 tls_main 2127 - -2127 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 13/8 up/down: 2351/-2195) Total: 156 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-20password utils: improve --help, make DEFAULT_PASSWD_ALGO visible if CHPASSWDDenys Vlasenko
Was: $ cryptpw --help ... Print crypt(3) hashed PASSWORD -P,--password-fd=N Read password from fd N -m,--method=TYPE Encryption method -S,--salt=SALT User: "What methods exist? which one os default?" Now: Print crypt(3) hashed PASSWORD -P,--password-fd N Read password from fd N -m,--method TYPE des,md5,sha256/512 (default des) -S,--salt SALT Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-11libbb: consolidate the code to set termios unbuffered modeDenys Vlasenko
function old new delta set_termios_to_raw - 116 +116 count_lines 72 74 +2 powertop_main 1458 1430 -28 top_main 943 914 -29 more_main 759 714 -45 fsck_minix_main 2969 2921 -48 conspy_main 1197 1135 -62 rawmode 99 36 -63 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 118/-275) Total: -157 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09Allow FAST_FUNC to be overridden at build timeKang-Che Sung
Busybox uses FAST_FUNC macro to tweak with IA-32 calling conventions in order to make the function call slightly smaller or slightly faster. However, when I experiment with GCC's LTO (Link Time Optimization), I discovered that FAST_FUNC could hinder LTO's optimization so that the resulting executable become a few bytes larger (than what is compiled without FAST_FUNC). This change allows to specify e.g. CONFIG_EXTRA_CFLAGS="-DFAST_FUNC= -flto" and compile with LTO without a source code hack. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-23modprobe-small: make applets individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-22Tweak some config defaults; fix MODPROBE_SMALL ordering in "make config"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-12df: implement -B n<suff> and -B <suff> formats of -B optionDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-12suppress glibc "use sysmacros.h for major" warningDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-09selinux: drop deprecated headersMike Frysinger
The selinux guys want you to get class values at runtime by converting textual names into constants. Drop the deprecated headers and switch to the new format. This API has been around for years, so there shouldn't be an issue with backwards compatibility. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-12-08randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-24lineedit: fix handling of repeating Alt-b, Alt-f, Alt-d, Alt-BackspaceRostislav Skudnov
These key combinations should repeat correctly when the keys are pressed and held. Before this change, they do this erratically - many repeats are "eaten" because they are treated as unrecognized ESC seqs: ESC 0x7f is treated by Alt+baskspace, but ESC 0x7f ESC 0x7f ESC 0x7f is unrecognized. Escape sequences corresponding to these key combinations are moved from read_line_input to lineedit_read_key. Also, these key sequences are now enabled regardless of whether FEATURE_EDITING_VI is set, since Vim does not actually support these key combinations, but they are present in readline library. function old new delta static.esccmds 93 103 +10 read_line_input 3737 3687 -50 Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Remove outdated commentsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all udhcp applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all selinux/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23test: make [ and [[ forms individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Remove remnants of disabled "length" appletDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all coreutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all util-linux/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all console-tools/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all mailutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23tc: consolidate its disabled bitsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all networking/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all procps/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-22Convert all miscutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-17applets.h.sh: a script to check applet names against config optionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-16Make mkfs.vfat and mkdosfs individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-16Make mke2fs and mkfs.ext2 individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-14Make ifup and ifdown individually selectable.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-14Make swapon and swapoff individually selectable.Denys Vlasenko
For example, without swapoff, code shrinks by 277 bytes. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-13dnsdomainname: split it from "hostname", make it independently selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-03su: expand help; simplify passing of -c CMD to run_shell()Denys Vlasenko
Also, added a comment about bug 9401 (TIOCSTI input injection). function old new delta packed_usage 30909 30932 +23 su_main 470 487 +17 sulogin_main 260 258 -2 run_applet_and_exit 681 678 -3 run_shell 166 126 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-09-18libbb: do not use fflush_unlocked, musl does not like fflush_unlocked(NULL)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-08-29sha3: fix to conform to final SHA3 padding standard, add -a BITS optionDenys Vlasenko
function old new delta hash_file 331 396 +65 md5_sha1_sum_main 485 538 +53 packed_usage 30423 30464 +41 sha3_begin 17 31 +14 sha3_hash 101 110 +9 sha3_end 41 49 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-08-22hush: fix "redirects can close script fd" bugDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-07-22config: disentangle PREFER_APPLETS from SH_STANDALONE and SH_NOFORKDenys Vlasenko
On user request. I thought enabling/disabling them all together is more consistent. Evidently, some people do want them to be separately selectable. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>