diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 23:23:18 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 23:23:18 +0200 |
commit | af5d0086694b9c9b7cbf896e49e1997ec7039904 (patch) | |
tree | 88e96ff8e145a57ca585decd0bd6c0bd0f0adabf /coreutils | |
parent | ec98e3a628b06f6cb8823e5197dcd413113d7ed6 (diff) | |
download | busybox-w32-af5d0086694b9c9b7cbf896e49e1997ec7039904.tar.gz busybox-w32-af5d0086694b9c9b7cbf896e49e1997ec7039904.tar.bz2 busybox-w32-af5d0086694b9c9b7cbf896e49e1997ec7039904.zip |
expr: make it NOEXEC
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/expr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c index a2bbfdd69..e54afbb62 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c | |||
@@ -38,7 +38,7 @@ | |||
38 | //config: the applet slightly larger, but will allow computation with very | 38 | //config: the applet slightly larger, but will allow computation with very |
39 | //config: large numbers. | 39 | //config: large numbers. |
40 | 40 | ||
41 | //applet:IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP)) | 41 | //applet:IF_EXPR(APPLET_NOEXEC(expr, expr, BB_DIR_USR_BIN, BB_SUID_DROP, expr)) |
42 | 42 | ||
43 | //kbuild:lib-$(CONFIG_EXPR) += expr.o | 43 | //kbuild:lib-$(CONFIG_EXPR) += expr.o |
44 | 44 | ||
@@ -118,7 +118,10 @@ struct globals { | |||
118 | char **args; | 118 | char **args; |
119 | } FIX_ALIASING; | 119 | } FIX_ALIASING; |
120 | #define G (*(struct globals*)bb_common_bufsiz1) | 120 | #define G (*(struct globals*)bb_common_bufsiz1) |
121 | #define INIT_G() do { setup_common_bufsiz(); } while (0) | 121 | #define INIT_G() do { \ |
122 | setup_common_bufsiz(); \ | ||
123 | /* NB: noexec applet - globals not zeroed */ \ | ||
124 | } while (0) | ||
122 | 125 | ||
123 | /* forward declarations */ | 126 | /* forward declarations */ |
124 | static VALUE *eval(void); | 127 | static VALUE *eval(void); |