libbb: compile capability code only if FEATURE_SETPRIV_CAPABILITIES or RUN_INIT

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-02-21 20:13:39 +01:00
parent 7d285c78a3
commit 2af5e3fac3
3 changed files with 10 additions and 4 deletions

View File

@@ -1488,6 +1488,7 @@ extern void run_shell(const char *shell, int loginshell, const char **args) NORE
*/
const char *get_shell_name(void) FAST_FUNC;
#if ENABLE_FEATURE_SETPRIV_CAPABILITIES || ENABLE_RUN_INIT
unsigned cap_name_to_number(const char *cap) FAST_FUNC;
void printf_cap(const char *pfx, unsigned cap_no) FAST_FUNC;
void drop_capability(int cap_ordinal) FAST_FUNC;
@@ -1499,9 +1500,7 @@ struct caps { \
struct __user_cap_data_struct data[2]; \
}
void getcaps(void *caps) FAST_FUNC;
unsigned cap_name_to_number(const char *name) FAST_FUNC;
void printf_cap(const char *pfx, unsigned cap_no) FAST_FUNC;
#endif
#if ENABLE_SELINUX
extern void renew_current_security_context(void) FAST_FUNC;