aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ash: do not set a signal to SIG_DFL if it already isDenys Vlasenko2017-08-061-1/+7
| | | | | | | function old new delta setsignal 312 338 +26 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* adjtimex: make it NOFORKDenys Vlasenko2017-08-062-2/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* adjtimex: zero-fill whole structure, to be on the safe sideDenys Vlasenko2017-08-061-10/+13
| | | | | | | function old new delta adjtimex_main 395 406 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* raidautorun: make it NOEXECDenys Vlasenko2017-08-062-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* loadfont,setfont: make them NOEXECDenys Vlasenko2017-08-062-31/+27
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setconsole: make it NOEXECDenys Vlasenko2017-08-062-2/+2
| | | | | | | | | BTW, I failed to make it do what it meant to do. ioctl appears to succeed, but kernel's output is not coming to the specified console (tried on VT consoles too). OTOH, setlogcons does work... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setconsole: since SUSE version has no -r, nuke our --reset longoptDenys Vlasenko2017-08-061-7/+5
| | | | | | | | | | | | | Why we even bother inventing incompatible longopts?! function old new delta packed_usage 31734 31738 +4 static.setconsole_longopts 9 - -9 setconsole_main 94 84 -10 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/1 up/down: 4/-19) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setkeycodes: make it NOEXEC, better --help textDenys Vlasenko2017-08-062-8/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setlogcons: make it NOEXEC, better --help textDenys Vlasenko2017-08-062-5/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setserial: make it NOEXECDenys Vlasenko2017-08-062-4/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setserial: code shrink, better --help textDenys Vlasenko2017-08-061-45/+46
| | | | | | | | function old new delta packed_usage 31747 31749 +2 setserial_main 1152 1132 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* slattach: code shrink, better --help textDenys Vlasenko2017-08-063-107/+68
| | | | | | | | | | | | | | function old new delta tcsetattr_serial_or_warn - 34 +34 static.int_N_SLIP - 4 +4 restore_state_and_exit 123 117 -6 packed_usage 31774 31747 -27 set_termios_state_or_warn 42 - -42 slattach_main 673 624 -49 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/3 up/down: 38/-124) Total: -86 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nameif: make it NOEXECDenys Vlasenko2017-08-063-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Tweak outdated documentation and commentsDenys Vlasenko2017-08-063-35/+37
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tunctl: make it NOEXECDenys Vlasenko2017-08-062-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* kbd_more: make it NOEXEC, remove redundant opt clearingDenys Vlasenko2017-08-061-3/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* kbd_mode: try harder to find console device if -C TTY is not givenDenys Vlasenko2017-08-062-9/+14
| | | | | | | | | | | | | | | | | | | | Was (under X): $ ./busybox_old kbd_mode kbd_mode: ioctl 0x4b44 failed: Inappropriate ioctl for device Now: $ ./busybox kbd_mode The keyboard is in off mode function old new delta kbd_mode_main 166 174 +8 packed_usage 31782 31764 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 8/-18) Total: -10 bytes text data bss dec hex filename 915757 485 6880 923122 e15f2 busybox_old 915747 485 6880 923112 e15e8 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* kbd_mode: show "off" mode tooDenys Vlasenko2017-08-061-2/+16
| | | | | | | function old new delta kbd_mode_main 156 166 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lspci,lsscsi,lsusb: make them NOEXECDenys Vlasenko2017-08-054-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* umount: make it NOEXECDenys Vlasenko2017-08-052-2/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pstree: make it NOEXECDenys Vlasenko2017-08-053-15/+16
| | | | | | While at it, documet why ps can't be NOEXEC. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chattr,lsattr,tune2fs: make them NOEXECDenys Vlasenko2017-08-054-6/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chattr: fix option parsing to accept more cryptic option combosDenys Vlasenko2017-08-051-35/+51
| | | | | | | | function old new delta chattr_main 286 289 +3 packed_usage 31793 31761 -32 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysctl: make it NOEXECDenys Vlasenko2017-08-052-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysctl: recognize ";comment" and "<whitespace>#comment" linesDenys Vlasenko2017-08-053-5/+19
| | | | | | | function old new delta config_read 639 699 +60 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make trim() return pointer to terminating NULDenys Vlasenko2017-08-055-12/+22
| | | | | | | | | | | function old new delta trim 80 90 +10 angle_address 56 50 -6 sysctl_main 282 273 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: +10/-15) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysctl: fix file parsing, do not require -w for VAR=VALDenys Vlasenko2017-08-054-32/+77
| | | | | | | | | | | | | function old new delta sysctl_act_on_setting - 451 +451 sysctl_main 222 282 +60 packed_usage 31744 31793 +49 config_read 604 639 +35 sysctl_act_recursive 612 163 -449 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 595/-449) Total: 146 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cryptpw, mkpasswd: make them NOEXECDenys Vlasenko2017-08-052-5/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chvt, deallocvt, dumpkmap, fgconsole, loadkmap: make them NOEXECDenys Vlasenko2017-08-056-10/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pivot_root: make it NOFORKDenys Vlasenko2017-08-052-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* partprobe: make it NOEXECDenys Vlasenko2017-08-052-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sv, svc: make them NOEXECDenys Vlasenko2017-08-052-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* svc: fix a case where with more than option, getopt() state is not resetDenys Vlasenko2017-08-051-5/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* blockdev, fsfreeze, fstrim, mountpoint: make NOEXECDenys Vlasenko2017-08-055-8/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: use _exit, not exit, in bb_daemonize_or_rexec()Denys Vlasenko2017-08-046-15/+22
| | | | | | | | | By the time we reach exit in parent, child already exited or execed. We should not re-run libc cleanup code. While at it, introduce bb_daemon_helper() and add a few comments. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stty: make in NOEXECDenys Vlasenko2017-08-042-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make 17 state-changing execing applets (ex: "nice PROG ARGS") noexecDenys Vlasenko2017-08-0412-43/+44
| | | | | | | | | | | | | | | | | | | | The applets with "<applet> [opts] PROG ARGS" API very quickly exec another program, noexec is okay for them: chpst/envdir/envuidgid/softlimit/setuidgid chroot chrt ionice nice nohup setarch/linux32/linux64 taskset cttyhack "reset" and "sulogin" applets don't have this form, but also exec another program at once, thus made noexec too. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mesg: make in NOFORKDenys Vlasenko2017-08-042-26/+31
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pmap: tweak help text, show usage if no params are givenDenys Vlasenko2017-08-042-31/+32
| | | | | | | | | | Noticed while auditing nofork/noexec status function old new delta pmap_main 70 80 +10 packed_usage 31747 31744 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* runlevel: make it NOEXECDenys Vlasenko2017-08-042-20/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mktemp: make it NOEXECDenys Vlasenko2017-08-042-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chat: trim help textDenys Vlasenko2017-08-043-47/+58
| | | | | | | | | Noticed while auditing nofork/noexec status function old new delta packed_usage 31777 31747 -30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: move support for "always treat first arg as option" to users (tar/ar)Denys Vlasenko2017-08-043-36/+10
| | | | | | | | | | | | | Now getopt() never leaks (and never performs) any xmalloc's. function old new delta ar_main 522 556 +34 tar_main 986 1014 +28 getopt32 1458 1350 -108 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 62/-108) Total: -46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: factor out code to treat all args as optionsDenys Vlasenko2017-08-046-32/+41
| | | | | | | | | | | | | Working towards making getopt32() xmalloc-free function old new delta make_all_argv_opts - 58 +58 top_main 914 912 -2 getopt32 1517 1458 -59 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/2 up/down: 58/-61) Total: -3 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tweak NOFORK_NOEXEC.lstDenys Vlasenko2017-08-041-9/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: BASH_XTRACEFD bashismDenys Vlasenko2017-08-041-0/+10
| | | | | | | | | Based on patch by Johannes Schindelin <johannes.schindelin@gmx.de> function old new delta evalcommand 1447 1500 +53 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: remove no-longer-used variableJohannes Schindelin2017-08-041-2/+0
| | | | | | | | | | | As of 035486c75 (ash: significant overhaul of redirect saving logic, 2017-07-31), the sv_pos variable is no longer used (just assigned to, with no further effect). Let's just remove it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: INT_OFF/INT_ON around run_nofork_applet()Denys Vlasenko2017-08-041-3/+19
| | | | | | | function old new delta evalcommand 1441 1447 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sheel: improve comments on signal handlingDenys Vlasenko2017-08-044-17/+45
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modutils: make them NOEXEC except depmodDenys Vlasenko2017-08-047-16/+19
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>