Bug 104851

Summary: act_user_get_locked segfaults if accounts_proxy is not created
Product: accountsservice Reporter: Ondrej Holy <oholy>
Component: generalAssignee: Matthias Clasen <mclasen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: marius.vollmer, oholy, rstrode, stefw
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: act-user: Prevent segfault if accounts_proxy is not created

Description Ondrej Holy 2018-01-30 08:13:37 UTC
See downstream bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1532252
Comment 1 Ondrej Holy 2018-01-30 08:14:07 UTC
Created attachment 137046 [details] [review]
act-user: Prevent segfault if accounts_proxy is not created

act_user_get_locked may segfault if accounts_proxy is not created (e.g.
when run under root). All other functions which rely on accounts_proxy
already contain checks for NULL and valid ActUser. Do the same also in
act_user_get_locked in order to avoid segfaults in certain cases.
Comment 2 Ray Strode [halfline] 2018-01-30 15:04:48 UTC
I'm not sure why there would be no account proxy for root, but the fix makes sense regardless!

Attachment 137046 [details] pushed as 3e7b8ec - act-user: Prevent segfault if accounts_proxy is not created
Comment 3 Ondrej Holy 2018-01-31 07:28:17 UTC
I am not sure, I've just provided fix for that backtrace... but maybe the mentioned patches for g-c-c on that downstream bug will be also needed.

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.