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.
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.
Saw a bug. After this change DeleteUser() no longer results in users 'going away'. Will look into it.
Make sure you aren't just seeing: https://bugzilla.redhat.com/show_bug.cgi?id=814690 (which is fixed in latest systemd git)
Created attachment 62959 [details] [review] Refactor reloading of users from multiple sources Split this out from the combined patch
Created attachment 62960 [details] [review] Add CacheUser() method
I had a look at these today, split them up a bit and pushed them: http://cgit.freedesktop.org/accountsservice/commit/?id=277880f5da386fac6dd6f76139a4ed242a136009 http://cgit.freedesktop.org/accountsservice/commit/?id=3b59c08e5d3f8a14f6292a41027a596fbc655d9d http://cgit.freedesktop.org/accountsservice/commit/?id=f9299269a71d85efbec3a06f28fa6edd24f339c3 http://cgit.freedesktop.org/accountsservice/commit/?id=4a4c41c3445b921e99dfe2a27abaf4346be575a2 Thanks much.
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.