Bug 50770 - daemon: Add CacheUser() DBus method
Summary: daemon: Add CacheUser() DBus method
Status: RESOLVED FIXED
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 51037
  Show dependency treegraph
 
Reported: 2012-06-06 01:53 UTC by Stef Walter
Modified: 2012-07-24 21:55 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
daemon: Add CacheUser() DBus method (19.35 KB, patch)
2012-06-06 01:53 UTC, Stef Walter
Details | Splinter Review
Refactor reloading of users from multiple sources (15.25 KB, patch)
2012-06-13 03:41 UTC, Stef Walter
Details | Splinter Review
Add CacheUser() method (8.22 KB, patch)
2012-06-13 03:42 UTC, Stef Walter
Details | Splinter Review

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.