mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
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 <olaf@aepfle.de> Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
e963390342
commit
46b5fbd1fe
@ -1681,14 +1681,6 @@ if not get_option('driver_qemu').disabled()
|
|||||||
default_qemu_user = 'root'
|
default_qemu_user = 'root'
|
||||||
default_qemu_group = 'root'
|
default_qemu_group = 'root'
|
||||||
endif
|
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
|
endif
|
||||||
qemu_user = get_option('qemu_user')
|
qemu_user = get_option('qemu_user')
|
||||||
if qemu_user == ''
|
if qemu_user == ''
|
||||||
|
Loading…
Reference in New Issue
Block a user