Bug 90877

Summary: [patch] Fix duplicate GError use when "uid" is missing in PolkitSubject
Product: PolicyKit Reporter: Miloslav Trmac <mitr>
Component: daemonAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED FIXED QA Contact: David Zeuthen (not reading bugmail) <zeuthen>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-Fix-duplicate-GError-use-when-uid-is-missing.patch

Description Miloslav Trmac 2015-06-05 23:17:31 UTC
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", "/"

Then lookup_asv will set the error object within server_handle_register_authentication_agent but won’t fail, and later error paths will reset the GError with a new error value.
Comment 1 Miloslav Trmac 2015-06-05 23:19:05 UTC
Created attachment 116327 [details] [review]
0001-Fix-duplicate-GError-use-when-uid-is-missing.patch
Comment 2 Colin Walters 2015-06-06 14:13:24 UTC
Comment on attachment 116327 [details] [review]
0001-Fix-duplicate-GError-use-when-uid-is-missing.patch

Review of attachment 116327 [details] [review]:
-----------------------------------------------------------------

Ah, yes.
Comment 3 Miloslav Trmac 2015-06-08 15:47:11 UTC
Thanks, pushed as 2c8738941be18ef05ce724df46547f41dbc02fb5 .

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.