]> 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)
committerEric Blake <eblake@redhat.com>
Wed, 18 Sep 2013 18:22:25 +0000 (12:22 -0600)
commit4407b19b83d298535515ee57295a50394d3be14d
tree059f63f07372b2d3e804f4430264fb76ecfcc99b
parent073812898ab5c7baaafdd9d878d4f4113a5ff618
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)
Signed-off-by: Eric Blake <eblake@redhat.com>
Conflicts:
src/rpc/virnetsocket.h - context
src/util/virprocess.c - needed #include "virstring.h"
src/util/virstring.c - context
src/util/virstring.h - context
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