Bug 90877 - [patch] Fix duplicate GError use when "uid" is missing in PolkitSubject
Summary: [patch] Fix duplicate GError use when "uid" is missing in PolkitSubject
Status: RESOLVED FIXED
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 23:17 UTC by Miloslav Trmac
Modified: 2015-06-08 15:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-Fix-duplicate-GError-use-when-uid-is-missing.patch (1.25 KB, patch)
2015-06-05 23:19 UTC, Miloslav Trmac
Details | Splinter Review

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.