leaseshelper: Report errors on failure
leaseshelper: Report errors on failure

If leasehelper fails all that we are left with is a simple error
message produced by dnsmasq:

  lease-init script returned exit code 1

This is because the leasehelper did not write any message to
stderr. According to dnsmasq's manpage, whenever it's invoking
leasehelper the stderr is kept open:

  All file descriptors are closed except stdin, which is open to
  /dev/null, and stdout and stderr which capture output for
  logging by dnsmasq.

As debugging leasehelper is not trivial (because dnsmasq invokes
it with plenty of env vars set - that's how data is passed onto
helper), let's print an error into stderr if exiting with an
error. And since we are not calling public APIs, we have to call
virDispatchError() explicitly and since we don't have any
connection open, we have to pass NULL.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

olafhering/libvirt,olafhering/libvirt,nertpinx/libvirt,nertpinx/libvirt,libvirt/libvirt,libvirt/libvirt,olafhering/libvirt,zippy2/libvirt,zippy2/libvirt,jfehlig/libvirt,nertpinx/libvirt,crobinso/libvirt,nertpinx/libvirt,crobinso/libvirt,zippy2/libvirt,zippy2/libvirt,jfehlig/libvirt,crobinso/libvirt,jfehlig/libvirt,nertpinx/libvirt,olafhering/libvirt,libvirt/libvirt,libvirt/libvirt,jfehlig/libvirt,crobinso/libvirt