summaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenys Vlasenko2017-08-06 21:23:03 +0200
committerDenys Vlasenko2017-08-06 21:23:03 +0200
commitb9be78070569e69960ba2b3c4098c3dc3316b9bd (patch)
treea74d7de183adcf7ef4b4584ff42c3443343271af /runit
parent184c738582eb190489dd2e9d120b1e036df65401 (diff)
downloadbusybox-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 'runit')
-rw-r--r--runit/sv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/runit/sv.c b/runit/sv.c
index 0817ab4..630f1f3 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -193,7 +193,7 @@ struct globals {
/* "Bernstein" time format: unix + 0x400000000000000aULL */
uint64_t tstart, tnow;
svstatus_t svstatus;
- unsigned islog;
+ smallint islog;
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define acts (G.acts )
@@ -203,7 +203,13 @@ struct globals {
#define tnow (G.tnow )
#define svstatus (G.svstatus )
#define islog (G.islog )
-#define INIT_G() do { setup_common_bufsiz(); } while (0)
+#define INIT_G() do { \
+ setup_common_bufsiz(); \
+ /* need to zero out, we are NOEXEC */ \
+ rc = EXIT_SUCCESS; \
+ islog = 0; \
+ /* other fields need not be zero */ \
+} while (0)
#define str_equal(s,t) (strcmp((s), (t)) == 0)