From 200bcc851acbe1ba30fe90b5cf918f88370a5d15 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 21 Aug 2017 19:30:01 +0200 Subject: run-init: new applet function old new delta switch_root_main 354 637 +283 drop_usermodehelper - 157 +157 cap_name_to_number - 77 +77 packed_usage 31707 31743 +36 applet_names 2665 2674 +9 applet_main 1544 1548 +4 applet_install_loc 193 194 +1 setpriv_main 933 928 -5 getcaps 131 122 -9 parse_cap 117 29 -88 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 5/3 up/down: 567/-102) Total: 465 bytes Signed-off-by: Denys Vlasenko --- include/libbb.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 9535f5f..95a7470 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1475,6 +1475,15 @@ const char *get_shell_name(void) FAST_FUNC; 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; +/* Structures inside "struct caps" are Linux-specific and libcap-specific: */ +#define DEFINE_STRUCT_CAPS \ +struct caps { \ + struct __user_cap_header_struct header; \ + unsigned u32s; \ + 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; -- cgit v1.1