From c0cb60bd5e23b773c9183313abddea892196ec6a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 10 Jan 2018 15:19:48 -0500 Subject: [PATCH] core: Don't try to relabel if no SELinux policy This tripped up some local `ex container` work after: https://github.com/projectatomic/rpm-ostree/pull/1173 Would be nice to have tests but...let's slide this one through for now since I plan to get a lot more coverage as `ex container` morphs into a `mock` replacement. Closes: #1194 Approved by: jlebon --- src/libpriv/rpmostree-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libpriv/rpmostree-core.c b/src/libpriv/rpmostree-core.c index c77fbb78..025847f8 100644 --- a/src/libpriv/rpmostree-core.c +++ b/src/libpriv/rpmostree-core.c @@ -1275,7 +1275,9 @@ find_pkg_in_ostree (RpmOstreeContext *self, { OstreeRepo *repo = get_pkgcache_repo (self); /* Init output here, since we have several early returns */ - *out_in_ostree = *out_selinux_match = FALSE; + *out_in_ostree = FALSE; + /* If there's no sepolicy, then we always match */ + *out_selinux_match = (sepolicy == NULL); /* NB: we're not using a pkgcache yet in the compose path */ if (repo == NULL)