diff options
-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 | |||
49 | base64 - runner | 49 | base64 - runner |
50 | basename - NOFORK | 50 | basename - NOFORK |
51 | beep | 51 | beep |
52 | blkdiscard | 52 | blkdiscard - noexec. leaks: open+xioctl |
53 | blkid - noexec | 53 | blkid - noexec |
54 | blockdev - noexec. leaks fd | 54 | blockdev - noexec. leaks fd |
55 | bootchartd - daemon | 55 | 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 @@ | |||
11 | //config: help | 11 | //config: help |
12 | //config: blkdiscard discards sectors on a given device. | 12 | //config: blkdiscard discards sectors on a given device. |
13 | 13 | ||
14 | //applet:IF_BLKDISCARD(APPLET_NOEXEC(blkdiscard, blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP, blkdiscard)) | ||
15 | |||
14 | //kbuild:lib-$(CONFIG_BLKDISCARD) += blkdiscard.o | 16 | //kbuild:lib-$(CONFIG_BLKDISCARD) += blkdiscard.o |
15 | //applet:IF_BLKDISCARD(APPLET(blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
16 | 17 | ||
17 | //usage:#define blkdiscard_trivial_usage | 18 | //usage:#define blkdiscard_trivial_usage |
18 | //usage: "[-o OFS] [-l LEN] [-s] DEVICE" | 19 | //usage: "[-o OFS] [-l LEN] [-s] DEVICE" |
@@ -44,7 +45,6 @@ int blkdiscard_main(int argc UNUSED_PARAM, char **argv) | |||
44 | uint64_t offset; /* Leaving these two variables out does not */ | 45 | uint64_t offset; /* Leaving these two variables out does not */ |
45 | uint64_t length; /* shrink code size and hampers readability. */ | 46 | uint64_t length; /* shrink code size and hampers readability. */ |
46 | uint64_t range[2]; | 47 | uint64_t range[2]; |
47 | // struct stat st; | ||
48 | int fd; | 48 | int fd; |
49 | 49 | ||
50 | enum { | 50 | enum { |