Date: Mon, 28 Oct 2013 00:26:28 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: hackers@FreeBSD.org Subject: Importing netbsd cdb Message-ID: <20131027232628.GB74512@ithaqua.etoilebsd.net>
next in thread | raw e-mail | index | archive | help
--EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all Here is a code that imports the cdbrw from netbsd into a new lib/libcdbrw library, the read part is also added to libc but not exposed. As an example of using that library I also got the service_mkdb patches from netbsd that makes it by default emit a cdb database and add a switch to all= ow it to still create the old .db database format. in the libc, getservent has been modified to first try to read the .cdb fil= es and fallback on reading the old .db file. (I'm not sure if it is worth keep= ing reading the old db format.) http://people.freebsd.org/~bapt/cdbrw.diff The plan after that is to get pw_util(3) directly generating a cdb file for pwd.db and spwd.db and modifiy pwd_mkdb(8) so that by default it uses the A= PI =66rom pw_util(3) and have a switch to fallback on creating in bdb format. I also plan to do the same for cap_mkdb(1) and getcap(3). With cdb querying is way faster (I don't have number but I can get some it needed) the size of the db is also way smaller: 64K /var/db/services.cdb 2,1M /var/db/services.db Any objection? regards, Bapt --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlJtoSQACgkQ8kTtMUmk6EzdcQCeJ0SyBOm02FcjNbq1cOUsyBjF NgsAn3V5SaFiFsgMKlnK+qczJt5Dq2Rw =zemp -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131027232628.GB74512>