diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-06 20:20:47 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-06 20:20:47 +0200 |
commit | 277081e0a4e04b1c39b3eadf4422ef36fded4705 (patch) | |
tree | e6e0ff3b1689584d2249cf195ece95ad0b0ffadd | |
parent | bf18239e3d6305fc83e5177bd9a27c5114cc4c16 (diff) | |
download | busybox-277081e0a4e04b1c39b3eadf4422ef36fded4705.tar.gz |
blkdiscard: make it NOEXEC
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | NOFORK_NOEXEC.lst | 2 | ||||
-rw-r--r-- | util-linux/blkdiscard.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst index 9735e756a..ab58df50d 100644 --- a/NOFORK_NOEXEC.lst +++ b/NOFORK_NOEXEC.lst @@ -49,7 +49,7 @@ awk - noexec. runner base64 - runner basename - NOFORK beep -blkdiscard +blkdiscard - noexec. leaks: open+xioctl blkid - noexec blockdev - noexec. leaks fd bootchartd - daemon diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c index 8f6a4ab6c..048d39e83 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c @@ -11,8 +11,9 @@ //config: help //config: blkdiscard discards sectors on a given device. +//applet:IF_BLKDISCARD(APPLET_NOEXEC(blkdiscard, blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP, blkdiscard)) + //kbuild:lib-$(CONFIG_BLKDISCARD) += blkdiscard.o -//applet:IF_BLKDISCARD(APPLET(blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP)) //usage:#define blkdiscard_trivial_usage //usage: "[-o OFS] [-l LEN] [-s] DEVICE" @@ -44,7 +45,6 @@ int blkdiscard_main(int argc UNUSED_PARAM, char **argv) uint64_t offset; /* Leaving these two variables out does not */ uint64_t length; /* shrink code size and hampers readability. */ uint64_t range[2]; -// struct stat st; int fd; enum { |