eabdullin
2daa9ba65a
- qemu: domain: Check arch in qemuDomainMakeCPUMigratable - conf: cpu: Introduce virCPUDefListFeatures - qemu: domain: Drop added features from migratable CPU - Add vmx-* features to Broadwell* - Add vmx-* features to Cascadelake* - Add vmx-* features to Conroe - Add vmx-* features to Cooperlake - Add vmx-* features to core2duo - Add vmx-* features to Haswell* - Add vmx-* features to Icelake* - Add vmx-* features to IvyBridge* - Add vmx-* features to kvm* - Add vmx-* features to Nehalem* - Add vmx-* features to Penryn - Add vmx-* features to SandyBridge* - Add vmx-* features to SapphireRapids - Add vmx-* features to Skylake* - Add vmx-* features to Snowridge - Add vmx-* features to Westmere* - qemu: virtiofs: do not crash if cgroups are missing - qemu: virtiofs: set correct label when creating the socket - qemu: virtiofs: error out if getting the group or user name fails
30 lines
988 B
Diff
30 lines
988 B
Diff
From c9de7a1c3bca9f0732205f2c2b84526781dbf5e5 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
Date: Thu, 7 Mar 2024 13:36:45 +0100
|
|
Subject: [PATCH] qemu: virtiofs: error out if getting the group or user name
|
|
fails
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
---
|
|
src/qemu/qemu_virtiofs.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
|
|
index d80cddd3ba9..78897d81778 100644
|
|
--- a/src/qemu/qemu_virtiofs.c
|
|
+++ b/src/qemu/qemu_virtiofs.c
|
|
@@ -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);
|
|
|