aboutsummaryrefslogtreecommitdiff
path: root/libbb (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'busybox' into mergeRon Yorston2017-07-294-10/+42
|\|
| * standalone shell / prefer_applets: fix "exe" in comm fieldsDenys Vlasenko2017-07-291-0/+18
| | | | | | | | | | | | | | function old new delta main 92 106 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: make standalone shell tab-complete "busybox"Denys Vlasenko2017-07-292-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta busybox_main - 624 +624 packed_usage 31758 31777 +19 applet_names 2638 2646 +8 applet_main 1528 1532 +4 applet_install_loc 191 192 +1 run_applet_and_exit 681 78 -603 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/1 up/down: 656/-603) Total: 53 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: trim/improve item names and help texts.Denys Vlasenko2017-07-271-3/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allow "trap NUM [SIG]..." syntaxDenys Vlasenko2017-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | While at it, make get_signum() return -1 for numeric strings >= NSIG. function old new delta trapcmd 292 306 +14 get_signum 295 300 +5 builtin_trap 413 412 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 19/-1) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-07-245-182/+190
|\|
| * libbb: avoid malloc/free in bb_unsetenv()Denys Vlasenko2017-07-221-13/+21
| | | | | | | | | | | | | | function old new delta bb_unsetenv 55 83 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: deindent all help textsDenys Vlasenko2017-07-214-169/+169
| | | | | | | | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: simplify spawning appletsRon Yorston2017-07-211-6/+1
| | | | | | | | | | | | | | The original WIN32 code used the BUSYBOX_APPLET_NAME environment variable to pass the applet name to the spawned process. This was based on the (apparently) mistaken idea that WIN32 would replace argv[0] with the path to the executable.
* | Merge branch 'busybox' into mergeRon Yorston2017-07-1812-82/+156
|\|
| * config: merge "Busybox Settings" and "Busybox Library Tuning" into one menuDenys Vlasenko2017-07-152-6/+8
| | | | | | | | | | | | Tweak a few help texts while at it Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * copyfd: guard use of munmap() with #if (windows builds need this)Johannes Schindelin2017-07-151-0/+3
| | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: hide getnetbyaddr() inside "#if ENABLE_FEATURE_ETC_NETWORKS" blockDenys Vlasenko2017-07-141-27/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: allow "-" as file name meaning stdinDenys Vlasenko2017-07-141-4/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/dump: allow skipping over stdin tooDenys Vlasenko2017-07-141-20/+13
| | | | | | | | | | | | | | function old new delta next 294 265 -29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/dump: fix a few broken commits and shrink codeDenys Vlasenko2017-07-141-10/+10
| | | | | | | | | | | | | | function old new delta next 310 294 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: safe_write should not return EINTRDenys Vlasenko2017-07-141-2/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cat: fix "cat -An" ignoring -n; make numbering go througn all filesDenys Vlasenko2017-07-141-0/+1
| | | | | | | | | | | | | | function old new delta cat_main 418 428 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: do not die if setgid/setuid(real_id) on startup failsDenys Vlasenko2017-07-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a patch from Steven McDonald <steven@steven-mcdonald.id.au>: This makes 'unshare --user' work correctly in the case where the user's shell is provided by busybox itself. 'unshare --user' creates a new user namespace without any uid mappings. As a result, /bin/busybox is setuid nobody:nogroup within the namespace, as that is the only user. However, since no uids are mapped, attempting to call setgid/setuid fails, even though this would do nothing: $ unshare --user ./busybox.broken ash ash: setgid: Invalid argument 'unshare --map-root-user' still works, but because Linux only allows uid/gid mappings to be set up once, creating a root mapping makes such a namespace useless for creating multi-user containers. With this patch, setgid and setuid will not be called in the case where they would do nothing, which is always the case inside a new user namespace because all uids are effectively mapped to nobody: $ id -u 1000 $ ls -lh busybox.fixed -rwsr-xr-x 1 root root 826.2K May 21 00:33 busybox.fixed $ unshare --user ./busybox.fixed ash $ id -u 65534 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * main: fix the case where user has "halt" as login shell. Closes 9986Denys Vlasenko2017-07-072-4/+8
| | | | | | | | | | | | | | | | | | | | halt::0:0::/:/sbin/halt function old new delta run_applet_and_exit 748 751 +3 run_applet_no_and_exit 467 459 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: new function bb_getgroups() - allocating wrapper around getgroups()Denys Vlasenko2017-07-041-0/+47
| | | | | | | | | | | | | | | | | | | | 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>
| * Change BB_EXTRA_VERSION: now it needs to contain any spaces/parenthesisDenys Vlasenko2017-07-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, BB_EXTRA_VERSION of "" resulted in: "BusyBox v1.28.0.git () multi-call binary" message, after the fix it is: "BusyBox v1.28.0.git multi-call binary" While at it, eliminate BB_BT and BANNER single-use macros. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fixes for bugs found by make_single_applets.shDenys Vlasenko2017-07-033-8/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Use %I64* formats with MinGW instead of %ll* formatsJohannes Schindelin2017-07-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The MSVC runtime uses the format specified %I64 for 64-bit data types; It does not understand e.g. %llu for unsigned long longs. However, mingw-w64 provides a compatibility mode in its runtime wrapper which can be activated by defining the constant __USE_MINGW_ANSI_STDIO=1 in which case we must refrain from overriding the %ll* formats. This fixes quite a couple of compile warnings when building with the mingw-w64 compiler. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | Merge branch 'busybox' into mergeRon Yorston2017-05-2910-71/+219
|\|
| * Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko2017-04-171-1/+1
| | | | | | | | | | | | By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix "error: redefinition of 'is_tty_secure'"Denys Vlasenko2017-04-131-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make check_password() also return CHECKPASS_PW_HAS_EMPTY_PASSWORDDenys Vlasenko2017-04-132-4/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * su: FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTYDenys Vlasenko2017-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
| * login: move check_securetty to libbbKaarle Ritvanen2017-04-132-0/+23
| | | | | | | | | | Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: GETOPT_RESET macroKaarle Ritvanen2017-04-122-33/+3
| | | | | | | | | | Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix errors found with make_single_applets.shDenys Vlasenko2017-04-122-0/+62
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: move isqrt from factor, use it in diff tooDenys Vlasenko2017-04-111-0/+60
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modprobe: do not descend into /etc/modprobe.d/DIR/. Closes 8686Denys Vlasenko2017-04-061-17/+29
| | | | | | | | | | | | Also expanded comments in recursive_action.c Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mount: create loop devices with LO_FLAGS_AUTOCLEAR flagDenys Vlasenko2017-03-161-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'busybox' into mergeRon Yorston2017-02-0814-212/+259
|\|
| * Replace int -> uint to avoid signed integer overflowRostislav Skudnov2017-02-043-4/+4
| | | | | | | | | | | | | | | | | | | | An example of such an error (should be compiled with DEBUG_SANITIZE): runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ps: avoid -o stat to contain spaces. Closes 9631Denys Vlasenko2017-02-021-10/+14
| | | | | | | | | | | | | | function old new delta procps_scan 1227 1236 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: match_fstype() is unreadable in the extreme, fixing itDenys Vlasenko2017-01-301-12/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: spawn_and_wait() fflushes before forking NOEXEC; child reinits logmodeDenys Vlasenko2017-01-261-17/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: shrink sump.cDenys Vlasenko2017-01-251-79/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta dot_flags_width_chars - 16 +16 int_convs - 7 +7 lcc 7 - -7 index_str 16 - -16 rewrite 1013 937 -76 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 23/-99) Total: -76 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: new appletDenys Vlasenko2017-01-251-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet Another Hexdumper function old new delta xxd_main - 364 +364 packed_usage 31046 31116 +70 applet_names 2560 2564 +4 applet_main 1476 1480 +4 rewrite 1022 1013 -9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 442/-9) Total: 433 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: add 2nd cipher_id, TLS_RSA_WITH_AES_128_CBC_SHA, so far it doesn't workDenys Vlasenko2017-01-243-7/+14
| | | | | | | | | | | | | | | | | | | | 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>
| * libbb: eliminate redundant variable in sha_cryptDenys Vlasenko2017-01-151-8/+7
| | | | | | | | | | | | | | function old new delta sha_crypt 1136 1130 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha512: use larger constant table only if sha512 is in fact selectedDenys Vlasenko2017-01-151-46/+66
| | | | | | | | | | | | | | function old new delta sha_K 640 256 -384 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: consolidate the code to set termios unbuffered modeDenys Vlasenko2017-01-112-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * busybox: stop depending on FEATURE_AUTOWIDTH for applet listDenys Vlasenko2017-01-111-5/+1
| | | | | | | | | | | | | | Many other appletw don't - they unconditionally use get_terminal_wodth(), and here the amount of code saved by FEATURE_AUTOWIDTH=n is tiny. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Big cleanup in config help and descriptionDenys Vlasenko2017-01-101-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Redundant help texts (one which only repeats the description) are deleted. Descriptions and help texts are trimmed. Some config options are moved, even across menus. No config option _names_ are changed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | libbb: let bb_make_directory accept backslashes in pathRon Yorston2017-02-071-0/+8
| |
* | Merge branch 'busybox' into mergeRon Yorston2017-01-081-0/+26
|\|