sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_attach_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_autostart_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_cgroup_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_config_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_console_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_destroy_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_device_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_execute_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_freeze_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_info_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_monitor_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_ls_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_copy_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_start_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_stop_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_top_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_unfreeze_SOURCES += seccomp.c lxcseccomp.h
endif
syscall_wrappers.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_unshare_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_wait_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_create_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_snapshot_SOURCES += seccomp.c lxcseccomp.h
endif
sync.c sync.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_checkpoint_SOURCES += seccomp.c lxcseccomp.h
endif
syscall_numbers.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_monitord_SOURCES += seccomp.c lxcseccomp.h
endif
syscall_wrappers.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_user_nic_SOURCES += seccomp.c lxcseccomp.h
endif
syscall_wrappers.h \
terminal.c terminal.h \
utils.c utils.h \
- uuid.c uuid.h
+ uuid.c uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_usernsexec_SOURCES += seccomp.c lxcseccomp.h
endif
#include <sys/types.h>
+#include "compiler.h"
#include "macro.h"
#include "utils.h"
void (*cleanup)(struct lxc_conf *conf, const char *lxcpath);
};
-extern void lsm_init(void);
-extern int lsm_enabled(void);
-extern const char *lsm_name(void);
-extern char *lsm_process_label_get(pid_t pid);
-extern int lsm_process_prepare(struct lxc_conf *conf, const char *lxcpath);
-extern int lsm_process_label_set(const char *label, struct lxc_conf *conf,
- bool on_exec);
-extern int lsm_process_label_fd_get(pid_t pid, bool on_exec);
-extern int lsm_process_label_set_at(int label_fd, const char *label,
- bool on_exec);
-extern void lsm_process_cleanup(struct lxc_conf *conf, const char *lxcpath);
-extern int lsm_keyring_label_set(char *label);
+__hidden extern void lsm_init(void);
+__hidden extern int lsm_enabled(void);
+__hidden extern const char *lsm_name(void);
+__hidden extern char *lsm_process_label_get(pid_t pid);
+__hidden extern int lsm_process_prepare(struct lxc_conf *conf, const char *lxcpath);
+__hidden extern int lsm_process_label_set(const char *label, struct lxc_conf *conf, bool on_exec);
+__hidden extern int lsm_process_label_fd_get(pid_t pid, bool on_exec);
+__hidden extern int lsm_process_label_set_at(int label_fd, const char *label, bool on_exec);
+__hidden extern void lsm_process_cleanup(struct lxc_conf *conf, const char *lxcpath);
+__hidden extern int lsm_keyring_label_set(char *label);
#endif /* __LXC_LSM_H */
@SELINUX_LIBS@ \
@DLOG_LIBS@
+LSM_SOURCES = ../lxc/lsm/lsm.c \
+ ../lxc/lsm/lsm.h \
+ ../lxc/lsm/nop.c
+
+if ENABLE_APPARMOR
+LSM_SOURCES += ../lxc/lsm/apparmor.c
+endif
+
+if ENABLE_SELINUX
+LSM_SOURCES += ../lxc/lsm/selinux.c
+endif
+
lxc_test_api_reboot_SOURCES = api_reboot.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_api_reboot_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_apparmor_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_attach_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_cgpath_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_config_jump_table_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_locktests_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_mount_injection_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_parse_config_file_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif
lxc_test_raw_clone_SOURCES = lxc_raw_clone.c \
lxctest.h \
+ ../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
+ ../lxc/commands.c ../lxc/commands.h \
+ ../lxc/commands_utils.c ../lxc/commands_utils.h \
+ ../lxc/conf.c ../lxc/conf.h \
+ ../lxc/confile.c ../lxc/confile.h \
+ ../lxc/confile_utils.c ../lxc/confile_utils.h \
+ ../lxc/error.c ../lxc/error.h \
../lxc/file_utils.c ../lxc/file_utils.h \
+ ../lxc/initutils.c ../lxc/initutils.h \
../lxc/log.c ../lxc/log.h \
+ ../lxc/lxclock.c ../lxc/lxclock.h \
+ ../lxc/mainloop.c ../lxc/mainloop.h \
+ ../lxc/monitor.c ../lxc/monitor.h \
../lxc/namespace.c ../lxc/namespace.h \
+ ../lxc/network.c ../lxc/network.h \
+ ../lxc/nl.c ../lxc/nl.h \
+ ../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
+ ../lxc/start.c ../lxc/start.h \
+ ../lxc/state.c ../lxc/state.h \
+ ../lxc/sync.c ../lxc/sync.h \
../lxc/string_utils.c ../lxc/string_utils.h \
- ../lxc/utils.c ../lxc/utils.h
+ ../lxc/terminal.c ../lxc/terminal.h \
+ ../lxc/utils.c ../lxc/utils.h \
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
+if ENABLE_SECCOMP
+lxc_test_raw_clone_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
+endif
+
lxc_test_reboot_SOURCES = reboot.c
lxc_test_saveconfig_SOURCES = saveconfig.c
lxc_test_share_ns_SOURCES = share_ns.c \
../lxc/string_utils.c ../lxc/string_utils.h \
../lxc/terminal.c ../lxc/terminal.h \
../lxc/utils.c ../lxc/utils.h \
- ../lxc/uuid.c ../lxc/uuid.h
+ ../lxc/uuid.c ../lxc/uuid.h \
+ $(LSM_SOURCES)
if ENABLE_SECCOMP
lxc_test_utils_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
endif