README revision 1.1
11.1ScgdRPCSRC 4.0 7/11/89 21.1Scgd 31.1ScgdThis distribution contains Sun Microsystem's implementation of the 41.1ScgdRPC and XDR protocols and is compatible with 4.2BSD and 4.3BSD. Also 51.1Scgdincluded is complete documentation, utilities, RPC service 61.1Scgdspecification files, and demonstration services in the format used by 71.1Scgdthe RPC protocol compiler (rpcgen). See WHAT'S NEW below for 81.1Scgddetails. 91.1Scgd 101.1ScgdNOTE ABOUT SECURE RPC: 111.1Scgd 121.1ScgdThis release of RPCSRC contains most of the code needed to implement 131.1ScgdSecure RPC (see "DES Authentication" in the RPC Protocol Specification, 141.1Scgddoc/rpc.rfc.ms). Due to legal considerations, we are unable to 151.1Scgddistribute an implementation of DES, the Data Encryption Standard, which 161.1ScgdSecure RPC requires. For this reason, all of the files, documentation, and 171.1Scgdprograms associated with Secure RPC have been placed into a separate 181.1Scgddirectory, secure_rpc. The RPC library contained in the main body of this 191.1Scgdrelease *DOES NOT* support Secure RPC. See secure_rpc/README for more 201.1Scgddetails. (A DES library was posted in Volume 18 of comp.sources.unix.) 211.1Scgd 221.1ScgdIf you wish to report bugs found in this release, send mail to: 231.1Scgd 241.1ScgdPortable ONC/NFS 251.1ScgdSun Microsystems, Inc 261.1ScgdMS 12-33 271.1Scgd2550 Garcia Avenue 281.1ScgdMountain View, CA 94043 291.1Scgd 301.1Scgdor send Email to nfsnet@sun.com (the Internet) or sun!nfsnet (Usenet). 311.1Scgd 321.1ScgdROADMAP 331.1Scgd 341.1ScgdThe directory hierarchy is as follows: 351.1Scgd 361.1Scgd demo/ Various demonstration services 371.1Scgd demo/dir Remote directory lister 381.1Scgd demo/msg Remote console message delivery service 391.1Scgd demo/sort Remote sort service 401.1Scgd 411.1Scgd doc/ Documentation for RPC, XDR and NFS in "-ms" format. 421.1Scgd 431.1Scgd etc/ Utilities (rpcinfo and portmap). portmap must be 441.1Scgd started by root before any other RPC network services are 451.1Scgd used. SEE BELOW FOR BUGFIX TO 4.3BSD COMPILER. 461.1Scgd 471.1Scgd man/ Manual pages for RPC library, rpcgen, and utilities. 481.1Scgd 491.1Scgd rpc/ The RPC and XDR library. SEE BELOW 501.1Scgd FOR BUGFIX TO 4.2BSD COMPILER. 511.1Scgd 521.1Scgd rpcgen/ The RPC Language compiler (for .x files) 531.1Scgd 541.1Scgd rpcsvc/ Service definition files for various services and the 551.1Scgd server and client code for the Remote Status service. 561.1Scgd 571.1Scgd secure_rpc/ The files in this directory are used to build a version of 581.1Scgd the RPC library with DES Authentication. See the README 591.1Scgd file in that directory for more details. 601.1Scgd 611.1ScgdBUILD INSTRUCTIONS 621.1Scgd 631.1ScgdMakefiles can be found in all directories except for man. The 641.1ScgdMakefile in the top directory will cause these others to be invoked 651.1Scgd(except for in the doc, man and demo directories), in turn building the 661.1Scgdentire release. 671.1Scgd 681.1ScgdWARNING! THE DEFAULT INSTALLATION PROCEDURES WILL INSTALL FILES 691.1ScgdIN /usr/include, /usr/lib, /usr/bin and /etc. 701.1Scgd 711.1ScgdThe master RPC include file, rpc/rpc.h, is used by all programs and 721.1Scgdroutines that use RPC. It includes other RPC and system include files 731.1Scgdneeded by the RPC system. PLEASE NOTE: If your system has NFS, it 741.1Scgdmay have been based on Sun's NFS Source. The include files installed 751.1Scgdby this package may duplicate include files you will find on your NFS 761.1Scgdsystem. The RPCSRC 4.0 include files are upwardly compatible to all 771.1ScgdNFS Source include files as of the date of this distribution (not 781.1Scgdincluding any new definitions or declarations added by your system 791.1Scgdvendor). HOWEVER: Please read the comments towards the end of 801.1Scgdrpc/rpc.h regarding rpc/netdb.h. You may need to uncomment the 811.1Scgdinclusion of that file if the structures it defines are already 821.1Scgddefined by your system's include files. 831.1Scgd 841.1ScgdAfter making any compiler fixes that are needed (see below), at 851.1Scgdthe top directory, type: 861.1Scgd 871.1Scgd make install 881.1Scgd 891.1ScgdFor all installations, the Makefile macro DESTDIR is prepended to the 901.1Scgdinstallation path. It is defined to be null in the Makefiles, so 911.1Scgdinstallations are relative to root. (You will probably need root 921.1Scgdprivileges for installing the files under the default path.) To 931.1Scgdinstall the files under some other tree (e.g., /usr/local), use the 941.1Scgdcommand: 951.1Scgd 961.1Scgd make install DESTDIR=/usr/local 971.1Scgd 981.1ScgdThis will place the include files in /usr/local/usr/include, the RPC 991.1Scgdlibrary in /usr/local/usr/lib, rpcgen in /usr/local/usr/bin, and the 1001.1Scgdutilities in /usr/local/etc. You'll have to edit the Makefiles or 1011.1Scgdinstall the files by hand if you want to do anything other than this 1021.1Scgdkind of relocation of the installation tree. 1031.1Scgd 1041.1ScgdThe RPC library will be built and installed first. By default it is 1051.1Scgdinstalled in /usr/lib as "librpclib.a". The directory 1061.1Scgd/usr/include/rpc will also be created, and several header files will 1071.1Scgdbe installed there. ALL RPC SERVICES INCLUDE THESE HEADER FILES. 1081.1Scgd 1091.1ScgdThe programs in etc/ link in routines from librpclib.a. If you change 1101.1Scgdwhere it is installed, be sure to edit etc/'s Makefile to reflect this. 1111.1ScgdThese programs are installed in /etc. PORTMAP MUST BE RUNNING ON 1121.1ScgdYOUR SYSTEM BEFORE YOU START ANY OTHER RPC SERVICE. 1131.1Scgd 1141.1Scgdrpcgen is installed in /usr/bin. This program is required to build 1151.1Scgdthe demonstration services in demo and the rstat client and server in 1161.1Scgdrpcsvc/. 1171.1Scgd 1181.1ScgdThe rpcsvc/ directory will install its files in the directory 1191.1Scgd/usr/include/rpcsvc. The Remote Status service (rstat_svc) will be 1201.1Scgdcompiled and installed in /etc. If you wish to make this service 1211.1Scgdavailable, you should either start this service when needed or have 1221.1Scgdit started at boot time by invoking it in your /etc/rc.local script. 1231.1Scgd(Be sure that portmap is started first!) Sun has modified its 1241.1Scgdversion of inetd to automatically start RPC services. (Use "make 1251.1ScgdLIB=" when building rstat on a Sun Workstation.) The Remote Status 1261.1Scgdclient (rstat) will be installed in /usr/bin. This program queries 1271.1Scgdthe rstat_svc on a remote host and prints a system status summary 1281.1Scgdsimilar to the one printed by "uptime". 1291.1Scgd 1301.1ScgdThe documentation is not built during the "make install" command. 1311.1ScgdTyping "make" in the doc directory will cause all of the manuals to 1321.1Scgdbe formatted using nroff into a single file. We have had a report 1331.1Scgdthat certain "troff" equivalents have trouble processing the full 1341.1Scgdmanual. If you have trouble, try building the manuals individually 1351.1Scgd(see the Makefile). 1361.1Scgd 1371.1ScgdThe demonstration services in the demo directory are not built by the 1381.1Scgdtop-level "make install" command. To build these, cd to the demo 1391.1Scgddirectory and enter "make". The three services will be built. 1401.1ScgdRPCGEN MUST BE INSTALLED in a path that make can find. To run the 1411.1Scgdservices, start the portmap program as root and invoke the service 1421.1Scgd(you probably will want to put it in the background). rpcinfo can be 1431.1Scgdused to check that the service succeeded in getting registered with 1441.1Scgdportmap, and to ping the service (see rpcinfo's man page). You can 1451.1Scgdthen use the corresponding client program to exercise the service. 1461.1ScgdTo build these services on a Sun workstation, you must prevent the 1471.1ScgdMakefile from trying to link the RPC library (as these routines are 1481.1Scgdalready a part of Sun's libc). Use: "make LIB=". 1491.1Scgd 1501.1ScgdBUGFIX FOR 4.3BSD COMPILER 1511.1Scgd 1521.1ScgdThe use of a 'void *' declaration for one of the arguments in 1531.1Scgdthe reply_proc() procedure in etc/rpcinfo.c will trigger a bug 1541.1Scgdin the 4.3BSD compiler. The bug is fixed by the following change to 1551.1Scgdthe compiler file mip/manifest.h: 1561.1Scgd 1571.1Scgd*** manifest.h.r1.1 Thu Apr 30 13:52:25 1987 1581.1Scgd--- manifest.h.r1.2 Mon Nov 23 18:58:17 1987 1591.1Scgd*************** 1601.1Scgd*** 21,27 **** 1611.1Scgd /* 1621.1Scgd * Bogus type values 1631.1Scgd */ 1641.1Scgd! #define TNULL PTR /* pointer to UNDEF */ 1651.1Scgd #define TVOID FTN /* function returning UNDEF (for void) */ 1661.1Scgd 1671.1Scgd /* 1681.1Scgd--- 21,27 ---- 1691.1Scgd /* 1701.1Scgd * Bogus type values 1711.1Scgd */ 1721.1Scgd! #define TNULL INCREF(MOETY) /* pointer to MOETY -- impossible type */ 1731.1Scgd #define TVOID FTN /* function returning UNDEF (for void) */ 1741.1Scgd 1751.1Scgd /* 1761.1Scgd 1771.1ScgdIf you cannot fix your compiler, change the declaration in reply_proc() 1781.1Scgdfrom 'void *' to 'char *'. 1791.1Scgd 1801.1ScgdBUGFIX FOR 4.2BSD COMPILER 1811.1Scgd 1821.1ScgdUnpatched 4.2BSD compilers complain about valid C. You can make old 1831.1Scgdcompilers happy by changing some voids to ints. However, the fix to 1841.1Scgdthe 4.2 VAX compiler is as follows (to mip/trees.c): 1851.1Scgd 1861.1Scgd*** trees.c.r1.1 Mon May 11 13:47:58 1987 1871.1Scgd--- trees.c.r1.2 Wed Jul 2 18:28:52 1986 1881.1Scgd*************** 1891.1Scgd*** 1247,1253 **** 1901.1Scgd if(o==CAST && mt1==0)return(TYPL+TYMATCH); 1911.1Scgd if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH ); 1921.1Scgd else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN ); 1931.1Scgd! else if( mt12 == 0 ) break; 1941.1Scgd else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN ); 1951.1Scgd else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN ); 1961.1Scgd break; 1971.1Scgd--- 1261,1269 ---- 1981.1Scgd if(o==CAST && mt1==0)return(TYPL+TYMATCH); 1991.1Scgd if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH ); 2001.1Scgd else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN ); 2011.1Scgd! /* if right is TVOID and looks like a CALL, is not ok */ 2021.1Scgd! else if (mt2 == 0 && (p->in.right->in.op == CALL || p->in.right->in.op == UNARY CALL)) 2031.1Scgd! break; 2041.1Scgd else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN ); 2051.1Scgd else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN ); 2061.1Scgd break; 2071.1Scgd 2081.1ScgdWHAT'S NEW IN THIS RELEASE: RPCSRC 4.0 2091.1Scgd 2101.1ScgdThe previous release was RPCSRC 3.9. As with all previous releases, 2111.1Scgdthis release is based directly on files from Sun Microsystem's 2121.1Scgdimplementation. 2131.1Scgd 2141.1ScgdUpgrade from RPCSRC 3.9 2151.1Scgd 2161.1Scgd1) RPCSRC 4.0 upgrades RPCSRC 3.9. Improvements from SunOS 4.0 have 2171.1Scgd been integrated into this release. 2181.1Scgd 2191.1ScgdSecure RPC (in the secure_rpc/ directory) 2201.1Scgd 2211.1Scgd2) DES Authentication routines and programs are provided. 2221.1Scgd3) A new manual, "Secure NFS" is provided, which describes Secure RPC 2231.1Scgd and Secure NFS. 2241.1Scgd4) Skeleton routines and manual pages are provided which describe the 2251.1Scgd DES encryption procedures required by Secure RPC. HOWEVER, NO DES 2261.1Scgd ROUTINE IS PROVIDED. 2271.1Scgd 2281.1ScgdNew Functionality 2291.1Scgd 2301.1Scgd5) rpcinfo can now be used to de-register services from the portmapper 2311.1Scgd which may have terminated abnormally. 2321.1Scgd6) A new client, rstat, is provided which queries the rstat_svc and 2331.1Scgd prints a status line similar to the one displayed by "uptime". 234