Bug 58021

Summary: Do not read /etc/passwd directly
Product: accountsservice Reporter: Benjamin Berg <benjamin>
Component: generalAssignee: Matthias Clasen <mclasen>
Severity: normal    
Priority: medium CC: itfriend, rstrode
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:

Description Benjamin Berg 2012-12-08 16:09:31 UTC
AccountsService reads /etc/passwd directly. I have no idea why this is the case, but it completely breaks any networked setup, as session data cannot be loaded/stored. It also caches the data excessively, which may break ldap setups because the ldap connection is not yet there on service startup.

AccountsService should use the correct system functions to query the data via nsswitch. It should also try to load information about users every time data is requested.
Comment 1 Matthias Clasen 2012-12-10 14:50:02 UTC
/etc/passwd is read on purpose, because we only want to list the local users plus users that have logged in locally, and not the 10000+ users that are in your ldap directory.

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.