summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-sepolicy.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2021-09-28 17:40:28 -0400
committerColin Walters <walters@verbum.org>2021-09-30 15:54:48 -0400
commit1b9e3a9375a2da70b6ee049c6ff0989c9831963b (patch)
tree5db0df88574ee42db8f58f98d905d59a4a89d6a3 /src/libostree/ostree-sepolicy.h
parent4b61768e3dc7d2f4453fb44f1f640ccb092b59d1 (diff)
downloadostree-1b9e3a9375a2da70b6ee049c6ff0989c9831963b.tar.gz
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.
Diffstat (limited to 'src/libostree/ostree-sepolicy.h')
-rw-r--r--src/libostree/ostree-sepolicy.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libostree/ostree-sepolicy.h b/src/libostree/ostree-sepolicy.h
index 7e90527f..0e8cf5af 100644
--- a/src/libostree/ostree-sepolicy.h
+++ b/src/libostree/ostree-sepolicy.h
@@ -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);