Skip to content

Commit

Permalink
lib/postprocess: Create OstreeSePolicy more directly
Browse files Browse the repository at this point in the history
We already called the `workaround_selinux_cross_labeling_recurse()`
in the postprocessing path, there's no need to do it again during
commit.

Just making this change as I was going to do some SePolicy stuff
for the [jigdo work](coreos#1081)
and stumbled again into the ugly mess that is the cross-labeling
hack.
  • Loading branch information
cgwalters committed Nov 6, 2017
1 parent 1837bf5 commit 7b84b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libpriv/rpmostree-postprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,11 +1857,11 @@ rpmostree_commit (int rootfs_fd,
GCancellable *cancellable,
GError **error)
{
/* hardcode targeted policy for now */
g_autoptr(OstreeSePolicy) sepolicy = NULL;
if (enable_selinux)
{
if (!rpmostree_prepare_rootfs_get_sepolicy (rootfs_fd, &sepolicy, cancellable, error))
sepolicy = ostree_sepolicy_new_at (rootfs_fd, cancellable, error);
if (!sepolicy)
return FALSE;
}

Expand Down

0 comments on commit 7b84b21

Please sign in to comment.