/src/systemd/src/shared/apparmor-util.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | | #pragma once |
3 | | |
4 | | #include "forward.h" |
5 | | |
6 | | #if HAVE_APPARMOR |
7 | | # include <sys/apparmor.h> |
8 | | |
9 | | # include "dlfcn-util.h" |
10 | | |
11 | | extern DLSYM_PROTOTYPE(aa_change_onexec); |
12 | | extern DLSYM_PROTOTYPE(aa_change_profile); |
13 | | extern DLSYM_PROTOTYPE(aa_features_new_from_kernel); |
14 | | extern DLSYM_PROTOTYPE(aa_features_unref); |
15 | | extern DLSYM_PROTOTYPE(aa_policy_cache_dir_path_preview); |
16 | | extern DLSYM_PROTOTYPE(aa_policy_cache_new); |
17 | | extern DLSYM_PROTOTYPE(aa_policy_cache_replace_all); |
18 | | extern DLSYM_PROTOTYPE(aa_policy_cache_unref); |
19 | | |
20 | | DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(aa_features*, sym_aa_features_unref, NULL); |
21 | | DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(aa_policy_cache*, sym_aa_policy_cache_unref, NULL); |
22 | | |
23 | | int dlopen_libapparmor(void); |
24 | | #else |
25 | 0 | static inline int dlopen_libapparmor(void) { |
26 | 0 | return -EOPNOTSUPP; |
27 | 0 | } Unexecuted instantiation: apparmor-util.c:dlopen_libapparmor Unexecuted instantiation: condition.c:dlopen_libapparmor |
28 | | #endif |
29 | | |
30 | | bool mac_apparmor_use(void); |