]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
m4: Add warning when running QEMU as root
authorAndrea Bolognani <abologna@redhat.com>
Tue, 26 Mar 2019 15:58:30 +0000 (16:58 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 26 Mar 2019 17:30:26 +0000 (18:30 +0100)
Running QEMU as root is a pretty bad idea, so try to make the
user aware of that as part of the configure summary.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
m4/virt-driver-qemu.m4

index 586823c5aa110eb22b17965c69df853a980a34a9..2934098cfd4935907de2f72d3ef7e9efbf52bfcd 100644 (file)
@@ -112,5 +112,10 @@ AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [
 ])
 
 AC_DEFUN([LIBVIRT_RESULT_QEMU_PRIVILEGES], [
-  LIBVIRT_RESULT([QEMU], [$QEMU_USER:$QEMU_GROUP])
+  if test "$QEMU_USER" = "root"; then
+    LIBVIRT_RESULT([QEMU], [$QEMU_USER:$QEMU_GROUP],
+                   [!!! running QEMU as root is strongly discouraged !!!])
+  else
+    LIBVIRT_RESULT([QEMU], [$QEMU_USER:$QEMU_GROUP])
+  fi
 ])