Berkeley NSS DB 2.5 fork (nss_db)

Mark R Bannister
Wed Dec 14 09:49:00 GMT 2011


I'm not sure if this is the right list, or indeed whether anyone will be
interested, but I have created a fork of the Berkeley nss_db module available at:

This is version 2.5 of the Berkeley DB NSS module. Originally I created it for
two reasons, as noted below. That would have been fine until just today (after
already investing my time and effort) I discovered that nss_db has been
reintroduced into glibc this year, without Berkeley DB support.

So this might not be quite as useful as I first envisaged, and I certainly never
intended to tread on anyone's toes! However, I suppose this now has the
additional benefit of continuing as a standalone package using Berkeley DB for
those who want it.

My original purpose for creating this is:

* I needed a port on Solaris 10, specifically I needed passwd and group
databases on this platform. These are, therefore, the only databases available
at this time on Solaris. There is no technical reason why other databases
couldn't be supported, it would be easy enough to do if someone had the time to
write the appropriate wrappers.

* I needed a home for patched sourcecode for Linux. Until now, vendors have
been pulling the source from glibc 2.2 then applying a growing number of patches
to it from various sources.

There are benefits to continuing Berkeley NSS DB as a separate package, without
which it would not be easy (perhaps not even possible) to port the functionality
to other platforms that don't have glibc.

I created the nss_db fork as follows:

* Downloaded glibc 2.2 source.

* Applied patches listed on the hints page at LFS here:

* Tidied up ready for Solaris port.

* Added Solaris support, mainly via wrappers. Had to include some
functionality from gnulib to get this to work.

* Added syslog debug support (./configure --enable-syslog).

* Manually applied list of patches from RHEL 6 distro source RPM:
nss_db-2.2.3-0.3.pre1.el6_1.1.src.rpm. NOTE: some of these bugs/changes had
already been solved in slightly different ways by the LFS patch above. Where
this was the case, the LFS patch won. There was one patch from this RHEL 6 rpm
that could be applied but wouldn't compile: 'nss_db-2.2-enoent.patch' added
'*errnop = ENOENT;' to the lookup() function prior to 'db->get' in db-XXX.c, but
there was no 'errnop' symbol. I left this commented out.

I've tested on Solaris 10 with CSWbdb48, and tested on RHEL 5.5, and it's
compiling and running ok on both. I should therefore expect that it'll continue
to work just fine on any Linux release it previously compiled on, as the new
Solaris wrappers only get compiled in on a Solaris host.

The source is available from:

* Tar ball:
* Source code browser:

Best regards,

More information about the Libc-help mailing list