From: Peter Krempa Date: Thu, 19 Jun 2014 15:18:02 +0000 (+0200) Subject: security: manager: Document behavior of disk label manipulation funcs X-Git-Tag: v1.2.6-rc2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b641f44fc2ba6661106886c95d427ad640fadab;p=thirdparty%2Flibvirt.git security: manager: Document behavior of disk label manipulation funcs virSecurityManagerSetDiskLabel and virSecurityManagerRestoreDiskLabel don't have complementary semantics. Document the semantics to avoid possible problems. --- diff --git a/src/security/security_manager.c b/src/security/security_manager.c index bb12e8ec20..06e5123db1 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -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,