mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: virtiofs: error out if getting the group or user name fails
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
4c5b2e1e0d
commit
c9de7a1c3b
@ -388,6 +388,9 @@ qemuVirtioFSPrepareIdMap(virDomainFSDef *fs)
|
||||
username = virGetUserName(euid);
|
||||
groupname = virGetGroupName(egid);
|
||||
|
||||
if (!username || !groupname)
|
||||
return -1;
|
||||
|
||||
fs->idmap.uidmap = g_new0(virDomainIdMapEntry, 2);
|
||||
fs->idmap.gidmap = g_new0(virDomainIdMapEntry, 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user