compose: Check for error when opening policy

Closes: #1658
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2018-11-02 15:12:21 -04:00 committed by Atomic Bot
parent c3be38af72
commit 74db30872b

View File

@ -350,6 +350,9 @@ install_packages (RpmOstreeTreeComposeContext *self,
* be important for the ostree-rojig work. * be important for the ostree-rojig work.
*/ */
g_autoptr(OstreeSePolicy) sepolicy = ostree_sepolicy_new_at (rootfs_dfd, cancellable, error); g_autoptr(OstreeSePolicy) sepolicy = ostree_sepolicy_new_at (rootfs_dfd, cancellable, error);
if (sepolicy == NULL)
return FALSE;
rpmostree_context_set_sepolicy (self->corectx, sepolicy); rpmostree_context_set_sepolicy (self->corectx, sepolicy);
if (!rpmostree_context_force_relabel (self->corectx, cancellable, error)) if (!rpmostree_context_force_relabel (self->corectx, cancellable, error))