← Commit list

bfc66d498

Denys Vlasenko
Denys Vlasenko
2017-08-06
SUCCESS Duration: 144s

Subject

nbd-client: make it NOEXEC, stop using argc

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

NOFORK_NOEXEC.lst+1 -1
@@ -241,7 +241,7 @@ mpstat - longterm: "mpstat 1" runs indefinitely
mt - rare
mv - noexec candidate, runner
nameif - noexec. openlog(), leaks: config_open2+ioctl_or_perror_and_die
-nbd-client
+nbd-client - noexec
nc - runner
netstat - runner with -c
nice - noexec. spawner
networking/nbd-client.c+3 -3
@@ -7,7 +7,7 @@
#include <netinet/tcp.h>
#include <linux/fs.h>
-//applet:IF_NBDCLIENT(APPLET_ODDNAME(nbd-client, nbdclient, BB_DIR_USR_SBIN, BB_SUID_DROP, nbdclient))
+//applet:IF_NBDCLIENT(APPLET_NOEXEC(nbd-client, nbdclient, BB_DIR_USR_SBIN, BB_SUID_DROP, nbdclient))
//kbuild:lib-$(CONFIG_NBDCLIENT) += nbd-client.o
@@ -43,7 +43,7 @@
//blocksizes other than 1024 without patches
int nbdclient_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int nbdclient_main(int argc, char **argv)
+int nbdclient_main(int argc UNUSED_PARAM, char **argv)
{
unsigned long timeout = 0;
#if BB_MMU
@@ -61,7 +61,7 @@ int nbdclient_main(int argc, char **argv)
BUILD_BUG_ON(offsetof(struct nbd_header_t, data) != 8+8+8+4);
// Parse command line stuff (just a stub now)
- if (argc != 4)
+ if (!argv[1] || !argv[2] || !argv[3] || argv[4])
bb_show_usage();
#if !BB_MMU