daemon: Refactor reloading of users from multiple sources
authorStef Walter <stefw@gnome.org>
Wed, 13 Jun 2012 09:42:28 +0000 (11:42 +0200)
committerRay Strode <rstrode@redhat.com>
Tue, 24 Jul 2012 21:13:16 +0000 (17:13 -0400)
commit277880f5da386fac6dd6f76139a4ed242a136009
treea553a055656dd28915825b63aaf71bf465aeef64
parent30e8cee1dfd91763dacd567e69e327c8e35dc83f
daemon: Refactor reloading of users from multiple sources

This commit reworks how the list of users is accumulated.

It introduces the idea of an "entry generator" which returns
struct passwd entries repeatedly until all entries available
are returned.  It then reworks the wtmp and /etc/passwd
reading to work in terms of entry generators.

This refactor will make it easier to introduce other sources
of users.

https://bugs.freedesktop.org/show_bug.cgi?id=50770
src/daemon.c