Bug 50770

Summary: daemon: Add CacheUser() DBus method
Product: accountsservice Reporter: Stef Walter <stefw>
Component: generalAssignee: Matthias Clasen <mclasen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: rstrode, stefw
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 51037    
Attachments: daemon: Add CacheUser() DBus method
Refactor reloading of users from multiple sources
Add CacheUser() method

Description Stef Walter 2012-06-06 01:53:19 UTC
As discussed on IRC, adding a CacheUser method for telling
AccountsService about users not present in passwd such as
users provided by winbind or sssd.

/var/lib/AccountsService/users is enumerated and any file names
that return valid users via getpwnam() are added to the list
of cached users.

Add a new CacheUser() method which writes a file to that directory.

This is a dependency of the kerberos user identities control
panel work.
Comment 1 Stef Walter 2012-06-06 01:53:21 UTC
Created attachment 62643 [details] [review]
daemon: Add CacheUser() DBus method

 * Caches a user so that it becomes visible via ListCachedUsers()
 * The user account must be accessible via getpwnam()
 * Refactor how reloading of users works, if user is present in
   multiple sources track how many places loaded, and only
   unregister if gone from all.
Comment 2 Stef Walter 2012-06-06 16:10:05 UTC
Saw a bug. After this change DeleteUser() no longer results in users 'going away'. Will look into it.
Comment 3 Ray Strode [halfline] 2012-06-07 09:30:49 UTC
Make sure you aren't just seeing:

https://bugzilla.redhat.com/show_bug.cgi?id=814690

(which is fixed in latest systemd git)
Comment 4 Stef Walter 2012-06-13 03:41:46 UTC
Created attachment 62959 [details] [review]
Refactor reloading of users from multiple sources

Split this out from the combined patch
Comment 5 Stef Walter 2012-06-13 03:42:07 UTC
Created attachment 62960 [details] [review]
Add CacheUser() method

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.