Gentoo Archives: gentoo-dev

From: Alec Warner <antarus@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Impl. egetent in user.eclass using script from sys-apps/getent?
Date: Wed, 10 Jun 2015 19:36:35
Message-Id: CAAr7Pr9Ad3T76YetSMu1HKspnKEt8=O5Amqj7ZVCwZnzoszNVw@mail.gmail.com
In Reply to: Re: [gentoo-dev] Impl. egetent in user.eclass using script from sys-apps/getent? by Joakim Tjernlund
1 On Wed, Jun 10, 2015 at 11:56 AM, Joakim Tjernlund <
2 joakim.tjernlund@×××××××××.se> wrote:
3
4 > On Wed, 2015-06-10 at 18:48 +0000, Robin H. Johnson wrote:
5 > > On Wed, Jun 10, 2015 at 04:44:17PM +0000, Joakim Tjernlund wrote:
6 > > > I wonder if it would be possible to use the script from
7 > sys-apps/getent(included below)
8 > > > to impl. getent in user.eclass instead of using glibc's getent? I
9 > > > cannot see any downside, is there one?
10 > > >
11 > > > This would help a lot(just seed your groups/users is in
12 > ROOT/etc/{passwd,group ...} first)
13 > > > when cross building or ROOT != / as it would be trivial for the script
14 > to respect ROOT/EPREFIX
15 > > This would totally break when those services come from an NSS provider
16 > > other than files or compat.
17 >
18 > But does user.eclass support anything but local system users ?
19 >
20
21 https://github.com/google/nsscache for example.
22
23 They are still 'local', but not via files or compat ;0)
24
25 -A
26
27
28 >
29 > >
30 > > There was a non-upstream patch to support NSS on non-root filesystems,
31 > > which would probably help a lot more; I haven't seen that original patch
32 > > in a while, so here's a very quick and completely untested
33 > > re-implementation of it.
34 > >
35 > > In your case, you probably should MAKE sure that regardless of the
36 > > system nsswitch settings, the NSS file provider gets used.
37 > >
38 > > Usage: NSS_FILES_ROOT=$ROOT/etc getent -s files passwd ...
39 > >
40 >
41 >