README revision 1.1 1 1.1 cgd RPCSRC 4.0 7/11/89
2 1.1 cgd
3 1.1 cgd This distribution contains Sun Microsystem's implementation of the
4 1.1 cgd RPC and XDR protocols and is compatible with 4.2BSD and 4.3BSD. Also
5 1.1 cgd included is complete documentation, utilities, RPC service
6 1.1 cgd specification files, and demonstration services in the format used by
7 1.1 cgd the RPC protocol compiler (rpcgen). See WHAT'S NEW below for
8 1.1 cgd details.
9 1.1 cgd
10 1.1 cgd NOTE ABOUT SECURE RPC:
11 1.1 cgd
12 1.1 cgd This release of RPCSRC contains most of the code needed to implement
13 1.1 cgd Secure RPC (see "DES Authentication" in the RPC Protocol Specification,
14 1.1 cgd doc/rpc.rfc.ms). Due to legal considerations, we are unable to
15 1.1 cgd distribute an implementation of DES, the Data Encryption Standard, which
16 1.1 cgd Secure RPC requires. For this reason, all of the files, documentation, and
17 1.1 cgd programs associated with Secure RPC have been placed into a separate
18 1.1 cgd directory, secure_rpc. The RPC library contained in the main body of this
19 1.1 cgd release *DOES NOT* support Secure RPC. See secure_rpc/README for more
20 1.1 cgd details. (A DES library was posted in Volume 18 of comp.sources.unix.)
21 1.1 cgd
22 1.1 cgd If you wish to report bugs found in this release, send mail to:
23 1.1 cgd
24 1.1 cgd Portable ONC/NFS
25 1.1 cgd Sun Microsystems, Inc
26 1.1 cgd MS 12-33
27 1.1 cgd 2550 Garcia Avenue
28 1.1 cgd Mountain View, CA 94043
29 1.1 cgd
30 1.1 cgd or send Email to nfsnet (a] sun.com (the Internet) or sun!nfsnet (Usenet).
31 1.1 cgd
32 1.1 cgd ROADMAP
33 1.1 cgd
34 1.1 cgd The directory hierarchy is as follows:
35 1.1 cgd
36 1.1 cgd demo/ Various demonstration services
37 1.1 cgd demo/dir Remote directory lister
38 1.1 cgd demo/msg Remote console message delivery service
39 1.1 cgd demo/sort Remote sort service
40 1.1 cgd
41 1.1 cgd doc/ Documentation for RPC, XDR and NFS in "-ms" format.
42 1.1 cgd
43 1.1 cgd etc/ Utilities (rpcinfo and portmap). portmap must be
44 1.1 cgd started by root before any other RPC network services are
45 1.1 cgd used. SEE BELOW FOR BUGFIX TO 4.3BSD COMPILER.
46 1.1 cgd
47 1.1 cgd man/ Manual pages for RPC library, rpcgen, and utilities.
48 1.1 cgd
49 1.1 cgd rpc/ The RPC and XDR library. SEE BELOW
50 1.1 cgd FOR BUGFIX TO 4.2BSD COMPILER.
51 1.1 cgd
52 1.1 cgd rpcgen/ The RPC Language compiler (for .x files)
53 1.1 cgd
54 1.1 cgd rpcsvc/ Service definition files for various services and the
55 1.1 cgd server and client code for the Remote Status service.
56 1.1 cgd
57 1.1 cgd secure_rpc/ The files in this directory are used to build a version of
58 1.1 cgd the RPC library with DES Authentication. See the README
59 1.1 cgd file in that directory for more details.
60 1.1 cgd
61 1.1 cgd BUILD INSTRUCTIONS
62 1.1 cgd
63 1.1 cgd Makefiles can be found in all directories except for man. The
64 1.1 cgd Makefile in the top directory will cause these others to be invoked
65 1.1 cgd (except for in the doc, man and demo directories), in turn building the
66 1.1 cgd entire release.
67 1.1 cgd
68 1.1 cgd WARNING! THE DEFAULT INSTALLATION PROCEDURES WILL INSTALL FILES
69 1.1 cgd IN /usr/include, /usr/lib, /usr/bin and /etc.
70 1.1 cgd
71 1.1 cgd The master RPC include file, rpc/rpc.h, is used by all programs and
72 1.1 cgd routines that use RPC. It includes other RPC and system include files
73 1.1 cgd needed by the RPC system. PLEASE NOTE: If your system has NFS, it
74 1.1 cgd may have been based on Sun's NFS Source. The include files installed
75 1.1 cgd by this package may duplicate include files you will find on your NFS
76 1.1 cgd system. The RPCSRC 4.0 include files are upwardly compatible to all
77 1.1 cgd NFS Source include files as of the date of this distribution (not
78 1.1 cgd including any new definitions or declarations added by your system
79 1.1 cgd vendor). HOWEVER: Please read the comments towards the end of
80 1.1 cgd rpc/rpc.h regarding rpc/netdb.h. You may need to uncomment the
81 1.1 cgd inclusion of that file if the structures it defines are already
82 1.1 cgd defined by your system's include files.
83 1.1 cgd
84 1.1 cgd After making any compiler fixes that are needed (see below), at
85 1.1 cgd the top directory, type:
86 1.1 cgd
87 1.1 cgd make install
88 1.1 cgd
89 1.1 cgd For all installations, the Makefile macro DESTDIR is prepended to the
90 1.1 cgd installation path. It is defined to be null in the Makefiles, so
91 1.1 cgd installations are relative to root. (You will probably need root
92 1.1 cgd privileges for installing the files under the default path.) To
93 1.1 cgd install the files under some other tree (e.g., /usr/local), use the
94 1.1 cgd command:
95 1.1 cgd
96 1.1 cgd make install DESTDIR=/usr/local
97 1.1 cgd
98 1.1 cgd This will place the include files in /usr/local/usr/include, the RPC
99 1.1 cgd library in /usr/local/usr/lib, rpcgen in /usr/local/usr/bin, and the
100 1.1 cgd utilities in /usr/local/etc. You'll have to edit the Makefiles or
101 1.1 cgd install the files by hand if you want to do anything other than this
102 1.1 cgd kind of relocation of the installation tree.
103 1.1 cgd
104 1.1 cgd The RPC library will be built and installed first. By default it is
105 1.1 cgd installed in /usr/lib as "librpclib.a". The directory
106 1.1 cgd /usr/include/rpc will also be created, and several header files will
107 1.1 cgd be installed there. ALL RPC SERVICES INCLUDE THESE HEADER FILES.
108 1.1 cgd
109 1.1 cgd The programs in etc/ link in routines from librpclib.a. If you change
110 1.1 cgd where it is installed, be sure to edit etc/'s Makefile to reflect this.
111 1.1 cgd These programs are installed in /etc. PORTMAP MUST BE RUNNING ON
112 1.1 cgd YOUR SYSTEM BEFORE YOU START ANY OTHER RPC SERVICE.
113 1.1 cgd
114 1.1 cgd rpcgen is installed in /usr/bin. This program is required to build
115 1.1 cgd the demonstration services in demo and the rstat client and server in
116 1.1 cgd rpcsvc/.
117 1.1 cgd
118 1.1 cgd The rpcsvc/ directory will install its files in the directory
119 1.1 cgd /usr/include/rpcsvc. The Remote Status service (rstat_svc) will be
120 1.1 cgd compiled and installed in /etc. If you wish to make this service
121 1.1 cgd available, you should either start this service when needed or have
122 1.1 cgd it started at boot time by invoking it in your /etc/rc.local script.
123 1.1 cgd (Be sure that portmap is started first!) Sun has modified its
124 1.1 cgd version of inetd to automatically start RPC services. (Use "make
125 1.1 cgd LIB=" when building rstat on a Sun Workstation.) The Remote Status
126 1.1 cgd client (rstat) will be installed in /usr/bin. This program queries
127 1.1 cgd the rstat_svc on a remote host and prints a system status summary
128 1.1 cgd similar to the one printed by "uptime".
129 1.1 cgd
130 1.1 cgd The documentation is not built during the "make install" command.
131 1.1 cgd Typing "make" in the doc directory will cause all of the manuals to
132 1.1 cgd be formatted using nroff into a single file. We have had a report
133 1.1 cgd that certain "troff" equivalents have trouble processing the full
134 1.1 cgd manual. If you have trouble, try building the manuals individually
135 1.1 cgd (see the Makefile).
136 1.1 cgd
137 1.1 cgd The demonstration services in the demo directory are not built by the
138 1.1 cgd top-level "make install" command. To build these, cd to the demo
139 1.1 cgd directory and enter "make". The three services will be built.
140 1.1 cgd RPCGEN MUST BE INSTALLED in a path that make can find. To run the
141 1.1 cgd services, start the portmap program as root and invoke the service
142 1.1 cgd (you probably will want to put it in the background). rpcinfo can be
143 1.1 cgd used to check that the service succeeded in getting registered with
144 1.1 cgd portmap, and to ping the service (see rpcinfo's man page). You can
145 1.1 cgd then use the corresponding client program to exercise the service.
146 1.1 cgd To build these services on a Sun workstation, you must prevent the
147 1.1 cgd Makefile from trying to link the RPC library (as these routines are
148 1.1 cgd already a part of Sun's libc). Use: "make LIB=".
149 1.1 cgd
150 1.1 cgd BUGFIX FOR 4.3BSD COMPILER
151 1.1 cgd
152 1.1 cgd The use of a 'void *' declaration for one of the arguments in
153 1.1 cgd the reply_proc() procedure in etc/rpcinfo.c will trigger a bug
154 1.1 cgd in the 4.3BSD compiler. The bug is fixed by the following change to
155 1.1 cgd the compiler file mip/manifest.h:
156 1.1 cgd
157 1.1 cgd *** manifest.h.r1.1 Thu Apr 30 13:52:25 1987
158 1.1 cgd --- manifest.h.r1.2 Mon Nov 23 18:58:17 1987
159 1.1 cgd ***************
160 1.1 cgd *** 21,27 ****
161 1.1 cgd /*
162 1.1 cgd * Bogus type values
163 1.1 cgd */
164 1.1 cgd ! #define TNULL PTR /* pointer to UNDEF */
165 1.1 cgd #define TVOID FTN /* function returning UNDEF (for void) */
166 1.1 cgd
167 1.1 cgd /*
168 1.1 cgd --- 21,27 ----
169 1.1 cgd /*
170 1.1 cgd * Bogus type values
171 1.1 cgd */
172 1.1 cgd ! #define TNULL INCREF(MOETY) /* pointer to MOETY -- impossible type */
173 1.1 cgd #define TVOID FTN /* function returning UNDEF (for void) */
174 1.1 cgd
175 1.1 cgd /*
176 1.1 cgd
177 1.1 cgd If you cannot fix your compiler, change the declaration in reply_proc()
178 1.1 cgd from 'void *' to 'char *'.
179 1.1 cgd
180 1.1 cgd BUGFIX FOR 4.2BSD COMPILER
181 1.1 cgd
182 1.1 cgd Unpatched 4.2BSD compilers complain about valid C. You can make old
183 1.1 cgd compilers happy by changing some voids to ints. However, the fix to
184 1.1 cgd the 4.2 VAX compiler is as follows (to mip/trees.c):
185 1.1 cgd
186 1.1 cgd *** trees.c.r1.1 Mon May 11 13:47:58 1987
187 1.1 cgd --- trees.c.r1.2 Wed Jul 2 18:28:52 1986
188 1.1 cgd ***************
189 1.1 cgd *** 1247,1253 ****
190 1.1 cgd if(o==CAST && mt1==0)return(TYPL+TYMATCH);
191 1.1 cgd if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
192 1.1 cgd else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
193 1.1 cgd ! else if( mt12 == 0 ) break;
194 1.1 cgd else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
195 1.1 cgd else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
196 1.1 cgd break;
197 1.1 cgd --- 1261,1269 ----
198 1.1 cgd if(o==CAST && mt1==0)return(TYPL+TYMATCH);
199 1.1 cgd if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
200 1.1 cgd else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
201 1.1 cgd ! /* if right is TVOID and looks like a CALL, is not ok */
202 1.1 cgd ! else if (mt2 == 0 && (p->in.right->in.op == CALL || p->in.right->in.op == UNARY CALL))
203 1.1 cgd ! break;
204 1.1 cgd else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
205 1.1 cgd else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
206 1.1 cgd break;
207 1.1 cgd
208 1.1 cgd WHAT'S NEW IN THIS RELEASE: RPCSRC 4.0
209 1.1 cgd
210 1.1 cgd The previous release was RPCSRC 3.9. As with all previous releases,
211 1.1 cgd this release is based directly on files from Sun Microsystem's
212 1.1 cgd implementation.
213 1.1 cgd
214 1.1 cgd Upgrade from RPCSRC 3.9
215 1.1 cgd
216 1.1 cgd 1) RPCSRC 4.0 upgrades RPCSRC 3.9. Improvements from SunOS 4.0 have
217 1.1 cgd been integrated into this release.
218 1.1 cgd
219 1.1 cgd Secure RPC (in the secure_rpc/ directory)
220 1.1 cgd
221 1.1 cgd 2) DES Authentication routines and programs are provided.
222 1.1 cgd 3) A new manual, "Secure NFS" is provided, which describes Secure RPC
223 1.1 cgd and Secure NFS.
224 1.1 cgd 4) Skeleton routines and manual pages are provided which describe the
225 1.1 cgd DES encryption procedures required by Secure RPC. HOWEVER, NO DES
226 1.1 cgd ROUTINE IS PROVIDED.
227 1.1 cgd
228 1.1 cgd New Functionality
229 1.1 cgd
230 1.1 cgd 5) rpcinfo can now be used to de-register services from the portmapper
231 1.1 cgd which may have terminated abnormally.
232 1.1 cgd 6) A new client, rstat, is provided which queries the rstat_svc and
233 1.1 cgd prints a status line similar to the one displayed by "uptime".
234