xref: /freebsd/usr.sbin/rpc.ypxfrd/rpc.ypxfrd.8 (revision 7bd6fde3)
1.\" Copyright (c) 1995, 1996
2.\"	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by Bill Paul.
15.\" 4. Neither the name of the author nor the names of contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\" $FreeBSD$
32.\"
33.Dd June 2, 1996
34.Dt RPC.YPXFRD 8
35.Os
36.Sh NAME
37.Nm rpc.ypxfrd
38.Nd "NIS map transfer server"
39.Sh SYNOPSIS
40.Nm
41.Op Fl p Ar path
42.Sh DESCRIPTION
43The
44.Nm
45utility is used to speed up the distribution of very large NIS maps
46from NIS master to NIS slave servers.
47The normal method for transfering
48maps involves several steps:
49.Bl -bullet -offset indent
50.It
51The master server calls
52.Xr yppush 8
53to inform the slave servers to start a transfer.
54.It
55The slave servers invoke
56.Xr ypxfr 8 ,
57which reads the entire contents of a map from the master server
58using the yp_all() function.
59.It
60The
61.Xr ypxfr 8
62program then creates a new map database file by using the
63.Xr db 3
64library hash method to store the data that it receives from the server.
65.It
66When all the data has been retrieved,
67.Xr ypxfr 8
68moves the new file into place and sends
69.Xr ypserv 8
70on the local machine a YPPROC_CLEAR to tell it to refresh its
71database handles.
72.El
73.Pp
74This process can take several minutes when there are very large
75maps involved.
76For example: a passwd database with several tens of
77thousands of entries can consume several megabytes of disk space,
78and it can take the
79.Xr db 3
80library package a long time to sort and store all the records
81in a hash database.
82Consider also that there are two sets of map
83files:
84.Pa master.passwd.by{name,uid}
85and
86.Pa passwd.by{name,uid} .
87.Pp
88The
89.Nm
90utility speeds up the transfer process by allowing NIS slave servers to
91simply copy the master server's map files rather than building their
92own from scratch.
93Simply put,
94.Nm
95implements an RPC-based file transfer protocol.
96Transfering even
97a multi-megabyte file in this fashion takes only a few seconds compared
98to the several minutes it would take even a reasonably fast slave server
99to build a new map from scratch.
100.Pp
101The
102.Nm
103utility uses the same access restriction mechanism as
104.Xr ypserv 8 .
105This means that slave servers will only be permitted to transfer
106files if the rules in the
107.Pa securenets
108database permit it (see
109.Xr ypserv 8
110for more information on
111.Pa securenets ) .
112Furthermore, only slave servers using reserved
113ports will be allowed to transfer the
114.Pa master.passwd
115maps.
116.Sh OPTIONS
117The following option is available:
118.Bl -tag -width indent
119.It Fl p Ar path
120This option can be used to override the default path to
121the location of the NIS
122map databases.
123The compiled-in default path is
124.Pa /var/yp .
125.El
126.Sh FILES
127.Bl -tag -width Pa -compact
128.It Pa /var/yp/[domainname]/[maps]
129The NIS maps for a particular NIS domain.
130.El
131.Sh SEE ALSO
132.Xr yp 8 ,
133.Xr yppush 8 ,
134.Xr ypserv 8 ,
135.Xr ypxfr 8
136.Sh AUTHORS
137.An Bill Paul Aq wpaul@ctr.columbia.edu
138.Sh BUGS
139The
140.Fx
141.Nm ypxfrd
142protocol is not compatible with that used by SunOS.
143This is unfortunate
144but unavoidable: Sun's protocol is not freely available, and even if it
145were it would probably not be useful since the SunOS NIS v2 implementation
146uses the original ndbm package for its map databases whereas the
147.Fx
148implementation uses Berkeley DB.
149These two packages use vastly different
150file formats.
151Furthermore, ndbm is byte-order sensitive and not very
152smart about it, meaning that am ndbm database created on a big endian
153system cannot be read on a little endian system.
154