From: Andrea Bolognani Date: Tue, 26 Mar 2019 15:58:30 +0000 (+0100) Subject: m4: Add warning when running QEMU as root X-Git-Tag: v5.2.0-rc1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5e23e3fb9e156f7d4093d33f741702b0d9311fe;p=thirdparty%2Flibvirt.git m4: Add warning when running QEMU as root 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 Reviewed-by: Daniel P. Berrangé --- diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4 index 586823c5aa..2934098cfd 100644 --- a/m4/virt-driver-qemu.m4 +++ b/m4/virt-driver-qemu.m4 @@ -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 ])