93c1a25c59
ifenslave: remove longopts from --help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 22:30:59 +02:00
354b104df1
fatattr: make NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 22:21:54 +02:00
fc9efcb53b
df: make NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 22:19:17 +02:00
76b65624b9
unxz: get_le32 macro is obviously wrong
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 20:56:54 +02:00
ed4393bdc7
dnsdomainname,hostname: make NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 20:34:26 +02:00
80e8e3cc05
noexec: consolidate code
...
function old new delta
run_noexec_applet_and_exit - 61 +61
find_applet_by_name 128 124 -4
run_applet_no_and_exit 441 434 -7
tryexec 169 152 -17
pseudo_exec_argv 338 321 -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/6 up/down: 61/-48) Total: 13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 19:24:57 +02:00
c9c1ccc4ed
noexec: do GETOPT_RESET() before entering APPLET_main()
...
hush -c 'yes | head -1' was not happy.
function old new delta
tryexec 159 169 +10
pseudo_exec_argv 328 338 +10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 18:59:35 +02:00
f2cf1cc716
noexec: set comm field for noexecs
...
function old new delta
set_task_comm - 18 +18
tryexec 152 159 +7
pseudo_exec_argv 321 328 +7
main 106 97 -9
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/2 up/down: 34/-13) Total: 23 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 18:45:33 +02:00
248a67fb75
free,stat: make NOEXEC
...
pkill/pgrep/pidof uncovered another quirk: what about noexec's _process names_?
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 18:18:09 +02:00
316d38e258
setconsole: much better help text
...
Was:
Usage: setconsole [-r] [DEVICE]
Redirect system console output to DEVICE (default: /dev/tty)
-r Reset output to /dev/console
Now:
Usage: setconsole [-r] [DEVICE]
Make writes to /dev/console appear on DEVICE (default: /dev/tty).
Does not redirect kernel log output or reads from /dev/console.
-r Reset: writes to /dev/console go to kernel log tty(s)
function old new delta
packed_usage 31766 31777 +11
setconsole_main 84 78 -6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 17:36:41 +02:00
1a1203ff89
users,w,who,uptime,renice: make NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 16:47:34 +02:00
798b94518e
ubi tools: ubiupdatevol supports "-" input and actually respects -s SIZE
...
Decided to not make any flash applets NOEXEC.
Minor robustifications here and there. Better error messages. Save on strings:
function old new delta
ubi_tools_main 1235 1288 +53
ubi_get_volid_by_name 125 133 +8
ubirename_main 198 204 +6
get_num_from_file 90 94 +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 71/0) Total: 71 bytes
text data bss dec hex filename
915696 485 6880 923061 e15b5 busybox_old
915670 485 6880 923035 e159b busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 16:00:25 +02:00
b34eb4a591
ubiupdatevol: fix bug with -sSIZE: was ignoring IMAGE_FILE
...
While at it, fix help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 03:24:29 +02:00
115e0a7199
ubi_tools: a bit smaller applet resolution code
...
function old new delta
ubi_tools_main 1241 1235 -6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 02:55:33 +02:00
4dea1edd08
script: -f means "flush", not "fsync"
...
function old new delta
packed_usage 31765 31768 +3
script_main 1102 1082 -20
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 02:21:34 +02:00
269b36a49a
script: make -t[FILE] compatible with util-linux
...
function old new delta
script_main 1056 1102 +46
packed_usage 31736 31765 +29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 75/0) Total: 75 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 02:12:36 +02:00
dd55d5d53c
script: make -t independent of scriptreplay
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 01:53:17 +02:00
7b8372b819
add/remove-shell,add/deluser,add/delgroup: make them NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-07 00:28:15 +02:00
bfc66d4980
nbd-client: make it NOEXEC, stop using argc
...
function old new delta
nbdclient_main 484 492 +8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 21:53:39 +02:00
9536ef7c98
makedevs: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 21:47:07 +02:00
7389662dbf
svc: remove superfluout INIT_G()
...
function old new delta
sv 1297 1296 -1
svc_main 162 145 -17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 21:29:51 +02:00
b9be780705
sv,svc: fix NOEXEC fallout
...
function old new delta
svc_main 145 162 +17
sv 1280 1297 +17
status 139 133 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-6) Total: 28 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 21:23:03 +02:00
184c738582
stty: fix bb_common_bufsiz1 use in NOEXEC
...
function old new delta
stty_main 1211 1221 +10
do_display 379 370 -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:55:56 +02:00
035e71578e
readprofile: do not close/free just before exiting
...
function old new delta
readprofile_main 1784 1762 -22
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:39:27 +02:00
277081e0a4
blkdiscard: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:20:47 +02:00
bf18239e3d
blkid: make it NOEXEC, make FEATURE_BLKID_TYPE=y default
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:16:28 +02:00
86e07f6893
brctl: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:14:02 +02:00
0f14f41e72
ash: do not set a signal to SIG_DFL if it already is
...
function old new delta
setsignal 312 338 +26
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:06:19 +02:00
ed7d118dd0
adjtimex: make it NOFORK
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 20:00:21 +02:00
c8e29317e9
adjtimex: zero-fill whole structure, to be on the safe side
...
function old new delta
adjtimex_main 395 406 +11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 19:46:21 +02:00
a894a4bedd
raidautorun: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 19:08:46 +02:00
1b280e4652
loadfont,setfont: make them NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 19:05:45 +02:00
5cb907fffc
setconsole: make it NOEXEC
...
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 >
2017-08-06 18:56:25 +02:00
ab23381100
setconsole: since SUSE version has no -r, nuke our --reset longopt
...
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 >
2017-08-06 18:54:16 +02:00
b83db4ddae
setkeycodes: make it NOEXEC, better --help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 18:29:25 +02:00
341ce0a31e
setlogcons: make it NOEXEC, better --help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 18:17:58 +02:00
97b738d359
setserial: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 18:06:46 +02:00
08e66a8149
setserial: code shrink, better --help text
...
function old new delta
packed_usage 31747 31749 +2
setserial_main 1152 1132 -20
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 17:59:37 +02:00
2262746e2b
slattach: code shrink, better --help text
...
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 >
2017-08-06 17:14:09 +02:00
a759b22c29
nameif: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 14:15:24 +02:00
fbecca1bed
Tweak outdated documentation and comments
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 14:03:27 +02:00
9a58cc0f7f
tunctl: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 12:28:00 +02:00
ae17ba0924
kbd_more: make it NOEXEC, remove redundant opt clearing
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 12:23:04 +02:00
32b60cc0db
kbd_mode: try harder to find console device if -C TTY is not given
...
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 >
2017-08-06 12:17:46 +02:00
6517bbc76c
kbd_mode: show "off" mode too
...
function old new delta
kbd_mode_main 156 166 +10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-06 11:58:46 +02:00
3239ab89c9
lspci,lsscsi,lsusb: make them NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-05 23:28:19 +02:00
83a6c8d58b
umount: make it NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-05 23:21:02 +02:00
00c1811d87
pstree: make it NOEXEC
...
While at it, documet why ps can't be NOEXEC.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-05 22:25:00 +02:00
99125c0495
chattr,lsattr,tune2fs: make them NOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-05 20:38:04 +02:00
d3147cd5c3
chattr: fix option parsing to accept more cryptic option combos
...
function old new delta
chattr_main 286 289 +3
packed_usage 31793 31761 -32
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2017-08-05 20:33:48 +02:00