basic/selinux-util: expose _cleanup_freecon_

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-02-06 21:37:49 +01:00
parent 22cd7aabec
commit d7887449e7
2 changed files with 7 additions and 3 deletions

View file

@ -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;

View file

@ -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);