Package: policykit-1 / 0.105-15~deb8u2

0.113/Fix-duplicate-GError-use-when-uid-is-missing.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: =?utf-8?q?Miloslav_Trma=C4=8D?= <mitr@redhat.com>
Date: Mon, 15 Sep 2014 19:45:15 +0200
Subject: Fix duplicate GError use when "uid" is missing

Some GLib versions complain loudly about this.

To reproduce, call e.g. RegisterAuthenticationAgent with the following
parameters:
("unix-process", {"pid": __import__('gi.repository.GLib', globals(),
locals(), ['Variant']).Variant("u", 1), "start-time":
__import__('gi.repository.GLib', globals(), locals(),
['Variant']).Variant("t", 1)}), "cs", "/"

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90877
Origin: upstream, 0.113, commit:2c8738941be18ef05ce724df46547f41dbc02fb5
---
 src/polkit/polkitsubject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/polkit/polkitsubject.c b/src/polkit/polkitsubject.c
index aed5795..78ec745 100644
--- a/src/polkit/polkitsubject.c
+++ b/src/polkit/polkitsubject.c
@@ -424,7 +424,7 @@ polkit_subject_new_for_gvariant (GVariant  *variant,
       start_time = g_variant_get_uint64 (v);
       g_variant_unref (v);
 
-      v = lookup_asv (details_gvariant, "uid", G_VARIANT_TYPE_INT32, error);
+      v = lookup_asv (details_gvariant, "uid", G_VARIANT_TYPE_INT32, NULL);
       if (v != NULL)
         {
           uid = g_variant_get_int32 (v);