]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
security: manager: Document behavior of disk label manipulation funcs
authorPeter Krempa <pkrempa@redhat.com>
Thu, 19 Jun 2014 15:18:02 +0000 (17:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 26 Jun 2014 08:18:47 +0000 (10:18 +0200)
virSecurityManagerSetDiskLabel and virSecurityManagerRestoreDiskLabel
don't have complementary semantics. Document the semantics to avoid
possible problems.

src/security/security_manager.c

index bb12e8ec2080fda86685fb6d6dcd1ba77fa78d38..06e5123db1181ede55bc68a4f625f72577026a79 100644 (file)
@@ -331,6 +331,17 @@ virSecurityManagerGetRequireConfined(virSecurityManagerPtr mgr)
 }
 
 
+/**
+ * virSecurityManagerRestoreDiskLabel:
+ * @mgr: security manager object
+ * @vm: domain definition object
+ * @disk: disk definition to operate on
+ *
+ * Removes security label from the source image of the disk. Note that this
+ * function doesn't restore labels on backing chain elements of @disk.
+ *
+ * Returns: 0 on success, -1 on error.
+ */
 int
 virSecurityManagerRestoreDiskLabel(virSecurityManagerPtr mgr,
                                    virDomainDefPtr vm,
@@ -400,6 +411,17 @@ virSecurityManagerClearSocketLabel(virSecurityManagerPtr mgr,
 }
 
 
+/**
+ * virSecurityManagerSetDiskLabel:
+ * @mgr: security manager object
+ * @vm: domain definition object
+ * @disk: disk definition to operate on
+ *
+ * Labels the disk image and all images in the backing chain with the configured
+ * security label.
+ *
+ * Returns: 0 on success, -1 on error.
+ */
 int
 virSecurityManagerSetDiskLabel(virSecurityManagerPtr mgr,
                                virDomainDefPtr vm,