]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Include process start time when doing polkit checks
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 25 Apr 2013 16:05:00 +0000 (17:05 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 18 Sep 2013 16:14:23 +0000 (17:14 +0100)
commit65f7c07c9f4231da25784593c6cc4f6408e70b6b
tree73ed23b258a79182a37b7b8cc2f8ae4116df8219
parentb68a721d45085115d9d1ffd5329aff1fdaf1845a
Include process start time when doing polkit checks

Since PIDs can be reused, polkit prefers to be given
a (PID,start time) pair. If given a PID on its own,
it will attempt to lookup the start time in /proc/pid/stat,
though this is subject to races.

It is safer if the client app resolves the PID start
time itself, because as long as the app has the client
socket open, the client PID won't be reused.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 979e9c56a7aadf2dcfbddd1abfbad594b78b4468)

Conflicts:
src/util/virprocess.c
src/util/virstring.c
src/util/virstring.h
12 files changed:
daemon/remote.c
src/libvirt_private.syms
src/locking/lock_daemon.c
src/rpc/virnetserverclient.c
src/rpc/virnetserverclient.h
src/rpc/virnetsocket.c
src/rpc/virnetsocket.h
src/util/viridentity.h
src/util/virprocess.c
src/util/virprocess.h
src/util/virstring.c
src/util/virstring.h