libvirt/tools
Michal Privoznik d7dd4e1f89 nss: Don't fail on empty files
Before we rewrote nss plugin so that it doesn't use libvirt's
internal functions it used virLeaseReadCustomLeaseFile() to parse
.status files. After the rewrite it's using read() + yajl_parse()
+ yajl_complete_parse(). There's one catch though,
virLeaseReadCustomLeaseFile() skipped over empty files.

An empty .status file is created when a network is started. This
is because we configure dnsmasq to use our leasehelper. So the
first thing it does it calls it as follows:

  DNSMASQ_INTERFACE=virbr0 /usr/libexec/libvirt_leaseshelper init

which causes the leasehelper to create empty virbr0.status file.
If there is only one libvirt network then that is no problem -
there are no other .status files to parse anyway. But if there
are two or more networks then the first empty .status file causes
whole parsing process and subsequently the whole name lookup
process to fail.

Fixes: v5.7.0-rc1~343

Reported-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-28 15:37:41 +01:00
..
bash-completion tools: Provide bash autompletion file 2018-01-11 18:53:04 +01:00
nss nss: Don't fail on empty files 2019-11-28 15:37:41 +01:00
wireshark replace use of gnulib snprintf by g_snprintf 2019-11-15 15:07:40 +01:00
libvirt_recover_xattrs.sh security_util: Remove stale XATTRs 2019-08-22 17:05:17 +02:00
libvirt_win_icon_16x16.ico
libvirt_win_icon_32x32.ico
libvirt_win_icon_48x48.ico
libvirt_win_icon_64x64.ico
libvirt-guests.service.in build: don't hardcode /etc in the config related files 2019-08-09 14:06:31 +01:00
libvirt-guests.sh.in tools: do not report unknown guests in print_guests_shutdown 2018-04-24 10:46:41 +02:00
libvirt-guests.sysconf lxc: allow use of lxc:///system URI as preferred format 2018-04-12 16:52:01 +01:00
Makefile.am tools: stop distributing generated source files 2019-11-08 17:07:57 +01:00
virsh_win_icon.rc
virsh-checkpoint.c util: buffer: Remove virBufferError 2019-10-24 19:35:34 +02:00
virsh-checkpoint.h backup: Implement virsh support for checkpoints 2019-07-26 16:48:58 -05:00
virsh-completer-checkpoint.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-checkpoint.h tools: Separate checkpoint related completers into a file 2019-08-09 09:18:19 +02:00
virsh-completer-domain.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-completer-domain.h tools: Separate domain related completers into a file 2019-08-09 09:05:27 +02:00
virsh-completer-host.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-completer-host.h tools: Separate host related completers into a file 2019-08-09 09:17:44 +02:00
virsh-completer-interface.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-interface.h tools: Separate interface related completers into a file 2019-08-09 09:07:51 +02:00
virsh-completer-network.c tools: remove unneeded cleanup labels 2019-11-12 17:54:01 +01:00
virsh-completer-network.h tools: Separate network related completers into a file 2019-08-09 09:09:59 +02:00
virsh-completer-nodedev.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
virsh-completer-nodedev.h tools: Separate nodedev related completers into a file 2019-08-09 09:10:08 +02:00
virsh-completer-nwfilter.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-nwfilter.h tools: Separate nwfilter related completers into a file 2019-08-09 09:15:36 +02:00
virsh-completer-pool.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
virsh-completer-pool.h virsh: Introduce virshPoolTypeCompleter 2019-08-09 09:20:13 +02:00
virsh-completer-secret.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
virsh-completer-secret.h tools: Separate secret related completers into a file 2019-08-09 09:16:28 +02:00
virsh-completer-snapshot.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-snapshot.h tools: Separate snapshot related completers into a file 2019-08-09 09:17:06 +02:00
virsh-completer-volume.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virsh-completer-volume.h tools: Separate storage volume related completers into a file 2019-08-09 09:07:02 +02:00
virsh-completer.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-completer.h virsh-completer: Drop needless #include 2019-08-09 09:18:54 +02:00
virsh-console.c tools: use G_GNUC_UNUSED 2019-10-15 11:25:25 +02:00
virsh-console.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-domain-monitor.c replace use of gnulib snprintf by g_snprintf 2019-11-15 15:07:40 +01:00
virsh-domain-monitor.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
virsh-domain.c virsh: limit completion of 'domhostname' to active domains 2019-11-22 11:36:51 +01:00
virsh-domain.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-edit.c Use G_GNUC_FALLTHROUGH instead of ATTRIBUTE_FALLTHROUGH 2019-10-15 16:14:19 +02:00
virsh-host.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-host.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-interface.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-interface.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-network.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-network.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-nodedev.c tools: prefer g_strdup to vshStrdup 2019-10-20 14:37:16 +02:00
virsh-nodedev.h tools: s/Nodedev/NodeDevice/ 2019-08-09 09:03:53 +02:00
virsh-nwfilter.c tools: use G_GNUC_UNUSED 2019-10-15 11:25:25 +02:00
virsh-nwfilter.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-pool.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-pool.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-secret.c Use g_autofree instead of VIR_AUTOFREE 2019-10-16 12:06:43 +02:00
virsh-secret.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-snapshot.c util: buffer: Remove virBufferError 2019-10-24 19:35:34 +02:00
virsh-snapshot.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh-util.c tools: use G_GNUC_UNUSED 2019-10-15 11:25:25 +02:00
virsh-util.h Use G_DEFINE_AUTOPTR_CLEANUP_FUNC instead of VIR_DEFINE_AUTOPTR_FUNC 2019-10-16 12:06:43 +02:00
virsh-volume.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virsh-volume.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virsh.c tools: prefer g_strdup to vshStrdup 2019-10-20 14:37:16 +02:00
virsh.h backup: Implement virsh support for checkpoints 2019-07-26 16:48:58 -05:00
virsh.pod virsh: Fix typo in the man page 2019-11-15 09:34:20 +01:00
virt-admin-completer.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virt-admin-completer.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-admin.c tools: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:59 +01:00
virt-admin.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-admin.pod tools: Fix grammar 2019-04-15 17:37:52 +02:00
virt-host-validate-bhyve.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
virt-host-validate-bhyve.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate-common.c replace use of gnulib snprintf by g_snprintf 2019-11-15 15:07:40 +01:00
virt-host-validate-common.h Use G_GNUC_PRINTF instead of ATTRIBUTE_FMT_PRINTF 2019-10-15 16:14:18 +02:00
virt-host-validate-lxc.c virt-host-validate: require freezer for LXC 2018-10-05 15:53:29 +02:00
virt-host-validate-lxc.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate-qemu.c virt-host-validate: rewrite cgroup detection to use util/vircgroup 2018-10-05 15:53:29 +02:00
virt-host-validate-qemu.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
virt-host-validate.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virt-host-validate.pod Use https:// links for most sites 2017-10-16 10:22:34 +01:00
virt-login-shell-helper.c tools: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:59 +02:00
virt-login-shell.c tools: fix regression passing command with virt-login-shell 2019-09-30 12:08:30 +01:00
virt-login-shell.conf virt-login-shell: add ability to auto-detect shell from container 2016-06-10 11:03:02 +01:00
virt-login-shell.pod Use https:// links for most sites 2017-10-16 10:22:34 +01:00
virt-pki-validate.in tools: Fix permissions for virt-pki-validate.in 2019-07-01 17:20:32 +02:00
virt-pki-validate.pod Use https:// links for most sites 2017-10-16 10:22:34 +01:00
virt-sanlock-cleanup.in
virt-sanlock-cleanup.pod Use https:// links for most sites 2017-10-16 10:22:34 +01:00
virt-xml-validate.in tools: fix XML validator detection of network port XML schema 2019-09-12 16:06:57 +01:00
virt-xml-validate.pod virt-xml-validate: Add schema for nwfilterbinding 2018-07-19 16:16:57 -04:00
vsh-table.c replace use of gnulib snprintf by g_snprintf 2019-11-15 15:07:40 +01:00
vsh-table.h tools: use #pragma once in headers 2019-06-19 17:12:34 +02:00
vsh.c g_mkstemp_full: pass O_RDWR 2019-11-18 18:49:02 +01:00
vsh.h virsh: Reimplement _vshCalloc using g_malloc0_n 2019-10-24 19:35:34 +02:00