From 46b5fbd1fe75b9a5d303918f10d17d65a68632f0 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 26 Jan 2022 15:11:17 +0100 Subject: [PATCH] meson: Don't check whether qemu_user and qemu_group exist 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 Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- meson.build | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meson.build b/meson.build index ab5f7433a6..5d8029a656 100644 --- a/meson.build +++ b/meson.build @@ -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 == ''