Commit 6d3d0a8f authored by Colin Walters's avatar Colin Walters

Port internals non-deprecated PolkitProcess API where possible

We can't port everything, but in PolkitPermission and these test
cases, we can use _for_owner() with the right information.
parent bfa5036b
......@@ -122,7 +122,7 @@ polkit_permission_constructed (GObject *object)
PolkitPermission *permission = POLKIT_PERMISSION (object);
if (permission->subject == NULL)
permission->subject = polkit_unix_process_new (getpid ());
permission->subject = polkit_unix_process_new_for_owner (getpid (), 0, getuid ());
if (G_OBJECT_CLASS (polkit_permission_parent_class)->constructed != NULL)
G_OBJECT_CLASS (polkit_permission_parent_class)->constructed (object);
......
......@@ -74,8 +74,8 @@ test_get_admin_identities_for_action_id (const gchar *action_id,
authority = get_authority ();
caller = polkit_unix_process_new (getpid ());
subject = polkit_unix_process_new (getpid ());
caller = polkit_unix_process_new_for_owner (getpid (), 0, getuid ());
subject = polkit_unix_process_new_for_owner (getpid (), 0, getuid ());
user_for_subject = polkit_identity_from_string ("unix-user:root", &error);
g_assert_no_error (error);
......@@ -340,8 +340,8 @@ rules_test_func (gconstpointer user_data)
authority = get_authority ();
caller = polkit_unix_process_new (getpid ());
subject = polkit_unix_process_new (getpid ());
caller = polkit_unix_process_new_for_owner (getpid (), 0, getuid ());
subject = polkit_unix_process_new_for_owner (getpid (), 0, getuid ());
user_for_subject = polkit_identity_from_string (tc->identity, &error);
g_assert_no_error (error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment