summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* setpriv: new appletsetprivAssaf Gordon2017-05-121-0/+89
| | | | | | | | | | | | | | | | Add a minimal 'setpriv' implementation supporting the NO_NEW_PRIVS bit. As upstream only supports long options (--nnp/--no-new-privs), A non-standard "-N" option is also added for the applet. Typical usage: $ busybox setpriv sudo uname Linux $ busybox setpriv --nnp sudo uname sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges? Signed-off-by: Assaf Gordon <assafgordon@gmail.com>
* udhcpc: do not accept --background on NOMMU (same as -b)Denys Vlasenko2017-05-082-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: fix "udhcpc -x hostname:<name> not working on nommu"Denys Vlasenko2017-05-082-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* diff: fix -N and nonexistent files. Closes 7454Denys Vlasenko2017-05-051-5/+21
| | | | | | | | | | | function old new delta diffreg 1253 1310 +57 diff_main 1329 1355 +26 create_J 1819 1821 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 85/0) Total: 85 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: survive if stdin is nonblocking. closes 9851Denys Vlasenko2017-05-021-1/+8
| | | | | | | function old new delta readit 55 69 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* time: inplement -f FMTDenys Vlasenko2017-04-281-2/+5
| | | | | | | | function old new delta time_main 1076 1134 +58 packed_usage 31577 31572 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* time: implement -a, -o FILETommi Rantala2017-04-281-10/+31
| | | | | | | | | function old new delta time_main 1052 1076 +24 packed_usage 31571 31577 +6 Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* time: document -p in usageTommi Rantala2017-04-281-1/+2
| | | | | Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lsscsi: new appletMarkus Gothe2017-04-181-0/+123
| | | | | | | | | | | | | | function old new delta lsscsi_main - 326 +326 applet_names 2613 2620 +7 applet_main 1512 1516 +4 applet_install_loc 189 190 +1 packed_usage 31566 31560 -6 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 338/-6) Total: 332 bytes Signed-off-by: Markus Gothe <nietzsche@lysator.liu.se> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko2017-04-1741-80/+80
| | | | | | By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: fix stray semicolonDenys Vlasenko2017-04-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: support "no-argvs" usageDenys Vlasenko2017-04-141-17/+39
| | | | | | | | | | | function old new delta factorize_numstr - 72 +72 packed_usage 31562 31566 +4 factor_main 109 101 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 76/-8) Total: 68 bytes 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>
* factor: improve comments for sieving logic... also fix a typoDenys Vlasenko2017-04-131-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix "loginutils/Config.in:319 error: Overlong line"Denys Vlasenko2017-04-131-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: improve comments for sieving logicDenys Vlasenko2017-04-131-2/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make check_password() also return CHECKPASS_PW_HAS_EMPTY_PASSWORDDenys Vlasenko2017-04-135-8/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* su: FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTYDenys Vlasenko2017-04-133-7/+25
| | | | | | | | | | | 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-134-19/+28
| | | | | Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: tweak commentsDenys Vlasenko2017-04-131-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: implement "exec -a ARGV0 CMD ARGV1..."Denys Vlasenko2017-04-121-7/+15
| | | | | | | | | | | | | function old new delta execcmd 71 112 +41 shellexec 221 224 +3 evalcommand 1158 1161 +3 localcmd 364 366 +2 unaliascmd 163 154 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 49/-9) Total: 40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: make shellexec capable of using separate argv[0] and filename to execDenys Vlasenko2017-04-121-11/+10
| | | | | | | | | | | function old new delta execcmd 71 78 +7 shellexec 221 224 +3 evalcommand 1158 1161 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 13/0) Total: 13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Tweak GETOPT_RESET commentDenys Vlasenko2017-04-121-5/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: GETOPT_RESET macroKaarle Ritvanen2017-04-126-52/+28
| | | | | Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: FEATURE_GREP_CONTEXT should be available for "fgrep only" tooDenys Vlasenko2017-04-121-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* catv: convert this bbox-specific applet into "cat -v"Denys Vlasenko2017-04-122-114/+122
| | | | | | | | | | | | | | function old new delta cat_main 150 320 +170 packed_usage 31511 31552 +41 applet_install_loc 190 189 -1 applet_main 1516 1512 -4 applet_names 2618 2613 -5 catv_main 227 - -227 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 2/3 up/down: 211/-237) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix errors found with make_single_applets.shDenys Vlasenko2017-04-126-35/+71
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Sort more misplaced applets into coreutils or util-linuxDenys Vlasenko2017-04-124-0/+0
| | | | | | | | No code changes Surprisingly, nice and renice are coming from different packages :) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Sort some miscutils/ applets into coreutils or util-linuxDenys Vlasenko2017-04-1210-0/+0
| | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* partprobe: new appletDenys Vlasenko2017-04-111-0/+56
| | | | | | | | | | | | | function old new delta partprobe_main - 79 +79 packed_usage 31485 31511 +26 applet_names 2608 2618 +10 applet_main 1512 1516 +4 applet_install_loc 189 190 +1 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/0 up/down: 120/0) Total: 120 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* w: new applet, alias to "who -H"Denys Vlasenko2017-04-111-4/+44
| | | | | | | | | | | | function old new delta who_main 451 463 +12 packed_usage 31477 31485 +8 applet_main 1508 1512 +4 applet_names 2606 2608 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 26/0) Total: 26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fallocate: new appletDenys Vlasenko2017-04-112-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | NAME fallocate - preallocate or deallocate space to a file SYNOPSIS fallocate [-c|-p|-z] [-o offset] -l length [-n] filename fallocate -d [-o offset] [-l length] filename DESCRIPTION fallocate is used to manipulate the allocated disk space for a file, either to deallocate or preallocate it. For filesystems which support the fallocate system call, preallocation is done quickly by allocating blocks and marking them as uninitialized, requiring no IO to the data blocks. This is much faster than creating a file by filling it with zeroes. function old new delta fallocate_main - 179 +179 applet_names 2597 2606 +9 applet_main 1504 1508 +4 applet_suid 94 95 +1 applet_install_loc 188 189 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fsfreeze: new appletDenys Vlasenko2017-04-111-0/+54
| | | | | | | | | | | | | | | | | | | | | | NAME fsfreeze - suspend access to a filesystem (Ext3/4, ReiserFS, JFS, XFS) SYNOPSIS fsfreeze --freeze|--unfreeze mountpoint DESCRIPTION fsfreeze suspends or resumes access to a filesystem. fsfreeze halts any new access to the filesystem and creates a stable image on disk. AVAILABILITY The fsfreeze command is part of the util-linux 2.28 function old new delta fsfreeze_main - 81 +81 applet_names 2597 2606 +9 applet_main 1504 1508 +4 applet_suid 94 95 +1 applet_install_loc 188 189 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: remove debug codeDenys Vlasenko2017-04-111-19/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: move isqrt from factor, use it in diff tooDenys Vlasenko2017-04-114-29/+63
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: much faster, and very slightly larger isqrt()Denys Vlasenko2017-04-111-34/+10
| | | | | | | function old new delta isqrt_odd 70 88 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: don't be too clever in isqrt - be small insteadDenys Vlasenko2017-04-101-10/+12
| | | | | | | function old new delta isqrt_odd 111 70 -41 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: add code to test isqrt() correctnessDenys Vlasenko2017-04-101-0/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: 25% faster sievingDenys Vlasenko2017-04-101-19/+48
| | | | | | | function old new delta factorize 287 260 -27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: better comments, slightl more clever conversion even->oddDenys Vlasenko2017-04-101-5/+26
| | | | | | | function old new delta isqrt_odd 114 111 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: fix HALF_FMT usageDenys Vlasenko2017-04-101-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: fix commentsDenys Vlasenko2017-04-091-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: a bit more simple isqrtDenys Vlasenko2017-04-091-1/+1
| | | | | | | function old new delta isqrt_odd 87 80 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: simpler isqrtDenys Vlasenko2017-04-091-24/+39
| | | | | | | function old new delta isqrt_odd 102 87 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: factor2 variable is unused now, drop itDenys Vlasenko2017-04-091-6/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: expand commentsDenys Vlasenko2017-04-091-4/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: 30% faster code (estimate max possible factor just once)Denys Vlasenko2017-04-091-24/+82
| | | | | | | | | | | function old new delta factorize - 161 +161 isqrt_odd - 102 +102 factor_main 281 110 -171 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/1 up/down: 263/-171) Total: 92 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nl: fix copyright messageDenys Vlasenko2017-04-091-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: new appletDenys Vlasenko2017-04-092-0/+160
| | | | | | | | | | | | | | thus far only able to factor up to ULLONG_MAX function old new delta factor_main - 378 +378 packed_usage 31427 31502 +75 applet_names 2590 2597 +7 applet_main 1500 1504 +4 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/0 up/down: 464/0) Total: 464 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nproc: new appletDenys Vlasenko2017-04-071-0/+51
| | | | | | | | | | function old new delta nproc_main - 98 +98 applet_names 2584 2590 +6 applet_main 1496 1500 +4 applet_install_loc 187 188 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>