build: Fix --without-selinux case
This commit is contained in:
parent
e580a88f4e
commit
3007aeb160
|
|
@ -503,8 +503,10 @@ init_labeling_context (GFile *deployment_etc,
|
||||||
static void
|
static void
|
||||||
ostree_labeling_context_cleanup (OstreeLabelingContext *secontext)
|
ostree_labeling_context_cleanup (OstreeLabelingContext *secontext)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_SELINUX
|
||||||
if (secontext->hnd)
|
if (secontext->hnd)
|
||||||
selabel_close (secontext->hnd);
|
selabel_close (secontext->hnd);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
@ -545,6 +547,7 @@ selinux_relabel_dir (OstreeSysroot *sysroot,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SELINUX
|
||||||
static gboolean
|
static gboolean
|
||||||
selinux_relabel_file (OstreeLabelingContext *secontext,
|
selinux_relabel_file (OstreeLabelingContext *secontext,
|
||||||
GFile *path,
|
GFile *path,
|
||||||
|
|
@ -552,7 +555,6 @@ selinux_relabel_file (OstreeLabelingContext *secontext,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SELINUX
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
if (secontext->have_policy)
|
if (secontext->have_policy)
|
||||||
|
|
@ -578,10 +580,8 @@ selinux_relabel_file (OstreeLabelingContext *secontext,
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
#else
|
|
||||||
return TRUE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
selinux_relabel_var_if_needed (OstreeSysroot *sysroot,
|
selinux_relabel_var_if_needed (OstreeSysroot *sysroot,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue