summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-sepolicy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libostree/ostree-sepolicy.c')
-rw-r--r--src/libostree/ostree-sepolicy.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libostree/ostree-sepolicy.c b/src/libostree/ostree-sepolicy.c
index 5fd59a82..a7795a96 100644
--- a/src/libostree/ostree-sepolicy.c
+++ b/src/libostree/ostree-sepolicy.c
@@ -307,7 +307,7 @@ ostree_sepolicy_new_from_commit (OstreeRepo *repo,
OstreeRepoCheckoutAtOptions coopts = {0,};
coopts.mode = OSTREE_REPO_CHECKOUT_MODE_USER;
coopts.subpath = glnx_strjoina ("/", policypath);
-
+
if (!ostree_repo_checkout_at (repo, &coopts, tmpdir.fd, policypath, commit, cancellable, error))
return glnx_prefix_error_null (error, "policy checkout");
}
@@ -502,7 +502,7 @@ ostree_sepolicy_new_at (int rootfs_dfd,
* policy objects to be created from file-descriptor relative paths, which
* may not be globally accessible.
*
- * Returns: (transfer none): Path to rootfs
+ * Returns: (transfer none) (nullable): Path to rootfs
*/
GFile *
ostree_sepolicy_get_path (OstreeSePolicy *self)
@@ -530,7 +530,7 @@ ostree_sepolicy_get_name (OstreeSePolicy *self)
* ostree_sepolicy_get_csum:
* @self:
*
- * Returns: (transfer none): Checksum of current policy
+ * Returns: (transfer none) (nullable): Checksum of current policy
*
* Since: 2016.5
*/
@@ -549,7 +549,7 @@ ostree_sepolicy_get_csum (OstreeSePolicy *self)
* @self: Self
* @relpath: Path
* @unix_mode: Unix mode
- * @out_label: (allow-none) (out) (transfer full): Return location for security context
+ * @out_label: (nullable) (out) (transfer full): Return location for security context
* @cancellable: Cancellable
* @error: Error
*
@@ -565,6 +565,7 @@ ostree_sepolicy_get_label (OstreeSePolicy *self,
GCancellable *cancellable,
GError **error)
{
+ *out_label = NULL;
#ifdef HAVE_SELINUX
/* Early return if no policy */
if (!self->selinux_hnd)
@@ -600,10 +601,10 @@ ostree_sepolicy_get_label (OstreeSePolicy *self,
* ostree_sepolicy_restorecon:
* @self: Self
* @path: Path string to use for policy lookup
- * @info: (allow-none): File attributes
+ * @info: (nullable): File attributes
* @target: Physical path to target file
* @flags: Flags controlling behavior
- * @out_new_label: (allow-none) (out): New label, or %NULL if unchanged
+ * @out_new_label: (nullable) (optional) (out): New label, or %NULL if unchanged
* @cancellable: Cancellable
* @error: Error
*