diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-06 21:23:03 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-06 21:23:03 +0200 |
commit | b9be78070569e69960ba2b3c4098c3dc3316b9bd (patch) | |
tree | a74d7de183adcf7ef4b4584ff42c3443343271af /runit/sv.c | |
parent | 184c738582eb190489dd2e9d120b1e036df65401 (diff) | |
download | busybox-w32-b9be78070569e69960ba2b3c4098c3dc3316b9bd.tar.gz busybox-w32-b9be78070569e69960ba2b3c4098c3dc3316b9bd.tar.bz2 busybox-w32-b9be78070569e69960ba2b3c4098c3dc3316b9bd.zip |
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/sv.c')
-rw-r--r-- | runit/sv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runit/sv.c b/runit/sv.c index 0817ab472..630f1f37e 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -193,7 +193,7 @@ struct globals { | |||
193 | /* "Bernstein" time format: unix + 0x400000000000000aULL */ | 193 | /* "Bernstein" time format: unix + 0x400000000000000aULL */ |
194 | uint64_t tstart, tnow; | 194 | uint64_t tstart, tnow; |
195 | svstatus_t svstatus; | 195 | svstatus_t svstatus; |
196 | unsigned islog; | 196 | smallint islog; |
197 | } FIX_ALIASING; | 197 | } FIX_ALIASING; |
198 | #define G (*(struct globals*)bb_common_bufsiz1) | 198 | #define G (*(struct globals*)bb_common_bufsiz1) |
199 | #define acts (G.acts ) | 199 | #define acts (G.acts ) |
@@ -203,7 +203,13 @@ struct globals { | |||
203 | #define tnow (G.tnow ) | 203 | #define tnow (G.tnow ) |
204 | #define svstatus (G.svstatus ) | 204 | #define svstatus (G.svstatus ) |
205 | #define islog (G.islog ) | 205 | #define islog (G.islog ) |
206 | #define INIT_G() do { setup_common_bufsiz(); } while (0) | 206 | #define INIT_G() do { \ |
207 | setup_common_bufsiz(); \ | ||
208 | /* need to zero out, we are NOEXEC */ \ | ||
209 | rc = EXIT_SUCCESS; \ | ||
210 | islog = 0; \ | ||
211 | /* other fields need not be zero */ \ | ||
212 | } while (0) | ||
207 | 213 | ||
208 | 214 | ||
209 | #define str_equal(s,t) (strcmp((s), (t)) == 0) | 215 | #define str_equal(s,t) (strcmp((s), (t)) == 0) |