Skip to main content.

2001-Aug-10

Looking at pwd_mkdb.c code, because I am working on implementing an old patch (built against an older, different codebase) to allow single entry updates to the db files without rebuilding the entire datafile. It is very slow to rebuild when you have thousands of users. The pwd_mkdb manual says there "are the obvious races with multiple people running pwd_mkdb". This was brought up on a couple NetBSD lists this week; I remembered that this was also discusses in the past on the bsdi-users list and a netbsd list. The patch (PR 7366) is apparently based on a patch for FreeBSD. (I guess FreeBSD already implements this?). Also, somewhere a patch for BSD/OS exists.

Funny -- the code that checks for errors in the text master.passwd file has:

/*
* ``... if I swallow anything evil, put your fingers down my
* throat...''
*      -- The Who
*/

I emailed netbsd-bugs, because the PR and the emailed netbsd-bugs for the patch,included HTML and ISO encoding (and the PR was missing the tabs). In other words, the patch didn't work. wiz sent me the original -- he said he only thinks they are only available for developers. (C. Gilbert later said the original mail boxes are available: ftp://ftp.netbsd.org/pub/NetBSD/mailing-lists/. These mail archives are no longer up-to-date. Plus, M. Green said that you could email intructions to query-pr@netbsd.org to retrieve PRs.) The patch worked against old revision 1.16 (1998). The newer pwd_mkdb.c has changed a lot -- so I am trying to merge the old changes to fit the new code. A while later, A. Doran (who, according to the CVS logs, did the code changes) said he has the "modify one entry only" code and will commit it within the next couple weeks.