diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-21 20:13:39 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-21 20:13:39 +0100 |
commit | 2af5e3fac394a922bcf7752be25128879405a21a (patch) | |
tree | 3566d0edc685776aa192686507a38411c51662c0 /util-linux/switch_root.c | |
parent | 7d285c78a35b1e745f7c6f27e31d73677ad2943a (diff) | |
download | busybox-w32-2af5e3fac394a922bcf7752be25128879405a21a.tar.gz busybox-w32-2af5e3fac394a922bcf7752be25128879405a21a.tar.bz2 busybox-w32-2af5e3fac394a922bcf7752be25128879405a21a.zip |
libbb: compile capability code only if FEATURE_SETPRIV_CAPABILITIES or RUN_INIT
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/switch_root.c')
-rw-r--r-- | util-linux/switch_root.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 2d1802b79..947dd0cdc 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
@@ -39,6 +39,12 @@ | |||
39 | #include <sys/mount.h> | 39 | #include <sys/mount.h> |
40 | #if ENABLE_RUN_INIT | 40 | #if ENABLE_RUN_INIT |
41 | # include <sys/prctl.h> | 41 | # include <sys/prctl.h> |
42 | # ifndef PR_CAPBSET_READ | ||
43 | # define PR_CAPBSET_READ 23 | ||
44 | # endif | ||
45 | # ifndef PR_CAPBSET_DROP | ||
46 | # define PR_CAPBSET_DROP 24 | ||
47 | # endif | ||
42 | # include <linux/capability.h> | 48 | # include <linux/capability.h> |
43 | // #include <sys/capability.h> | 49 | // #include <sys/capability.h> |
44 | // This header is in libcap, but the functions are in libc. | 50 | // This header is in libcap, but the functions are in libc. |