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