]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: virtiofs: do not force UID 0
authorJán Tomko <jtomko@redhat.com>
Thu, 7 Sep 2023 14:22:43 +0000 (16:22 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 14 Dec 2023 16:10:22 +0000 (17:10 +0100)
Remove the explicit setting of uid 0 when running virtiofsd.

It is not required for privileged mode, where virtiofsd will be run
as root anyway. And for unprivileged mode, virtiofsd no longer requires
to be run as root.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_virtiofs.c

index af51d586737c818219ecd82fea2757e46707a6c0..4dacd37a1c2e9f07a0386d7e4739d7be71540255 100644 (file)
@@ -257,10 +257,6 @@ qemuVirtioFSStart(virQEMUDriver *driver,
     if (!(cmd = qemuVirtioFSBuildCommandLine(cfg, fs, &fd)))
         goto error;
 
-    /* so far only running as root is supported */
-    virCommandSetUID(cmd, 0);
-    virCommandSetGID(cmd, 0);
-
     virCommandSetPidFile(cmd, pidfile);
     virCommandSetOutputFD(cmd, &logfd);
     virCommandSetErrorFD(cmd, &logfd);