提交 efe3575e 编写于 作者: C Cole Robinson

security: dac: Label externalDataStore

We mirror the labeling strategy that was used for its sibling
image
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 aa736c09
......@@ -884,7 +884,7 @@ virSecurityDACSetImageLabelInternal(virSecurityManagerPtr mgr,
virSecurityDeviceLabelDefPtr parent_seclabel = NULL;
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
bool remember;
bool is_toplevel = parent == src;
bool is_toplevel = parent == src || parent->externalDataStore == src;
uid_t user;
gid_t group;
......@@ -948,6 +948,14 @@ virSecurityDACSetImageLabelRelative(virSecurityManagerPtr mgr,
if (virSecurityDACSetImageLabelInternal(mgr, def, n, parent) < 0)
return -1;
if (n->externalDataStore &&
virSecurityDACSetImageLabelRelative(mgr,
def,
n->externalDataStore,
parent,
flags) < 0)
return -1;
if (!(flags & VIR_SECURITY_DOMAIN_IMAGE_LABEL_BACKING_CHAIN))
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册