Bug 106455

Summary: fix a few problems in the user-deleted code path
Product: accountsservice Reporter: Ray Strode [halfline] <rstrode>
Component: generalAssignee: Matthias Clasen <mclasen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: marius.vollmer, rstrode, stefw
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: daemon: unregister user after we're done with it not before
daemon: don't emit user-deleted for uncached users

Description Ray Strode [halfline] 2018-05-09 17:29:11 UTC
Right now we try to emit user-deleted on user objects without
object paths in a couple of cases.  This commit fixes them up.
Comment 1 Ray Strode [halfline] 2018-05-09 17:29:18 UTC
Created attachment 139447 [details] [review]
daemon: unregister user after we're done with it not before

Now that we get the object path for a user directly from the skeleton,
we can't access that object path after the skeleton is unregistered.

This commit fixes a problem where the user deletion handling code tries
to access the object path of a user after its skeleton is unregistered.
Comment 2 Ray Strode [halfline] 2018-05-09 17:29:20 UTC
Created attachment 139448 [details] [review]
daemon: don't emit user-deleted for uncached users

Right now we emit spurious user-deleted signals for
all uncached users anytime a reload occurs.
Uncached users are users explicitly requested by a client,
but not part of the results returned from ListCachedUsers.

We should only be emitting user-deleted it they were initially
cached and transitioned to uncached, not if they're still
hanging around in an uncached state.

This commit fixes the code to do that.
Comment 3 Ray Strode [halfline] 2018-05-09 17:29:53 UTC
Attachment 139447 [details] pushed as 7ab92b1 - daemon: unregister user after we're done with it not before
Attachment 139448 [details] pushed as 9d14729 - daemon: don't emit user-deleted for uncached users

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.