summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-11-07 17:18:52 -0500
committerColin Walters <walters@verbum.org>2013-11-09 08:32:06 -0500
commitaa4cd969b7371d73da49700d0098e41874a370e6 (patch)
treea2010d1bcc80677aa14813c36c048b3fc8223395
parent904d8404d93dec45fce3b719eb1a626acc6b8a73 (diff)
examples/cancel: Fix to securely lookup subject
This is just an uninstalled example, but it needed the same fix as was done for pkexec with the 3b12cfac29dddd27f1f166a7574d8374cc1dccf2 commit. This drops use of deprecated API. https://bugs.freedesktop.org/show_bug.cgi?id=69538
-rw-r--r--src/examples/cancel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/examples/cancel.c b/src/examples/cancel.c
index 7978ebe..1470025 100644
--- a/src/examples/cancel.c
+++ b/src/examples/cancel.c
@@ -128,7 +128,7 @@ main (int argc, char *argv[])
g_printerr ("Parent process was reaped by init(1)\n");
return 1;
}
- subject = polkit_unix_process_new (parent_pid);
+ subject = polkit_unix_process_new_for_owner (parent_pid, 0, getuid ());
cancellable = g_cancellable_new ();