On Wed, 2015-06-10 at 18:48 +0000, Robin H. Johnson wrote:
> On Wed, Jun 10, 2015 at 04:44:17PM +0000, Joakim Tjernlund wrote:
> > I wonder if it would be possible to use the script from
> > sys-apps/getent(included below)
> > to impl. getent in user.eclass instead of using glibc's getent? I
> > cannot see any downside, is there one?
> >
> > This would help a lot(just seed your groups/users is in
> > ROOT/etc/{passwd,group ...} first)
> > when cross building or ROOT != / as it would be trivial for the script to
> > respect ROOT/EPREFIX
> This would totally break when those services come from an NSS provider
> other than files or compat.
But does user.eclass support anything but local system users ?
>
> There was a non-upstream patch to support NSS on non-root filesystems,
> which would probably help a lot more; I haven't seen that original patch
> in a while, so here's a very quick and completely untested
> re-implementation of it.
>
> In your case, you probably should MAKE sure that regardless of the
> system nsswitch settings, the NSS file provider gets used.
>
> Usage: NSS_FILES_ROOT=$ROOT/etc getent -s files passwd ...
>