diff options
author | Colin Walters <walters@verbum.org> | 2020-03-21 14:48:24 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2020-03-24 16:34:26 +0000 |
commit | b3bbbd154225e81980546b2c0b5ed98714830696 (patch) | |
tree | cf95c2e08c0cc5db39e00a5fa8490a76d626e51c /src/libostree/ostree-repo.h | |
parent | 41d3dfa7b8591c9b388e160b6248aa2ce1d71bbf (diff) | |
download | ostree-b3bbbd154225e81980546b2c0b5ed98714830696.tar.gz |
repo/commit: Add support for --selinux-policy-from-base
The [dev-overlay](https://github.com/coreos/coreos-assembler/blob/332c6ab3b91778d904224c3c960d9cc4739d60bd/src/cmd-dev-overlay)
script shipped in coreos-assembler mostly exists to deal
with the nontrivial logic around SELinux policy. Let's make
the use case of "commit some binaries overlaying a base tree, using
the base's selinux policy" just require a magical
`--selinux-policy-from-base` argument to `ostree commit`.
A new C API was added to implement this in the case of `--tree=ref`;
when the base directory is already checked out, we can just reuse
the existing logic that `--selinux-policy` was using.
Requires: https://github.com/ostreedev/ostree/pull/2039
Diffstat (limited to 'src/libostree/ostree-repo.h')
-rw-r--r-- | src/libostree/ostree-repo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index 40d3f773..014afff9 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -692,6 +692,13 @@ void ostree_repo_commit_modifier_set_sepolicy (OstreeRepoCommitModifier OstreeSePolicy *sepolicy); _OSTREE_PUBLIC +gboolean ostree_repo_commit_modifier_set_sepolicy_from_commit (OstreeRepoCommitModifier *modifier, + OstreeRepo *repo, + const char *commit, + GCancellable *cancellable, + GError **error); + +_OSTREE_PUBLIC void ostree_repo_commit_modifier_set_devino_cache (OstreeRepoCommitModifier *modifier, OstreeRepoDevInoCache *cache); |