kstuff 0.18 (part 5/6)

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Tue May 7 14:59:06 AEST 1991


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 5 (of 6)."
# Contents:  CHANGES Makefile pff.doc rfc931
# Wrapped by brnstnd at kramden on Mon May  6 23:59:03 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'CHANGES'\"
else
echo shar: Extracting \"'CHANGES'\" \(9479 characters\)
sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
XChanges since first distributed version
X
XSR is Seth Robertson <seth at sirius.ctr.columbia.edu>.
XMK is Michael P. Kiernan <kiernan at fjord.berkeley.edu>.
XVA is Vic Abell <abe at mace.cc.purdue.edu>.
XTC is Tom Christiansen <tchrist at convex.com>.
XGR is Gary Rosenblum <rosenblg at nyu.edu>.
X
X5/6/91: Reorganized FILES.
X5/6/91: Added note about 127.1 to testauthd's output.
X5/6/91: Added skips to INSTALL.
X5/6/91: Updated netstatuids to #include "authuser.h".
X5/6/91: Revised BLURB.authd, chopped most of README.authd.
X5/6/91: Added authd question to FORMLETTER.
X5/6/91: Updated authuser to version 3.1.
X5/6/91: Added install and tests targets to Makefile.
X5/6/91: Rewrote most of INSTALL again, including -lauthuser installation.
X5/6/91: Replaced -lauthuser with authuser.o in Makefile.
X5/6/91: Added testauthd as a Makefile target.
X5/6/91: Included everything else from authd package.
X5/6/91: Included authuser from authd package. Tnx SR.
X
X5/3/91: kstuff 0.17.
X
X5/3/91: Included a whole bunch of stuff in INSTALL.
X5/3/91: Added getsocket caching. Speedup around 5-10%.
X5/3/91: Added getnode caching. Speedup around 10-15% total, 3/4 of getnode()s.
X5/3/91: Corrected sbuf->fu.un.me to sbuf->fu.un.unpcb.
X5/3/91: Introduced FSW_* defines for fsw in getsocket and pff.c.
X5/3/91: Introduced NODE_ID_* defines for flagdev in getnode and pff.c.
X5/3/91: Moved ppflags/offlags/pnflags settings into style switch.
X5/3/91: Introduced STYLE_* defines, converted pff.c for it.
X5/3/91: Added INSTALL.
X5/3/91: Unhid inperrno. Aargh.
X5/3/91: Fixed DYNIX bug when ofile_ext was in action. Tnx VA.
X5/3/91: Split BSD43STRAIGHT into BSD43TAHOE and BSD43CLASSIC.
X5/3/91: Included various new compile options sets. Tnx VA.
X5/3/91: Added MACHOPTS in Makefile, rewrote instructions.
X5/3/91: Changed *ucred* to do something more sensible without HAVE_UCRED.
X5/3/91: Modified authd.c and netstatuids.c to not compile without HAVE_UCRED.
X5/3/91: Added definition of struct ucred for systems without it.
X5/3/91: Added address-of-UNIX-domain-socket to sbuf->fu.un, printed it.
X5/3/91: Fixed bug in pff.c guess code when i && !mt. Tnx VA.
X5/2/91: Renamed pf as pff (process-file-file, emphasis on the ff). Tnx GR.
X5/2/91: Changed -sshort to -sbrief, updated pf.doc.
X5/2/91: Added ULTRIX=22 test to confdomain.h. Tnx VA.
X
X5/1/91: Included the findinode package in a subdirectory.
X5/1/91: Replaced FDEFER in printfflag with FASYNC. Tnx VA.
X
X4/30/91: Copied authd.8, tcpuid.8, tcpuname.8 from authd 3.01 distribution.
X4/30/91: Added load.1.
X4/30/91: Disabled warning on getuser() failure. [sigh]
X4/30/91: Added history to all .c files.
X4/30/91: Documented nlistlist (whee!).
X4/30/91: Changed nlistlist to use strerrtab.
X4/30/91: Documented print*.c.
X4/30/91: Hid inperrno, nlistlisterrno, proctableerrno. All errnos now hidden.
X4/30/91: Documented kmem.
X4/30/91: Hid mmemerrno, smemerrno, kmemerrno.
X
X4/29/91: Added missing newline on getuser warning. Tnx VA.
X4/29/91: Fixed u.u_nofile in pf.c. Tnx VA.
X4/29/91: Added documentation to some of the conf*.h.
X4/29/91: Pointed smem and mmem documentation at kmem.c.
X4/29/91: Pointed portname and username documentation at groupname.c.
X4/29/91: Documented numeric. :-)
X4/29/91: Documented groupname.
X4/29/91: Documented getuser.
X4/29/91: Converted getuser to use strerrtab.
X4/29/91: Documented getsocket.
X4/29/91: Hid getpcrederrno, documented getpcred, used strerrtab in getpcred.
X4/29/91: Documented getnode, changed vninit() to getnodeinit().
X4/29/91: Hid getfcrederrno, documented getfcred, used strerrtab in getfcred.
X4/29/91: Documented getdevicename.
X4/29/91: Documented filetable inside filetable.c.
X4/29/91: Hid filetableerrno.
X4/29/91: Moved boottime documentation to boottime.c.
X4/29/91: Moved avenrun documentation to avenrun.c.
X
X4/28/91: Added -sn filename format. Also added filenames to -sf.
X4/28/91: Added EOF check to revnamei.c.
X4/27/91: Added revnamei.c, revnamei.h, pf.c use of them.
X
X4/23/91: kstuff 0.16.
X
X4/23/91: Added error check at critical getuser() in pf.c.
X4/23/91: Fixed a dozen other visibility errors found by quacko.
X4/23/91: Hid pervn inside getnode.c, blared vninit.
X4/23/91: Hid devnamelist inside getdevicename.c.
X4/23/91: Hid avenrunerrno, boottimeerrno.
X4/23/91: Fixed groupname.h.
X4/23/91: Changed filetable.c to use strerrtab.
X4/23/91: Used nlistnotin in filetable.c getuser.c inpcblist.c proctable.c.
X4/23/91: Documented boottime.c in boottime.h.
X4/23/91: Simplified avenrun.c, boottime.c to use nlistnotin.
X4/23/91: Added nlistnotin to nlistlist.h.
X4/23/91: Added strerrtab use to boottime.c.
X4/23/91: Replaced AV_ with BT_ in boottime.c.
X4/23/91: Documented avenrun.c in avenrun.h.
X4/23/91: Added strerrtab use to avenrun.c. Wow, it even works.
X4/23/91: Added strerrtaberr.
X4/23/91: Added strerrstr.
X4/23/91: Added strerrtab.
X4/23/91: Introduced DYNIX, DYNIXOLD so that ODOFE might work.
X4/23/91: Replaced invisible zs ifdef with ZS config.
X4/23/91: Fixed #ifdef IGMP use ND. Tnx VA.
X4/23/91: Fixed domname[50][29]. Tnx VA.
X
X4/20/91: Added DTYPE_SPU, DTYPE_PROCESS to keep Tom happy. Tnx TC.
X4/20/91: Reintroduced ODOFE special case, with file-at-a-time copying.
X4/20/91: Eliminated dof and some other ODOFE kludges. Tnx VA.
X4/20/91: Fixed sizeof(ofile_ext). Tnx VA.
X4/20/91: Copied oe.oe_nofile into u->u_nofile under ODOFE. Tnx VA.
X4/20/91: Removed ODOFE special case from confuofile.h. Tnx VA.
X4/20/91: Fixed getuser.c nlpagest bug under !GETUSERSUPPORT. Tnx VA.
X4/20/91: Changed confhaveucred.h to exclude BSD43STRAIGHT. Tnx VA.
X4/20/91: Extended confusrptnlist.h for Usrptma etc. Tnx VA.
X4/20/91: Added confusrptnlist.h.
X4/20/91: Changed confhavepsuid.h to be SunOS-Convex-DYNIX-Ultrix 4. Tnx VA.
X4/20/91: Bracketed sys/time.h in pf.c. Tnx VA.
X4/20/91: Changed confmntent.h to be SunOS-Convex-DYNIX.
X
X4/20/91: Integrated pf.c from ZS version.
X4/20/91: Integrated printucred.c from ZS version.
X4/20/91: Integrated mntops.c from ZS version.
X4/20/91: Integrated getnode.c from ZS version.
X4/20/91: Integrated getfcred.c from ZS version.
X4/20/91: Integrated getpcred.c from ZS version.
X4/20/91: Integrated getdevicename.c from ZS version.
X4/20/91: Integrated avenrun.c from ZS version.
X4/20/91: Added confmajorminor.h from ZS version.
X4/20/91: Added confhaveucred.h from ZS version.
X4/20/91: Integrated confloadavglong.h from ZS version.
X4/20/91: Integrated structpte.h from ZS version.
X4/20/91: Added confneedmachparam.h from ZS version.
X4/20/91: Added confneedartospte.h from ZS version.
X4/20/91: Added confhaveppid.h from ZS version.
X4/20/91: Integrated confhavepsuid.h from ZS version.
X4/20/91: Integrated structtext.h from ZS version.
X4/20/91: Added conftextneedsvmparam.h from ZS version.
X4/20/91: Integrated confmntent.h from ZS version.
X4/19/91: Ported parts of pf to the ZS.
X
X4/14/91: kstuff 0.15.
X
X4/14/91: Works under Convex UNIX 9.0.
X4/14/91: Added confdevt.h for the Convex. Aargh.
X4/14/91: Works under Ultrix 4.1.
X4/14/91: Fixed HAVEPSUID typo in structproc.h.
X4/14/91: Added notes on derivation to ofiles-derived files.
X
X4/13/91: Added initblahtable's in pf.c to get back down to one nlist().
X4/13/91: Changed getvmseg.c to export usable seginit(), added that to pf.c.
X4/13/91: Added confodofe.h, changed confuofile.h, structfile.h for it.
X4/13/91: Tried to integrate new DYNIX ofile_ext stuff. Tnx VA.
X4/13/91: Moved sys/user includes above sys/time includes. Tnx VA.
X4/13/91: Bracketed <sys/time.h> with ITIMER_REAL.
X4/13/91: Oops, forgot to steal getmntent() clone for mntops.c. Tnx VA.
X
X4/11/91: Fixed typo in Convex regiontab processing. It might even still work.
X4/11/91: Added error checking for argument processing.
X4/11/91: Added portname.c, port lookups.
X4/11/91: Right-justified REF header.
X4/11/91: Added username lookups.
X4/11/91: Convex knlist() failure on ufs_vnodeops is Convex's fault. Tnx TC.
X4/11/91: Added -sh, -sH.
X4/11/91: Changed style types to be by name instead of number.
X
X4/11/91: Added KERNEL around ufs/inode.h in structxnode.h for DYNIX. Tnx VA.
X4/11/91: Added #include "structsocket.h" to structinpcb.h. Tnx VA.
X4/11/91: Added confhavesigintr.h, changed pf.c for it. Tnx VA.
X4/11/91: Fixed DYNIX bugs in confvmunix.h. Tnx VA.
X4/11/91: Added !DYNIX to conftext.h. (Any way to get the text?) Tnx VA.
X4/11/91: Added DYNIX to confdomain.h. Tnx VA.
X4/11/91: Added confnounpaddr.h, changed structunpcb.h for it. Tnx VA.
X4/11/91: Changed structucred.h to include structuser.h. Tnx VA.
X4/11/91: Added confhavepsuid.h, changed structproc.h for it. Tnx VA.
X4/11/91: Changed confmalloc.h to look for ULTRIX >= 40. Tnx VA.
X4/11/91: Made -DULTRIX into a numeric #define. Tnx VA.
X4/11/91: Added missing braces in DYNIX getuser.c. Tnx VA.
X4/11/91: Changed #ifdef to #ifndef lines 94 and 109 of getuser.c. Tnx MK.
X4/11/91: Okay, so not everything works. Fixed confgetusersupport.h. Tnx MK.
X
X4/6/91: Everything works. Not bad for a thousand-line reorganization.
X4/6/91: Ah, 'twas a sixth typo. Three minutes with dbx.
X4/6/91: Compiles after five typos fixed, doesn't work.
X4/6/91: Finished conf*.h, only 47 new files. Will it compile?
X4/6/91: Introduced conf*.h. Fun fun fun.
X4/6/91: Added #ifdefs throughout printpstat.c.
X4/6/91: Added VOID_FREE and integrated mallocfree.h. Whoops.
X4/6/91: Took struct proc description out of printpstat.c.
X4/6/91: Added #ifdefs throughout printfamily.c.
X
X4/6/91: kstuff 0.13.
X
X4/6/91: Added CHANGES and OF to distribution.
X4/6/91: Added notes to struct*.h about what the files should look like.
X4/5/91: Ported to SunOS 4.1, added -DPSESS. Tnx SR.
X
X4/2/91: kstuff 0.12.
END_OF_FILE
if test 9479 -ne `wc -c <'CHANGES'`; then
    echo shar: \"'CHANGES'\" unpacked with wrong size!
