]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: fix crash in virt-login-shell if config doesn't exist
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 1 Aug 2019 11:07:47 +0000 (12:07 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 7 Aug 2019 15:54:01 +0000 (16:54 +0100)
commit275bcbebabfb30a171a71d1865c01f10503a96ae
tree28868c290c2c594636f38ee3f07a284ad3b2f10e
parent59a3b79506cc6921c24b8e0042c95178fec2c368
tools: fix crash in virt-login-shell if config doesn't exist

If the 'allowed_users' config setting in virt-login-shell.conf
does not exist, we dereference a NULL pointer resulting in a
crash. We should check for this case and thus ensure the user
is denied access gracefully.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tools/virt-login-shell.c