]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
caps: hide unnecessary symbols
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 17 Jul 2020 21:17:00 +0000 (23:17 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 17 Jul 2020 21:24:23 +0000 (23:24 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/Makefile.am
src/lxc/caps.h

index 4096528e548a6fe584ffb04c1016b5932455eaec..a6757b456f495ae56054722eb1e9f9d09de51c61 100644 (file)
@@ -331,6 +331,7 @@ LDADD = liblxc.la \
 if ENABLE_TOOLS
 lxc_attach_SOURCES = tools/lxc_attach.c \
                     tools/arguments.c tools/arguments.h \
+                    caps.c caps.h \
                     rexec.c rexec.h \
                     string_utils.c string_utils.h
 lxc_autostart_SOURCES = tools/lxc_autostart.c \
@@ -353,6 +354,7 @@ lxc_device_SOURCES = tools/lxc_device.c \
                     string_utils.c string_utils.h
 lxc_execute_SOURCES = tools/lxc_execute.c \
                      tools/arguments.c tools/arguments.h \
+                     caps.c caps.h \
                      string_utils.c string_utils.h
 lxc_freeze_SOURCES = tools/lxc_freeze.c \
                     tools/arguments.c tools/arguments.h \
@@ -373,6 +375,7 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
                   string_utils.c string_utils.h
 lxc_start_SOURCES = tools/lxc_start.c \
                    tools/arguments.c tools/arguments.h \
+                   caps.c caps.h \
                    string_utils.c string_utils.h
 lxc_stop_SOURCES = tools/lxc_stop.c \
                   tools/arguments.c tools/arguments.h \
@@ -385,6 +388,7 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
                       string_utils.c string_utils.h
 lxc_unshare_SOURCES = tools/lxc_unshare.c \
                      tools/arguments.c tools/arguments.h \
+                     caps.c caps.h \
                      string_utils.c string_utils.h \
                      syscall_numbers.h \
                      syscall_wrappers.h
@@ -419,6 +423,7 @@ init_lxc_LDFLAGS = -pthread
 
 lxc_monitord_SOURCES = cmd/lxc_monitord.c \
                       af_unix.c af_unix.h \
+                      caps.c caps.h \
                       log.c log.h \
                       mainloop.c mainloop.h \
                       monitor.c monitor.h \
@@ -428,6 +433,7 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
                       utils.c utils.h
 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
                       ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
+                      caps.c caps.h \
                       log.c log.h \
                       memory_utils.h \
                       network.c network.h \
@@ -440,6 +446,7 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
                       syscall_wrappers.h
 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
                         af_unix.c af_unix.h \
+                        caps.c caps.h \
                         conf.c conf.h \
                         file_utils.c file_utils.h \
                         list.h \
index 366890e8d3cfa7bb38d56ae6cbb21c3744d605aa..c3e2c6d2149449a7085a22e28317d8f2290942be 100644 (file)
@@ -6,20 +6,20 @@
 #include <stdbool.h>
 
 #include "config.h"
+#include "compiler.h"
 
 #if HAVE_LIBCAP
 #include <linux/types.h> /* workaround for libcap < 2.17 bug */
 #include <sys/capability.h>
 
-extern int lxc_caps_down(void);
-extern int lxc_caps_up(void);
-extern int lxc_ambient_caps_up(void);
-extern int lxc_ambient_caps_down(void);
-extern int lxc_caps_init(void);
-extern int lxc_caps_last_cap(void);
-extern bool lxc_proc_cap_is_set(cap_value_t cap, cap_flag_t flag);
-extern bool lxc_file_cap_is_set(const char *path, cap_value_t cap,
-                               cap_flag_t flag);
+__hidden extern int lxc_caps_down(void);
+__hidden extern int lxc_caps_up(void);
+__hidden extern int lxc_ambient_caps_up(void);
+__hidden extern int lxc_ambient_caps_down(void);
+__hidden extern int lxc_caps_init(void);
+__hidden extern int lxc_caps_last_cap(void);
+__hidden extern bool lxc_proc_cap_is_set(cap_value_t cap, cap_flag_t flag);
+__hidden extern bool lxc_file_cap_is_set(const char *path, cap_value_t cap, cap_flag_t flag);
 #else
 static inline int lxc_caps_down(void)
 {