]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Don't check whether qemu_user and qemu_group exist
authorAndrea Bolognani <abologna@redhat.com>
Wed, 26 Jan 2022 14:11:17 +0000 (15:11 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 27 Jan 2022 10:48:33 +0000 (11:48 +0100)
QEMU might not be installed on the build system, in which case
the user and group will not be present. We should avoid falling
back to root:root in that case, and assume the user and group
are going to be present in the target system instead.

Suggested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build

index ab5f7433a6f85053f35b16f4348c02c4fadcbd6a..5d8029a6561a115c846a5c906c056eaa05a4ce20 100644 (file)
@@ -1681,14 +1681,6 @@ if not get_option('driver_qemu').disabled()
         default_qemu_user = 'root'
         default_qemu_group = 'root'
       endif
-      # If the expected user and group don't exist, or we haven't hit any
-      # of the cases above bacuse we're running on an unknown OS, the only
-      # sensible fallback is root:root
-      if (run_command('getent', 'passwd', default_qemu_user, check: false).returncode() != 0 and
-          run_command('getent', 'group', default_qemu_group, check: false).returncode() != 0)
-        default_qemu_user = 'root'
-        default_qemu_group = 'root'
-      endif
     endif
     qemu_user = get_option('qemu_user')
     if qemu_user == ''