Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Oct 2012 12:10:27 -0500
From:      Brooks Davis <brooks@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [CFT] Importing NetBSD's pwcache(3)
Message-ID:  <20121008171027.GE23400@lor.one-eyed-alien.net>
In-Reply-To: <20121008170008.GE35915@deviant.kiev.zoral.com.ua>
References:  <20121008165230.GD23400@lor.one-eyed-alien.net> <20121008170008.GE35915@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--hwvH6HDNit2nSK4j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 08, 2012 at 08:00:08PM +0300, Konstantin Belousov wrote:
> On Mon, Oct 08, 2012 at 11:52:30AM -0500, Brooks Davis wrote:
> > I'm planning to import NetBSD's implementation and expansion
> > of pwcache(3).  The main feature is that it adds is the new
> > functions gid_from_group(), pwcache_userdb(), pwcache_groupdb(), and
> > uid_from_user().  The *_from_*() functions do what you'd expect.  The
> > pwcache*() functions allow you to implement alternative lookup
> > functions.
> >=20
> > NetBSD's mtree and install use them to support alternate master.passwd
> > and group files.  They use it to support image creation on non-NetBSD
> > systems.  In principle this could eliminate the need to run mergemaster
> > before installworld after a new user or group is added to the system
> > (assuming of course that the admin isn't randomly renumbering users and
> > groups).
> >=20
> > If you wish to test this patch, apply it and then delete
> > lib/libc/gen/pwcache.[3c] so the new versions in contrib are found.
> >=20
> > The actual commit will include a copy from
> > vendor/NetBSD/libc-pwcache/dist to contrib/libc-pwcache.
> I noted this first on the branch, but waited for the official announcemen=
t,
> so thank you for doing the notification in advance.
>=20
> I dislike the addition of the random and mostly single-use stuff to libc.
> In particular, it falls into the application namespace.
> More, part of the functionality sounds much like NSS, but it is not.
>=20
> Can this be added either to libutil or might be to libnetbsd perhaps ?

I don't think this would make sense. user_from_uid() and
group_from_gid() are already part of libc from 4.4 BSD for use by
consumers such as ls and find so the cache needs to live there.  Putting
the other two functions in some other library would be absurd.

> BTW, patch looks reversed.

Nope.  It's the result of the files moving to contrib.

-- Brooks

--hwvH6HDNit2nSK4j
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iD8DBQFQcwkDXY6L6fI4GtQRAuMqAJ95V0+L7FofItNgHmw5G5FnjpX0MACeO/Wu
EGjklRqQkEUBgXyVdnoxYXk=
=iPHk
-----END PGP SIGNATURE-----

--hwvH6HDNit2nSK4j--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121008171027.GE23400>