summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.ypxfrd
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-06-05 04:36:55 +0000
committerwpaul <wpaul@FreeBSD.org>1996-06-05 04:36:55 +0000
commitd6af1e17162d34157b22057bc35ddbbd7d2a347b (patch)
treed8b37d760c524c55f90c05c3dec31333a23b4a23 /usr.sbin/rpc.ypxfrd
parent3f604024c144f54bc8ad3d214086b06105abb096 (diff)
downloadFreeBSD-src-d6af1e17162d34157b22057bc35ddbbd7d2a347b.zip
FreeBSD-src-d6af1e17162d34157b22057bc35ddbbd7d2a347b.tar.gz
Import rpc.ypxfrd.
This server impliments an RPC-based file transfer protocol that allows an NIS slave server to copy a raw map database file from an NIS master. The goal here is to speed up the transfer of very large maps. If you have, for example, an NIS password database with 30,000 records in it, it can take around 8 to 10 minutes to regenerate it (four hash databases are created). As it stands now, ypxfr(8) transfers a map by sucking all the records from ypserv(8) on the master using yp_all() and writing them to a new database using the db(3) library. This adds up to another 8 to 10 minutes, per slave. With as the number of slaves increases, this latency becomes prohibitive. With rpc.ypxfrd, all the slave has to do is copy the already-built hash database file from the master and move it into place. Even with a multi-megabyte file, this reduces the master to slave transfer time to well under a minute. (This is using TCP.) Access restrictions are applied using the same mechanism as in ypserv: you can control access using /var/yp/securenets, and the server will not transmit the master.passwd.* maps unless the transfer request originates on a reserved port. Note: this server is based on my hastily contrived protocol and is _NOT_ compatible with Sun's protocol of the same name. It can't be compatible for a couple of reasons. For one thing, Sun's protocol has not been published anywhere that I know of. It is not included in any of the SunRPC source distributions that I've been able to find. Second, Sun's NIS v2 code uses old style ndbm maps while FreeBSD uses Berkeley DB. The file formats are incompatible, so being able to transfer maps between FreeBSD and SunOS hosts wouldn't do any good anyway. (You could always port the FreeBSD NIS code to SunOS if you really wanted to do it. :) (There's also the little fact that SunOS/SPARC is big-endian and FreeBSD/i386 is little-endian. Berkeley DB can handle byte ordering differences; ndbm probably can't.)
Diffstat (limited to 'usr.sbin/rpc.ypxfrd')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud