repo: Add an API to init OstreeSePolicy from commit directly

This is part of `OstreeCommitModifier`, but I'm not using
that in some of the ostree-ext Rust code.

It just makes more sense as a direct policy API, where it should
have been in the first place.  There's already support for
setting a policy object on a commit modifier, so that's all the
old API needs to do now.
This commit is contained in:
Colin Walters committed 2021-09-30 15:54:48 -04:00
1 parent 4b61768e3d
commit 1b9e3a9375
6 files changed
+72 -34

No files matched your search

+5
View File
@@ -44,6 +44,11 @@ OstreeSePolicy* ostree_sepolicy_new_at (int rootfs_dfd,
GCancellable *cancellable,
GError **error);
_OSTREE_PUBLIC
OstreeSePolicy* ostree_sepolicy_new_from_commit (OstreeRepo *repo,
const char *rev,
GCancellable *cancellable,
GError **error);
_OSTREE_PUBLIC
GFile * ostree_sepolicy_get_path (OstreeSePolicy *self);