 Last update:  03/17/95   INTRODUCTIONK    Welcome to JOBLOG, a terminal session logging facility.  JOBLOG is based M on the popular program PHOTO, written by Asbed Bedrossian at USC.  Basically, J JOBLOG does what PHOTO does, provides some additional options for "secure"H log files (untouched by the user), and fixes some bugs that caused VT220. terminals to hang under certain circumstances.  H    PHOTO is Copyright 1986 by Asbed Bedrossian at University of Southern California.    DISTRIBUTIONK    Feel free to redistribute JOBLOG.  I don't mind as long as the copyright K notice (COPYRIGHT) stays with it and you don't claim you wrote it or try to  make money from it.    REQUIREMENTSM    This version of JOBLOG (1.5) works with the FT pseudo-terminal driver that K shipped with VMS 5.4.  If you're running a version of VMS that doesn't have J the FT driver and you would like to use JOBLOG, get version 1.3.  You willM also need the TW/PY pseudo-terminal driver.  Both are available from a number I of anonymous FTP sites around the net, DECUS tapes, or neighbors.  If you 6 can't find them, e-mail me and I'll see what I can do.  H NOTE:  If you're using VAX C you might need to change the definition forF LINKOPTIONS in the DESCRIP.MMS file or the line in BUILD.COM where theK link is done.  Both DESCRIP.MMS and BUILD.COM contain information necessary ( to make the change.  It's pretty simple.  K    PHOTO mode is available so that JOBLOG can be built so that it functions J exactly like PHOTO.  This is for users who don't want to go through all ofI the steps necessary to have secure log files.  Log files are written to a 0 file called JOBLOG.LOG in the current directory.  E    NOTE:  the default is for JOBLOG to be built for secure log files.   %    Requirements for secure log files:   ? 	- two system directories to hold 1) temporary log files and 2) $ 	  log files waiting to be retrievedB 	- two system-wide logical names pointing to the above directories> 	- adding the JOBLOG help file to the system-wide help library? 	- INSTALLation of JOBLOG.EXE with SYSPRV and CMKRNL privileges @ 	- an entry in a daily batch job to run JOBLOG so that recipient= 	  and senders of log files are notified of pending log files   	  and old log files are deleted  A    If you wish to use PHOTO mode, go to the INSTALLATION section.   H    In case anyone is interested this version was developed and tested onI OpenVMS 6.1 on both an Alpha 7620 and a VAX 6620.  It builds cleanly both  with VAX C and DEC C.    DESCRIPTION K    In order to understand the above requirements, let's look at the life of $ a secure log file created by JOBLOG.  A 	1. User runs JOBLOG.  The log file is created in the system dir- C 	   ectory pointed to by the JOBLOG$LOG logical.  This directory is = 	   protected RWED,,, so the user is never able to modify it.   C 	2. During the session, the user has the option of toggling logging C 	   on/off.  If logging is turned OFF, the log file immediately be- D 	   comes UNVERIFIED, signifying that it is not a true record of the 	   login session.  8 	3. After the user terminates the session, the user can:   	   a) print the log file   @ 	      The log file is printed directly from the JOBLOG$LOG dir-B 	      ectory with a job name that reflects whether it is VERIFIED> 	      or UNVERIFIED.  The log file is deleted after printing.   	   b) delete the log file  @ 	      The log file is deleted directly from the JOBLOG$LOG dir- 	      ectory.   	   c) save the log file  ? 	      The log file is copied to the file specified by the user 1 	      and deleted from the JOBLOG$LOG directory.   3 	   d) mail notification of the log file to someone   @ 	      The log file is move from the JOBLOG$LOG directory to theB 	      staging directory pointed to by the JOBLOG$STAGE directory.B 	      The log file will stay here until 1) it is picked up by the@ 	      recipient using the /RETRIEVE qualifier to JOBLOG, 2) de-A 	      leted by the sender using the /DELETE qualifier, or 3) de- E 	      leted automatically from a batch job using the /SKIM qualifer.   B 	      The batch job should run JOBLOG/SKIM/WAIT=n/WARN=m once perA 	      day to keep the staging directory cleaned out.  The sender B 	      and the recipient will be warned via e-mail that there is aA 	      log file that hasn't been picked up after m days.  The log B 	      file will be deleted from the staging area after n days and6 	      both the sender and the recipient are notified.  K    All four of the choices in #3, as well as a number of other options, can L be specified on the command line at startup.  If disposition of the log fileK isn't specified on the command line, the user will be prompted for it.  See # the help file for more information.   # A FEW WORDS ABOUT MAILING LOG FILES M    The first question is why aren't log files simply mailed to the recipient? K The main reason is to give users an opportunity to delete log files if they G want.  This would be impossible to do if the log files were actually in  the recipient's mail file.  K    JOBLOG is setup so that only accounts that have a certain identifier can G receive mailed logfiles.  The identifiers here that allow an account to K receive mailed log files are FACULTY, STAFF, and JOBLOG_RECIPIENT (the last K we grant on a need basis).  Also, users cannot mail log files to themselves H (to prevent people from bypassing their disk quotas).  And since studentJ accounts here don't have any of the above identifiers, they can't mail logI files to each other.  In a student environment, these might be reasonable D restrictions.  If you want to change/delete/add identifiers, see the- valid_ids array in the valid_recip() routine.    INSTALLATIONL    1.  If you wish to build JOBLOG with PHOTO mode, do one of the following:  B 	a) If you have MMS installed on your system, edit the DESCRIP.MMS6 	   file and change the CFLAGS definition to look like  / 	   CFLAGS=/optimize=noinline/define=PHOTO_MODE   B 	b) If you don't MMS installed, edit the BUILD.COM file and change: 	   the line with the CC command for JOBLOG.C to look like  * 	   $ cc/optimize=inline/define=PHOTO_MODE      2.  Build the executable:  3 	a) If you have MMS installed on your system, enter    		$ MMS   * 	b) If you don't have MMS installed, enter  
 		$ @BUILD  B 	There are some free versions of MAKE available for VMS that might? 	work with the DESCRIP.MMS file, although I've never tried any.   M    3.  Copy JOBLOG.EXE to it's final destination.  SYS$SYSTEM is a reasonable J        location for most systems and will be used in the following exampleL        steps.  If your final destination is different, be sure to substitute)        wherever SYS$SYSTEM is used below.   4    NOTE:  Steps 3-8 are not required for PHOTO mode.  7    4.  Install JOBLOG using the INSTALL program.  Enter   
 	$ INSTALL  '        and at the INSTALL> prompt enter   P        INSTALL> ADD SYS$SYSTEM:JOBLOG.EXE/OPEN/HEADER/SHARE/PRIV=(SYSPRV,CMKRNL)  P        Arrange for JOBLOG to be INSTALLed at system boot time by adding the line4        from step #3 to the appropriate startup file.  I    5.  Add a symbol definition to SYS$SYSTEM:SYLOGIN.COM for JOBLOG.  For         example,    	$ JOBLOG :== $JOBLOG   L        would work if JOBLOG is installed in SYS$SYSTEM.  If it isn't, you'll/        have to use the full file specification.   J    6.  Add the help file to the system help library.  To do this, you mustM        have exclusive access to SYS$HELP:HELPLIB.HLB.  An ideal time would be I        when you have the machine to yourself and logins are disabled.  If J        you're installing JOBLOG for the first time, the command for adding        the help library is  6 	$ LIBRARY/HELP/INSERT SYS$HELP:HELPLIB.HLB JOBLOG.HLP  M        If JOBLOG's help file already exists in your help library, the command         would be   7 	$ LIBRARY/HELP/REPLACE SYS$HELP:HELPLIB.HLB JOBLOG.HLP   9        If you don't have the system to yourself, you can:   L           1) Protect SYS$HELP:HELPLIB.HLB so that no one can access it, waitF 	     until everyone is done using it, insert the help file, and resetA 	     the protection back to what it was when you started.  A few C 	     people might get protection failures when running HELP but it ' 	     beats shutting down your machine.    D 	  2) Copy SYS$HELP:HELPLIB.HLB to your own area, do the update, andC 	     copy it back to SYS$HELPLIB.HLB;n+1.  Make sure the file pro- @ 	     tection is correct and verify that the new help library is9 	     correct.  Purge the file later at your convenience.   6    7.  Create the two directories required for JOBLOG:  E 	- a directory where log files live while the user is running JOBLOG; @ 	  after a user exits JOBLOG, their log file will be 1) moved toC 	  another location (the user's area or the staging area) or 2) de- / 	  leted, either by the user or after printing.   $ 	  Example:  SYS$SYSTEM:[JOBLOG_LOG]  E 	- a "staging" directory where log files live waiting to be picked up * 	  by the recipient specified by the user.  & 	  Example:  SYS$SYSTEM:[JOBLOG_STAGE]  ?        IMPORTANT:  Both directories should be protected RWED,,,   G    8.  Create two system-wide logical names pointing to the directories 1        created in step #6.  The logical names are    	JOBLOG$LOG 
 	JOBLOG$STAGE           Define them as follows:  H 	$ DEFINE/SYSTEM/EXEC/TRANS=CONCEALED JOBLOG$LOG SYS$SYSTEM:[JOBLOG_LOG]L 	$ DEFINE/SYSTEM/EXEC/TRANS=CONCEALED JOBLOG$STAGE SYS$SYSTEM:[JOBLOG_STAGE]  M        Arrange for these logicals to be defined at system boot time by adding =        the above definitions to the appropriate startup file.   K    9.  Add an entry into a batch job that runs once per day that will check H        the staging directory for old log files and notify the sender and2        recipient that they haven't been picked up.  ' 	Example:  $ JOBLOG/SKIM/WAIT=10/WARN=7   L    That should do it.  Try running it and see if it works.  If you have pro-L blems building/installing JOBLOG, feel free to call me or send me e-mail andJ let me know how I blew it.  I'll do what I can to make sure that it can be installed at your site.    HACKING ON THE CODE L    Since the source is distributed, feel free to hack on the code.  There isM nothing very complicated in JOBLOG; the code itself is pretty straightforward M (at least I think so! :^).  If you find a bug, you can either 1) fix it your- N self, contact me, and send me the fix, or 2) let me know about it and I'll see= what I can do.  I'll be sending out patches when appropriate.   
 CONCLUSIONG    I put a lot of work into JOBLOG and I would appreciate any comments/ H suggestions/flames that you might have.  If you get it up and running, IK would appreciate it if you would either send me e-mail or phone me, letting B me know that you installed it and what your thoughts are about it. --F Leonard J. Peirce               Internet:  peirce@mickey.acs.wmich.edu; Western Michigan University                peirce@wmich.edu  University Computing Services 9 Kalamazoo, MI  49008            Voice:     (616) 387-5469 