]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virtlockd: make re-exec more robust
authorMichael Chapman <mike@very.puzzling.org>
Wed, 11 Dec 2013 08:07:45 +0000 (19:07 +1100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 22 Jan 2014 09:44:41 +0000 (10:44 +0100)
commit881a2cff0d03631c4bd0dc8012c4aa722cba6954
tree82c25d94ec5c9e358aa5e6a311332ac37427d200
parent2a27d6a4f2c85b4a8dca2135dbf6a6d581fbcff4
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 <mike@very.puzzling.org>
src/locking/lock_daemon.c