fi
# end of 'CHANGES'
fi
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(6717 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
XCC=cc
XCCOPTS=-g -DSECURITY
XLIBS=
X# -lvm for Convex
XGETULIBS=-lkvm
X# -lkvm for Suns
XMACHOPTS=-DSUNOS4 -DBSD43 -DNFS
X# SunOS 4.0.3: -DSUNOS4 -DBSD43 -DNFS
X#   tested on Sun 4/280
X#   some testing on Sun 3/280, thanks to Vic Abell
X# SunOS 4.1: -DSUNOS4 -DSUNOS41 -DBSD43 -DNFS
X#   tested on various Sun 3s and Sun 4s, thanks to Seth Robertson
X# Ultrix 4.1: -DULTRIX=41 -DBSD43 -DNFS
X#   tested on DECsystem 5820
X# Ultrix 2.2: -DULTRIX=22 -DNFS
X#   some testing on VAX 8800, tnx VA
X# Straight BSD 4.3-Tahoe: -DBSD43TAHOE -DBSD43
X#   some testing on VAX 11/780, tnx VA
X# Straight BSD 4.3 original: -DBSD43CLASSIC -DBSD43
X# Convex UNIX 9.0: -DCONVEX -DBSD43 -DNFS
X#   tested on Convex-C1-XP
X# ZSUnix: -DZS -DBSD43
X#   limited testing on Astronautics ZS, can't make getuser() work right
X# DYNIX with struct ofile_ext: -DDYNIX -DNFS
X#   some testing on Symmetry S81 with locally modified DYNIX 3.0.17, tnx VA
X# DYNIX without struct ofile_ext: -DDYNIXOLD
X#
X# You must have exactly one of the following defined in MACHOPTS:
X# SUNOS4, ULTRIX=nn, CONVEX, DYNIXOLD, DYNIX, ZS, BSD43TAHOE,
X# BSD43CLASSIC
X#
X# in CCOPTS: to enable old authd behavior, -DUSENETSTAT (deprecated)
X# and, believe it or not, a real configuration option: -DUSE_SYSLOG
X# -DSECURITY to enable the security behavior for pff
X# also -DGET_FIFOS if you have the /sys files option on a Sun and
X#   want to see the inode behind a FIFO
X# also -DNO_FINDINODE if you don't want pff to try executing
X#   findinode to figure out filenames (do this if you have a different
X#   program named findinode). Nothing bad will happen if findinode can't
X#   be executed; you just won't get filenames.
X#
X# invisible #ifdefs: __hp9000s800 sun386i mips sun __hpux P_DYING
X
Xdefault: load netstatuids authd pff testauthd
X
Xload: load.o kmem.o nlistlist.o avenrun.o boottime.o strerr.o
X	$(CC) $(CCOPTS) $(MACHOPTS) -o load load.o kmem.o nlistlist.o avenrun.o boottime.o strerr.o $(LIBS)
X
Xpff: pff.o proctable.o strerr.o nlistlist.o kmem.o getuser.o smem.o mmem.o getnode.o getdevicename.o mntops.o stattimeout.o virtype.o filetable.o getfcred.o printpstat.o printucred.o getpcred.o printfamily.o printprotoinet.o printrusage.o printrlimits.o getvmseg.o printfflag.o printftype.o printsocktype.o getsocket.o groupname.o username.o numeric.o portname.o revnamei.o
X	$(CC) $(CCOPTS) $(MACHOPTS) -o pff pff.o proctable.o strerr.o nlistlist.o kmem.o getuser.o smem.o mmem.o getnode.o getdevicename.o mntops.o stattimeout.o virtype.o filetable.o getfcred.o printpstat.o printucred.o getpcred.o printfamily.o printprotoinet.o printrusage.o printrlimits.o getvmseg.o printfflag.o printftype.o printsocktype.o getsocket.o groupname.o username.o numeric.o portname.o revnamei.o $(LIBS) $(GETULIBS)
X
Xauthd: authd.o auread.o netinp.o kmem.o strerr.o nlistlist.o inpcblist.o filetable.o getfcred.o username.o numeric.o
X	$(CC) $(CCOPTS) $(MACHOPTS) -o authd authd.o auread.o netinp.o kmem.o strerr.o nlistlist.o inpcblist.o filetable.o getfcred.o username.o numeric.o $(LIBS)
X
Xnetstatuids: netstatuids.o inpcblist.o kmem.o nlistlist.o filetable.o getfcred.o strerr.o authuser.o
X	$(CC) $(CCOPTS) $(MACHOPTS) -o netstatuids netstatuids.o inpcblist.o kmem.o nlistlist.o filetable.o getfcred.o strerr.o authuser.o $(LIBS)
X
Xtestauthd: testauthd.o authuser.o
X	$(CC) $(CCOPTS) $(MACHOPTS) -o testauthd testauthd.o authuser.o $(LIBS)
X
Xnetstatuids.o: netstatuids.c inpcblist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c netstatuids.c
X
Xload.o: load.c boottime.h avenrun.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c load.c
X
Xgetfcred.o: getfcred.c getfcred.h kmem.h filetable.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getfcred.c
X
Xboottime.o: boottime.c boottime.h kmem.h nlistlist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c boottime.c
X
Xstrerr.o: strerr.c strerr.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c strerr.c
X
Xavenrun.o: avenrun.c avenrun.h kmem.h nlistlist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c avenrun.c
X
Xkmem.o: kmem.c kmem.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c kmem.c
X
Xsmem.o: smem.c smem.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c smem.c
X
Xmmem.o: mmem.c mmem.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c mmem.c
X
Xnlistlist.o: nlistlist.c nlistlist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c nlistlist.c
X
Xproctable.o: proctable.c proctable.h kmem.h nlistlist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c proctable.c
X
Xfiletable.o: filetable.c filetable.h kmem.h nlistlist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c filetable.c
X
Xinpcblist.o: inpcblist.c inpcblist.h kmem.h nlistlist.h
X	$(CC) $(CCOPTS) $(MACHOPTS) -c inpcblist.c
X
Xgetuser.o: getuser.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getuser.c
X
Xnetinp.o: netinp.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c netinp.c
X
Xauthd.o: authd.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c authd.c
X
Xauread.o: auread.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c auread.c
X
Xgetnode.o: getnode.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getnode.c
X
Xvirtype.o: virtype.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c virtype.c
X
Xstattimeout.o: stattimeout.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c stattimeout.c
X
Xgetdevicename.o: getdevicename.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getdevicename.c
X
Xmntops.o: mntops.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c mntops.c
X
Xpff.o: pff.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c pff.c
X
Xgetpcred.o: getpcred.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getpcred.c
X
Xgetvmseg.o: getvmseg.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getvmseg.c
X
Xprintpstat.o: printpstat.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printpstat.c
X
Xprintucred.o: printucred.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printucred.c
X
Xprintfamily.o: printfamily.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printfamily.c
X
Xprintprotoinet.o: printprotoinet.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printprotoinet.c
X
Xprintrlimits.o: printrlimits.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printrlimits.c
X
Xprintftype.o: printftype.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printftype.c
X
Xprintrusage.o: printrusage.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printrusage.c
X
Xprintfflag.o: printfflag.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printfflag.c
X
Xprintsocktype.o: printsocktype.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c printsocktype.c
X
Xgetsocket.o: getsocket.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c getsocket.c
X
Xgroupname.o: groupname.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c groupname.c
X
Xnumeric.o: numeric.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c numeric.c
X
Xusername.o: username.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c username.c
X
Xportname.o: portname.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c portname.c
X
Xrevnamei.o: revnamei.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c revnamei.c
X
Xauthuser.o: authuser.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c authuser.c
X
Xtestauthd.o: testauthd.c
X	$(CC) $(CCOPTS) $(MACHOPTS) -c testauthd.c
X
Xinstall:
X	@echo 'Run the INSTALL shell script from a root shell.'
X
Xtests:
X	@echo 'No tests currently implemented except testauthd. Running...'
X	./testauthd
X
Xclean:
X	rm *.o pff load authd netstatuids testauthd
X
Xshar:
X	shar `cat FILES` > kstuff.shar
X	chmod 400 kstuff.shar
END_OF_FILE
if test 6717 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'pff.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'pff.doc'\"
else
echo shar: Extracting \"'pff.doc'\" \(7153 characters\)
sed "s/^X//" >'pff.doc' <<'END_OF_FILE'
Xpff (process-file-file, with emphasis on the ff) shows running processes
Xand their open files.
X
XExamples are worth a million words, so here's a sampling of how I've
Xused pff (updated to reflect the latest option set). -swhatever can be
Xabbreviated as -sw.
X
Xpff -asfull > ~/log
X		Full report on everything pff can see. Useful when the
X		system is dying and you want to know what's going on.
Xpff -astiny	One line per process that has anything open, with each
X		open file noted but not explained.
Xpff #221 #17484	All files those processes have open. (# is redundant.)
Xpff -aspids	All active pids. (This isn't as fast as it could be.)
Xpff -a | more   All open files, in my favorite format.
Xpff /etc/passwd Who's snooping?
Xpff /etc/telnetd.old	
X		Who's running the telnetd.old program? (Useful after
X		you've installed a new telnetd and want to make sure
X		nobody's using the old one. Might not work on Sun 4s,
X		where processes don't have their programs open except
X		possibly as mmaps.)
Xpff -d/nfs.vlsi1
X		Who's keeping that filesystem busy? (-d is redundant.)
X		If this doesn't show anything, and the filesystem in
X		question doesn't contain another mounted filesystem,
X		then you should always be able to unmount it.
Xpff -f/usr/dead Who's in that directory? (-f redundant.)
Xpff -stiny /acf5.h
X		Short report on who's using my filesystem.
Xpff /dev/ttyp7  All open files---including cttys---giving access to my tty.
Xpff -sbrief -ujoe
X		All files open by user joe. (This does not show
X		files *opened* by user joe, or files *owned* by user
X		joe, or processes with a different effective uid, though
X		I suppose pff could be adapted to handle those cases.)
X		You can use uids, like pff -u195.
Xpff -slong /tmp/. /tmp/*
X		How are people using /tmp? (Somewhat detailed report.)
Xpff -i0		Who's using the Internet?
Xpff -ismtp	Who has the SMTP port open? (Compare to fstat.) You can
X		use numeric port ids, like pff -i25.
Xpff -sbrief `pff -spids ./data`
X		All files open by all processes accessing ./data.
Xpff -snames	All files open, with pathnames. (Only works if you have
X		findinode installed.)
X
XAlthough pff can handle any number of options at once---e.g., ``show me
Xevery open file on /acf5.h, or on /usr, or on Internet port 25, not to
Xmention /dev/null''---I rarely want to see a combined view.
X
XAnd now, the options:
X
X-u uid  tells pff to show all processes running with a given effective uid.
X-p pid  tells pff to show the processes with that pid.
X
XIf pff is not given any -u or -p options, it shows all processes. (This
Xdoesn't mean it will actually print anything, since by default it only
Xshows open files, which are controlled by the following options.)
X
XNote that pff can be compiled with a security option (-DSECURITY) which
Xcurrently restricts the report to processes with the same real uid as
Xthe invoker of pff. This restriction is not applied if the real uid is
Xroot or if pff is not setgid. (If you only want to see root processes as
Xroot, use -x.)
X
X-f foo  tells pff to show every open file referring to file foo.
X        Note that all devices with the same remote device are
X	considered to be the same file, even when they are not.
X-d fs   tells pff to show every open file on the given filesystem.
X-i port tells pff to show every inet connection to the given local port.
X	Port 0 refers to all inet connections.
X
X-a      tells pff to show all open files for the selected processes.
X	This option is automatically turned on under -p and -u.
X	It is ignored under -f, -d, and -i. In other words, the only
X	time it makes a difference is when you have no other options
X	(except maybe -s), and I hate having a program spew mounds of
X	garbage at me just because I forgot to specify which particular
X	mound to spew.
X
X-s style tells pff to use a particular output style. Only the first
X	letter of the style matters. Style brief is close to fstat and
X	the Abell ofiles; style uidlong includes file flags, offset,
X	credentials, etc., and style long prints users by name if possible.
X	Style default, in the middle, is my favorite. Style full has the
X	most information (including per-process information) but is
X	relatively unstructured. Style tiny is close to the Dupuy ofiles.
X	Style pids prints pids only. Style names includes filenames.
X	-shelp shows all styles available; -sHelp shows all styles
X	available and gives descriptions.
X
XAny further arguments are interpreted as follows: any that start with /
Xor . are taken to be files; any that start with # are taken to be pids;
Xany that are entirely numeric are taken to be pids; and the rest are
Xtaken to be files. ``Files'' means -f *and* -d here; ``pids'' means -p.
X
X
XNotes on #ifdefs (possibly out of date):
X
XSTAT_TIMEOUT in mntops.c, fine.
X*_H in *.h to handle repeated inclusion.
X
XIPPROTO_* in printprotoinet.c to handle different IP protocol support.
XRLIMIT_* in printrlimits.c to handle different rlimit support.
XDTYPE_* in printftype.c to handle different descriptor type support.
XAF_* in printfamily.c to handle different address family support.
XS* in printpstat.c to handle different process status support.
X
XUTMP_FILE used in load.c. Hmm.
XSIDL used for a bit of SIDL-specific stuff in pff.c. Hmm.
XS_IFIFO enables some FIFO-specific stuff in various files. Hmm.
X
XREMOTESIZE, NETSTAT* in netinp.c for various internal purposes. Ungood.
XNOSTAT_* in getmnt.c for various internal purposes. Ungood.
X
XFILE, IPPROTO_TCP, FHLOCAL, MSIZE, MNTMAXSTR, NFS_RETRIES, SOCK_STREAM,
XRTF_UP, SS_ISCONNECTED, RLIM_NLIMITS, bool_t: wrappers around #include
Xfiles. It is disgusting that any of these are necessary.
X
X
XTODO:
X
XDO ERROR CHECKING! pff.c, getnode.c, and getvmseg.c are ridiculously
Xfragile.
X
XMove printbuf and printsbuf into getnode.c and getsocket.c...
X
Xsecurity: what about reporting on files owned by user?
X
Xgive better reports on pipes on Ultrix? other file types?
X
Xfix up include files in Makefile! aargh, should've used mick
X
XAllow more socket selection options?
X
XAutomatically put in names when they're known from multiple -f?
X
XMake sure all characters are printable? Option? Don't print sock name?
X
X:port arg? nah
X
Xdeal with mount points to catch non-unmountable /usr/spool because
X/usr/spool/mail is mounted? nah
X
Xput back numeric styles as undocumented/deprecated? nah
X
Xdo something about scandev slowness? cache info?
X
Xdo something about stat'ing downed filesystems? cache info?
X
Xcache usernames, portnames, etc.?
X
X
X
XSome notes on typical execution profile on a Sun:
X
X57% of the time is in read(), most of that from kmemcpy(), an
Xobnoxiously large amount from Sun's kvm library. Of the kmemcpys, 40%
Xare from getsocket, 40% are from getvmseg, 15% are from getnode, and 5%
Xare from getpcred.
X
X18% goes to stat()s from scandev(). Hmmm. There are 243 entries in /dev,
Xbut only 38 unique devices in the pf output, and only 7 of those are
Xanything but pseudo-ttys. (On another machine, there are 800 entries in
X/dev. Ugh!)
X
X11% of the time is in _doprnt(). It would be worthwhile to replace all
Xprintf's in pff.c with calls to a simpler string/number format package.
Xstdio and printf really are too complex for typical output programs.
X
X7% goes to nlist(), half of that from Sun's kvm library.
END_OF_FILE
if test 7153 -ne `wc -c <'pff.doc'`; then
    echo shar: \"'pff.doc'\" unpacked with wrong size!
fi
# end of 'pff.doc'
fi
if test -f 'rfc931' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'rfc931'\"
else
echo shar: Extracting \"'rfc931'\" \(9196 characters\)
sed "s/^X//" >'rfc931' <<'END_OF_FILE'
X
X
X
X
X
X---------
X
X
X< INC-PROJECT, AUTH-RFC-VER-2.NLS.5, >, 7-Jan-85 17:18-PST JBP
X;;;;
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
XStJohns                                                         [Page 0]
X
X
XNetwork Working Group                                       Mike StJohns
XRequest for Comments: 931                                           TPSC
XSupersedes: RFC 912                                         January 1985
X
X                         Authentication Server
X
X
XSTATUS OF THIS MEMO
X
X   This RFC suggests a proposed protocol for the ARPA-Internet
X   community, and requests discussion and suggestions for improvements.
X   This is the second draft of this proposal (superseding RFC 912) and
X   incorporates a more formal description of the syntax for the request
X   and response dialog, as well as a change to specify the type of user
X   identification returned.  Distribution of this memo is unlimited.
X
XINTRODUCTION
X
X   The Authentication Server Protocol provides a means to determine the
X   identity of a user of a particular TCP connection.  Given a TCP port
X   number pair, it returns a character string which identifies the owner
X   of that connection on the server's system.  Suggested uses include
X   automatic identification and verification of a user during an FTP
X   session, additional verification of a TAC dial up user, and access
X   verification for a generalized network file server.
X
XOVERVIEW
X
X   This is a connection based application on TCP.  A server listens for
X   TCP connections on TCP port 113 (decimal).  Once a connection is
X   established, the server reads one line of data which specifies the
X   connection of interest.  If it exists, the system dependent user
X   identifier of the connection of interest is sent out the connection.
X   The service closes the connection after sending the user identifier.
X
XRESTRICTIONS
X
X   Queries are permitted only for fully specified connections. The
X   local/foreign host pair used to fully specify the connection are
X   taken from the query connection.  This means a user on Host A may
X   only query the server on Host B about connections between A and B.
X
X
X
X
X
X
X
X
X
X
X
X
XStJohns                                                         [Page 1]
X
X
XRFC 931                                                     January 1985
XAuthentication Server
X
X
XQUERY/RESPONSE FORMAT
X
X   The server accepts simple text query requests of the form
X
X      <local-port>, <foreign-port>
X
X   where <local-port> is the TCP port (decimal) on the target (server)
X   system, and <foreign-port> is the TCP port (decimal) on the source
X   (user) system.
X
X      For example:
X
X         23, 6191
X
X   The response is of the form
X
X      <local-port>, <foreign-port> : <response-type> : <additional-info>
X
X   where <local-port>,<foreign-port> are the same pair as the query,
X   <response-type> is a keyword identifying the type of response, and
X   <additional info> is context dependent.
X
X      For example:
X
X         23, 6191 : USERID : MULTICS : StJohns.DODCSC.a
X         23, 6193 : USERID : TAC : MCSJ-MITMUL
X         23, 6195 : ERROR : NO-USER
X
XRESPONSE TYPES
X
X   A response can be one of two types:
X
X   USERID
X
X      In this case, <additional-info> is a string consisting of an
X      operating system name, followed by a ":", followed by user
X      identification string in a format peculiar to the operating system
X      indicated.  Permitted operating system names are specified in
X      RFC-923, "Assigned Numbers" or its successors.  The only other
X      names permitted are "TAC" to specify a BBN Terminal Access
X      Controller, and "OTHER" to specify any other operating system not
X      yet registered with the NIC.
X
X
X
X
X
X
X
XStJohns                                                         [Page 2]
X
X
XRFC 931                                                     January 1985
XAuthentication Server
X
X
X   ERROR
X
X      For some reason the owner of <TCP-port> could not be determined,
X      <additional-info> tells why.  The following are suggested values
X      of <additional-info> and their meanings.
X
X      INVALID-PORT
X
X         Either the local or foreign port was improperly specified.
X
X      NO-USER
X
X         The connection specified by the port pair is not currently in
X         use.
X
X      UNKNOWN-ERROR
X
X         Can't determine connection owner; reason unknown.  Other values
X         may be specified as necessary.
X
XCAVEATS
X
X   Unfortunately, the trustworthiness of the various host systems that
X   might implement an authentication server will vary quite a bit.  It
X   is up to the various applications that will use the server to
X   determine the amount of trust they will place in the returned
X   information.  It may be appropriate in some cases restrict the use of
X   the server to within a locally controlled subnet.
X
XAPPLICATIONS
X
X   1) Automatic user authentication for FTP
X
X      A user-FTP may send a USER command with no argument to the
X      server-FTP to request automatic authentication.  The server-FTP
X      will reply with a 230 (user logged in) if it can use the
X      authentication.  It will reply with a 530 (not logged in) if it
X      cannot authenticate the user.  It will reply with a 500 or 501
X      (syntax or parameter problem) if it does not implement automatic
X      authentication.  Please note that no change is needed to currently
X      implemented servers to handle the request for authentication; they
X      will reject it normally as a parameter problem.  This is a
X      suggested implementation for experimental use only.
X
X   2) Verification for privileged network operations.  For example,
X   having the server start or stop special purpose servers.
X
X
X
XStJohns                                                         [Page 3]
X
X
XRFC 931                                                     January 1985
XAuthentication Server
X
X
X   3) Elimination of "double login" for TAC and other TELNET users.
X
X      This will be implemented as a TELNET option.
X
XFORMAL SYNTAX
X
X   <request>     ::= <port-pair> <CR> <LF>
X
X   <port-pair>   ::= <integer-number> "," <integer-number>
X
X   <reply>       ::= <reply-text> <CR> <LF>
X
X   <reply-text>  ::= <error-reply> | <auth-reply>
X
X   <error-reply> ::= <port-pair> ":" ERROR ":" <error-type>
X
X   <auth-reply>  ::= <port-pair> ":" USERID ":" <opsys> ":" <user-id>
X
X   <error-type>  ::= INVALID-PORT | NO-USER | UNKNOWN-ERROR
X
X   <opsys>       ::= TAC | OTHER | MULTICS | UNIX ...etc.
X                     (See "Assigned Numbers")
X
X   Notes on Syntax:
X
X      1)  White space (blanks and tab characters) between tokens is not
X      important and may be ignored.
X
X      2)  White space, the token separator character (":"), and the port
X      pair separator character (",") must be quoted if used within a
X      token.  The quote character is a back-slash, ASCII 92 (decimal)
X      ("\").  For example, a quoted colon is "\:".  The back-slash must
X      also be quoted if its needed to represent itself ("\\").
X
XNotes on User Identification Format:
X
X   The user identifier returned by the server should be the standard one
X   for the system.  For example, the standard Multics identifier
X   consists of a PERSONID followed by a ".", followed by a PROJECTID,
X   followed by a ".", followed by an INSTANCE TAG of one character.  An
X   instance tag of "a" identifies an interactive user, and instance tag
X   of "m" identifies an absentee job (batch job) user, and an instance
X   tag of "z" identifies a daemon (background) user.
X
X   Each set of operating system users must come to a consensus as to
X
X
X
X
XStJohns                                                         [Page 4]
X
X
XRFC 931                                                     January 1985
XAuthentication Server
X
X
X   what the OFFICIAL user identification for their systems will be.
X   Until they register this information, they must use the "OTHER" tag
X   to specify their user identification.
X
XNotes on User Identification Translation:
X
X   Once you have a user identifier from a remote system, you must then
X   have a way of translating it into an identifier that meaningful on
X   the local system.  The following is a sketchy outline of table driven
X   scheme for doing this.
X
X   The table consists of four columns, the first three are used to match
X   against, the fourth is the result.
X
X      USERID              Opsys     Address     Result
X      MCSJ-MITMUL         TAC       26.*.*.*    StJohns
X      *                   MULTICS   192.5.42.*  =
X      *                   OTHER     10.0.0.42   anonymous
X      MSJ                 ITS       10.3.0.44   StJohns
X
X   The above table is a sample one for a Multics system on MILNET at the
X   Pentagon.  When an authentication is returned, the particular
X   application using the userid simply looks for the first match in the
X   table.  Notice the second line.  It says that any authentication
X   coming from a Multics system on Net 192.5.42 is accepted in the same
X   format.
X
X   Obviously, various users will have to be registered to use this
X   facility, but the registration can be done at the same time the use
X   receives his login identity from the system.
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
XStJohns                                                         [Page 5]
END_OF_FILE
if test 9196 -ne `wc -c <'rfc931'`; then
    echo shar: \"'rfc931'\" unpacked with wrong size!
fi
# end of 'rfc931'
fi
echo shar: End of archive 5 \(of 6\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 6 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0



More information about the Alt.sources mailing list