virtlockd: make re-exec more robust
virtlockd: make re-exec more robust

- Use $XDG_RUNTIME_DIR for re-exec state file when running unprivileged.

- argv[0] may not contain a full path to the binary, however it should
  contain something that can be looked up in the PATH. Use execvp() to
  do path lookup on re-exec.

- As per list discussion [1], ignore --daemon on re-exec.

[1] https://www.redhat.com/archives/libvir-list/2013-December/msg00514.html

Signed-off-by: Michael Chapman <a17fed27eaa842282862ff7c1b9c8395a26ac320@very.puzzling.org>

nertpinx/libvirt,taget/libvirt,VenkatDatta/libvirt,shugaoye/libvirt,jardasgit/libvirt,elmarco/libvirt,datto/libvirt,eskultety/libvirt,andreabolognani/libvirt,taget/libvirt,eskultety/libvirt,agx/libvirt,andreabolognani/libvirt,rlaager/libvirt,crobinso/libvirt,crobinso/libvirt,elmarco/libvirt,rlaager/libvirt,shugaoye/libvirt,crobinso/libvirt,VenkatDatta/libvirt,datto/libvirt,taget/libvirt,shugaoye/libvirt,rlaager/libvirt,nertpinx/libvirt,olafhering/libvirt,zippy2/libvirt,zippy2/libvirt,elmarco/libvirt,datto/libvirt,eskultety/libvirt,fabianfreyer/libvirt,rlaager/libvirt,jardasgit/libvirt,nertpinx/libvirt,libvirt/libvirt,shugaoye/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,agx/libvirt,olafhering/libvirt,eskultety/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,zippy2/libvirt,nertpinx/libvirt,jfehlig/libvirt,jardasgit/libvirt,taget/libvirt,libvirt/libvirt,datto/libvirt,andreabolognani/libvirt,elmarco/libvirt,jardasgit/libvirt,eskultety/libvirt,jardasgit/libvirt,taget/libvirt,nertpinx/libvirt,rlaager/libvirt,andreabolognani/libvirt,crobinso/libvirt,elmarco/libvirt,jfehlig/libvirt,agx/libvirt,datto/libvirt,agx/libvirt,jfehlig/libvirt,zippy2/libvirt,fabianfreyer/libvirt,libvirt/libvirt,olafhering/libvirt,olafhering/libvirt,agx/libvirt,andreabolognani/libvirt,VenkatDatta/libvirt,libvirt/libvirt,shugaoye/libvirt