diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-02-06 21:37:49 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-02-06 22:27:21 +0100 |
commit | d7887449e7c972770b6dd896f7d8c09f0d26c88f (patch) | |
tree | efd40b5a46322eef75e81fec7121527ca4329ba8 | |
parent | 22cd7aabecd81fca14026749e48eadddff98a4bd (diff) | |
download | systemd-d7887449e7c972770b6dd896f7d8c09f0d26c88f.tar.gz |
basic/selinux-util: expose _cleanup_freecon_
-rw-r--r-- | src/basic/selinux-util.c | 3 | ||||
-rw-r--r-- | src/basic/selinux-util.h | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c index 1d209d03d5..90bb93ed0b 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -28,10 +28,7 @@ #include "time-util.h" #if HAVE_SELINUX -DEFINE_TRIVIAL_CLEANUP_FUNC(char*, freecon); DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free); - -#define _cleanup_freecon_ _cleanup_(freeconp) #define _cleanup_context_free_ _cleanup_(context_freep) static int cached_use = -1; diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h index 639c35b687..b73b7c50e0 100644 --- a/src/basic/selinux-util.h +++ b/src/basic/selinux-util.h @@ -8,6 +8,13 @@ #include "macro.h" #include "label.h" +#if HAVE_SELINUX +#include <selinux/selinux.h> + +DEFINE_TRIVIAL_CLEANUP_FUNC(char*, freecon); +#define _cleanup_freecon_ _cleanup_(freeconp) +#endif + bool mac_selinux_use(void); void mac_selinux_retest(void); |