This will be used for recursing into externalDataStore Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx> --- src/security/security_dac.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index befa388791..326b9b1a3c 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -934,15 +934,16 @@ virSecurityDACSetImageLabelInternal(virSecurityManagerPtr mgr, static int -virSecurityDACSetImageLabel(virSecurityManagerPtr mgr, - virDomainDefPtr def, - virStorageSourcePtr src, - virSecurityDomainImageLabelFlags flags) +virSecurityDACSetImageLabelRelative(virSecurityManagerPtr mgr, + virDomainDefPtr def, + virStorageSourcePtr src, + virStorageSourcePtr parent, + virSecurityDomainImageLabelFlags flags) { virStorageSourcePtr n; for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) { - if (virSecurityDACSetImageLabelInternal(mgr, def, n, src) < 0) + if (virSecurityDACSetImageLabelInternal(mgr, def, n, parent) < 0) return -1; if (!(flags & VIR_SECURITY_DOMAIN_IMAGE_LABEL_BACKING_CHAIN)) @@ -952,6 +953,14 @@ virSecurityDACSetImageLabel(virSecurityManagerPtr mgr, return 0; } +static int +virSecurityDACSetImageLabel(virSecurityManagerPtr mgr, + virDomainDefPtr def, + virStorageSourcePtr src, + virSecurityDomainImageLabelFlags flags) +{ + return virSecurityDACSetImageLabelRelative(mgr, def, src, src, flags); +} static int virSecurityDACRestoreImageLabelSingle(virSecurityManagerPtr mgr, -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list