diff options
author | Denys Vlasenko | 2017-08-06 21:23:03 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-08-06 21:23:03 +0200 |
commit | b9be78070569e69960ba2b3c4098c3dc3316b9bd (patch) | |
tree | a74d7de183adcf7ef4b4584ff42c3443343271af /console-tools/resize.c | |
parent | 184c738582eb190489dd2e9d120b1e036df65401 (diff) | |
download | busybox-b9be78070569e69960ba2b3c4098c3dc3316b9bd.zip busybox-b9be78070569e69960ba2b3c4098c3dc3316b9bd.tar.gz |
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>
Diffstat (limited to 'console-tools/resize.c')
-rw-r--r-- | console-tools/resize.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/console-tools/resize.c b/console-tools/resize.c index 9786667..8aa487c 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c @@ -24,6 +24,7 @@ //config: COLUMNS=80;LINES=44;export COLUMNS LINES; //applet:IF_RESIZE(APPLET_NOEXEC(resize, resize, BB_DIR_USR_BIN, BB_SUID_DROP, resize)) +/* bb_common_bufsiz1 usage here is safe wrt NOEXEC: not expecting it to be zeroed. */ //kbuild:lib-$(CONFIG_RESIZE) += resize.o @@ -63,6 +64,7 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) */ tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */ +//TODO: die if the above fails? memcpy(&new, old_termios_p, sizeof(new)); new.c_cflag |= (CLOCAL | CREAD); new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); |