116118c2bSBill Paul.\" Copyright (c) 1995, 1996 216118c2bSBill Paul.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 316118c2bSBill Paul.\" 416118c2bSBill Paul.\" Redistribution and use in source and binary forms, with or without 516118c2bSBill Paul.\" modification, are permitted provided that the following conditions 616118c2bSBill Paul.\" are met: 716118c2bSBill Paul.\" 1. Redistributions of source code must retain the above copyright 816118c2bSBill Paul.\" notice, this list of conditions and the following disclaimer. 916118c2bSBill Paul.\" 2. Redistributions in binary form must reproduce the above copyright 1016118c2bSBill Paul.\" notice, this list of conditions and the following disclaimer in the 1116118c2bSBill Paul.\" documentation and/or other materials provided with the distribution. 1216118c2bSBill Paul.\" 3. All advertising materials mentioning features or use of this software 1316118c2bSBill Paul.\" must display the following acknowledgement: 1416118c2bSBill Paul.\" This product includes software developed by Bill Paul. 1516118c2bSBill Paul.\" 4. Neither the name of the author nor the names of contributors 1616118c2bSBill Paul.\" may be used to endorse or promote products derived from this software 1716118c2bSBill Paul.\" without specific prior written permission. 1816118c2bSBill Paul.\" 1916118c2bSBill Paul.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 2016118c2bSBill Paul.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2116118c2bSBill Paul.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2216118c2bSBill Paul.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE 2316118c2bSBill Paul.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2416118c2bSBill Paul.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2516118c2bSBill Paul.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2616118c2bSBill Paul.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2716118c2bSBill Paul.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2816118c2bSBill Paul.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2916118c2bSBill Paul.\" SUCH DAMAGE. 3016118c2bSBill Paul.\" 3116118c2bSBill Paul.Dd June 2, 1996 3216118c2bSBill Paul.Dt RPC.YPXFRD 8 3316118c2bSBill Paul.Os 3416118c2bSBill Paul.Sh NAME 3516118c2bSBill Paul.Nm rpc.ypxfrd 3616118c2bSBill Paul.Nd "NIS map transfer server" 3716118c2bSBill Paul.Sh SYNOPSIS 38e97407b4SRuslan Ermilov.Nm 3916118c2bSBill Paul.Op Fl p Ar path 4016118c2bSBill Paul.Sh DESCRIPTION 4116118c2bSBill PaulThe 421e96bb57SPhilippe Charnier.Nm 4357bd0fc6SJens Schweikhardtutility is used to speed up the distribution of very large NIS maps 44f2e366a1SSheldon Hearnfrom NIS master to NIS slave servers. 45d4352d29SJoel DahlThe normal method for transferring 4616118c2bSBill Paulmaps involves several steps: 4716118c2bSBill Paul.Bl -bullet -offset indent 4816118c2bSBill Paul.It 4916118c2bSBill PaulThe master server calls 5016118c2bSBill Paul.Xr yppush 8 5116118c2bSBill Paulto inform the slave servers to start a transfer. 5216118c2bSBill Paul.It 5316118c2bSBill PaulThe slave servers invoke 5416118c2bSBill Paul.Xr ypxfr 8 , 5516118c2bSBill Paulwhich reads the entire contents of a map from the master server 5616118c2bSBill Paulusing the yp_all() function. 5716118c2bSBill Paul.It 5816118c2bSBill PaulThe 5916118c2bSBill Paul.Xr ypxfr 8 6016118c2bSBill Paulprogram then creates a new map database file by using the 6116118c2bSBill Paul.Xr db 3 6216118c2bSBill Paullibrary hash method to store the data that it receives from the server. 6316118c2bSBill Paul.It 6416118c2bSBill PaulWhen all the data has been retrieved, 6516118c2bSBill Paul.Xr ypxfr 8 6616118c2bSBill Paulmoves the new file into place and sends 6716118c2bSBill Paul.Xr ypserv 8 6816118c2bSBill Paulon the local machine a YPPROC_CLEAR to tell it to refresh its 6916118c2bSBill Pauldatabase handles. 7016118c2bSBill Paul.El 7116118c2bSBill Paul.Pp 7216118c2bSBill PaulThis process can take several minutes when there are very large 73f2e366a1SSheldon Hearnmaps involved. 74f2e366a1SSheldon HearnFor example: a passwd database with several tens of 7516118c2bSBill Paulthousands of entries can consume several megabytes of disk space, 7616118c2bSBill Pauland it can take the 7716118c2bSBill Paul.Xr db 3 7816118c2bSBill Paullibrary package a long time to sort and store all the records 79f2e366a1SSheldon Hearnin a hash database. 80f2e366a1SSheldon HearnConsider also that there are two sets of map 8116118c2bSBill Paulfiles: 8216118c2bSBill Paul.Pa master.passwd.by{name,uid} 8316118c2bSBill Pauland 8416118c2bSBill Paul.Pa passwd.by{name,uid} . 8516118c2bSBill Paul.Pp 8616118c2bSBill PaulThe 871e96bb57SPhilippe Charnier.Nm 88490d5836SPhilippe Charnierutility speeds up the transfer process by allowing NIS slave servers to 8916118c2bSBill Paulsimply copy the master server's map files rather than building their 90f2e366a1SSheldon Hearnown from scratch. 91f2e366a1SSheldon HearnSimply put, 921e96bb57SPhilippe Charnier.Nm 93f2e366a1SSheldon Hearnimplements an RPC-based file transfer protocol. 94d4352d29SJoel DahlTransferring even 9516118c2bSBill Paula multi-megabyte file in this fashion takes only a few seconds compared 9616118c2bSBill Paulto the several minutes it would take even a reasonably fast slave server 9716118c2bSBill Paulto build a new map from scratch. 9816118c2bSBill Paul.Pp 9916118c2bSBill PaulThe 1001e96bb57SPhilippe Charnier.Nm 101490d5836SPhilippe Charnierutility uses the same access restriction mechanism as 10216118c2bSBill Paul.Xr ypserv 8 . 10316118c2bSBill PaulThis means that slave servers will only be permitted to transfer 10416118c2bSBill Paulfiles if the rules in the 1051ab1fe76SMaxim Konovalov.Pa securenets 1061ab1fe76SMaxim Konovalovdatabase permit it (see 1071ab1fe76SMaxim Konovalov.Xr ypserv 8 1081ab1fe76SMaxim Konovalovfor more information on 1091ab1fe76SMaxim Konovalov.Pa securenets ) . 110f2e366a1SSheldon HearnFurthermore, only slave servers using reserved 11116118c2bSBill Paulports will be allowed to transfer the 11216118c2bSBill Paul.Pa master.passwd 11316118c2bSBill Paulmaps. 11416118c2bSBill Paul.Sh OPTIONS 1151e96bb57SPhilippe CharnierThe following option is available: 1161e96bb57SPhilippe Charnier.Bl -tag -width indent 11716118c2bSBill Paul.It Fl p Ar path 11816118c2bSBill PaulThis option can be used to override the default path to 11916118c2bSBill Paulthe location of the NIS 120f2e366a1SSheldon Hearnmap databases. 121f2e366a1SSheldon HearnThe compiled-in default path is 12216118c2bSBill Paul.Pa /var/yp . 12316118c2bSBill Paul.El 12416118c2bSBill Paul.Sh FILES 12516118c2bSBill Paul.Bl -tag -width Pa -compact 12616118c2bSBill Paul.It Pa /var/yp/[domainname]/[maps] 12716118c2bSBill PaulThe NIS maps for a particular NIS domain. 12816118c2bSBill Paul.El 12916118c2bSBill Paul.Sh SEE ALSO 130491a8429SRuslan Ermilov.Xr yp 8 , 13116118c2bSBill Paul.Xr yppush 8 , 132bfd34a4aSWolfram Schneider.Xr ypserv 8 , 133bfd34a4aSWolfram Schneider.Xr ypxfr 8 13459a3c79dSRuslan Ermilov.Sh AUTHORS 135*01c2b8acSBaptiste Daroussin.An Bill Paul Aq Mt wpaul@ctr.columbia.edu 13616118c2bSBill Paul.Sh BUGS 1371e96bb57SPhilippe CharnierThe 138b5c508fbSRuslan Ermilov.Fx 13916118c2bSBill Paul.Nm ypxfrd 140f2e366a1SSheldon Hearnprotocol is not compatible with that used by SunOS. 141f2e366a1SSheldon HearnThis is unfortunate 14216118c2bSBill Paulbut unavoidable: Sun's protocol is not freely available, and even if it 143767c0e7bSThomas Gellekumwere it would probably not be useful since the SunOS NIS v2 implementation 1441e96bb57SPhilippe Charnieruses the original ndbm package for its map databases whereas the 145b5c508fbSRuslan Ermilov.Fx 146f2e366a1SSheldon Hearnimplementation uses Berkeley DB. 147f2e366a1SSheldon HearnThese two packages use vastly different 148f2e366a1SSheldon Hearnfile formats. 149f2e366a1SSheldon HearnFurthermore, ndbm is byte-order sensitive and not very 15016118c2bSBill Paulsmart about it, meaning that am ndbm database created on a big endian 1510227791bSRuslan Ermilovsystem cannot be read on a little endian system. 152