diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/busybox.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/busybox.h b/include/busybox.h index b1e31e5ee..737627bd0 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -15,25 +15,20 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |||
15 | /* Keep in sync with applets/applet_tables.c! */ | 15 | /* Keep in sync with applets/applet_tables.c! */ |
16 | extern const char applet_names[] ALIGN1; | 16 | extern const char applet_names[] ALIGN1; |
17 | extern int (*const applet_main[])(int argc, char **argv); | 17 | extern int (*const applet_main[])(int argc, char **argv); |
18 | extern const uint16_t applet_nameofs[]; | 18 | extern const uint8_t applet_flags[] ALIGN1; |
19 | extern const uint8_t applet_suid[] ALIGN1; | ||
19 | extern const uint8_t applet_install_loc[] ALIGN1; | 20 | extern const uint8_t applet_install_loc[] ALIGN1; |
20 | 21 | ||
21 | #if ENABLE_FEATURE_SUID || ENABLE_FEATURE_PREFER_APPLETS | ||
22 | # define APPLET_NAME(i) (applet_names + (applet_nameofs[i] & 0x0fff)) | ||
23 | #else | ||
24 | # define APPLET_NAME(i) (applet_names + applet_nameofs[i]) | ||
25 | #endif | ||
26 | |||
27 | #if ENABLE_FEATURE_PREFER_APPLETS | 22 | #if ENABLE_FEATURE_PREFER_APPLETS |
28 | # define APPLET_IS_NOFORK(i) (applet_nameofs[i] & (1 << 12)) | 23 | # define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4)))) |
29 | # define APPLET_IS_NOEXEC(i) (applet_nameofs[i] & (1 << 13)) | 24 | # define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1))) |
30 | #else | 25 | #else |
31 | # define APPLET_IS_NOFORK(i) 0 | 26 | # define APPLET_IS_NOFORK(i) 0 |
32 | # define APPLET_IS_NOEXEC(i) 0 | 27 | # define APPLET_IS_NOEXEC(i) 0 |
33 | #endif | 28 | #endif |
34 | 29 | ||
35 | #if ENABLE_FEATURE_SUID | 30 | #if ENABLE_FEATURE_SUID |
36 | # define APPLET_SUID(i) ((applet_nameofs[i] >> 14) & 0x3) | 31 | # define APPLET_SUID(i) ((applet_suid[(i)/4] >> (2 * ((i)%4)) & 3)) |
37 | #endif | 32 | #endif |
38 | 33 | ||
39 | #if ENABLE_FEATURE_INSTALLER | 34 | #if ENABLE_FEATURE_INSTALLER |