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