]> xenbits.xensource.com Git - 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, 8 May 2013 09:47:45 +0000 (10:47 +0100)
commit979e9c56a7aadf2dcfbddd1abfbad594b78b4468
treeae5a88609f7b128496f5bee7c54d2097e1648681
parentb1d753fe4054cba4432af1203c3fb022e390c571
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>
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