Last update: 06/08/92 INTRODUCTION Welcome to JOBLOG, a terminal session logging facility. JOBLOG is based on the popular program PHOTO, written by Asbed Bedrossian at USC. Basically, JOBLOG does what PHOTO does, provides some additional options for "secure" log files (untouched by the user), and fixes a bug that caused VT220 terminals to hang. PHOTO is Copyright 1986 by Asbed Bedrossian at University of Southern California. DISTRIBUTION Feel free to redistribute JOBLOG. I don't mind as long as the copyright notice (COPYRIGHT) stays with it and you don't claim you wrote it or try to make money from it. REQUIREMENTS This version of JOBLOG (1.4) works with the FT pseudo-terminal driver that shipped with VMS 5.4. If you're running a version of VMS that doesn't have the FT driver and you would like to use JOBLOG, get version 1.3. You will also need the TW/PY pseudo-terminal driver. Both are available from a number of anonymous FTP sites around the net, DECUS tapes, or neighbors. If you can't find them, e-mail me and I'll send them to you. PHOTO mode is available so that JOBLOG can be built so that it functions exactly like PHOTO. This is for users who don't want to go through all of the steps necessary to have secure log files. Log files are written to a file called JOBLOG.LOG in the current directory. 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 retrieved - 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 If you wish to use PHOTO mode, go to the INSTALLATION section. DESCRIPTION In order to understand the above requirements, let's look at the life of a secure log file created by JOBLOG. 1. User runs JOBLOG. The log file is created in the system dir- ectory pointed to by the JOBLOG$LOG logical. This directory is protected RWED,,, so the user is never able to modify it. 2. During the session, the user has the option of toggling logging on/off. If logging is turned OFF, the log file immediately be- comes UNVERIFIED, signifying that it is not a true record of the login session. 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- 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 and deleted from the JOBLOG$LOG directory. d) mail notification of the log file to someone The log file is move from the JOBLOG$LOG directory to the staging directory pointed to by the JOBLOG$STAGE directory. The log file will stay here until 1) it is picked up by the recipient using the /RETRIEVE qualifier to JOBLOG, 2) de- leted by the sender using the /DELETE qualifier, or 3) de- leted automatically from a batch job using the /SKIM qualifer. The batch job should run JOBLOG/SKIM/WAIT=n/WARN=m once per day to keep the staging directory cleaned out. The sender and the recipient will be warned via e-mail that there is a log file that hasn't been picked up after m days. The log file will be deleted from the staging area after n days and both the sender and the recipient are notified. All four of the choices in #3, as well as a number of other options, can be specified on the command line at startup. If disposition of the log file 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 The first question is why aren't log files simply mailed to the recipient? The main reason is to give users an opportunity to delete log files if they want. This would be impossible to do if the log files were actually in the recipient's mail file. JOBLOG is setup so that only accounts that have a certain identifier can receive mailed logfiles. The identifiers here that allow an account to receive mailed log files are FACULTY, STAFF, and JOBLOG_RECIPIENT (the last we grant on a need basis). Also, users cannot mail log files to themselves (to prevent people from bypassing their disk quotas). And since student accounts here don't have any of the above identifiers, they can't mail log files to each other. In a student environment, these might be reasonable restrictions. If you want to change/delete/add identifiers, see the valid_ids array in the valid_recip() routine. INSTALLATION 1. If you wish to build JOBLOG with PHOTO mode, do one of the following: a) If you have MMS installed on your system, edit the DESCRIP.MMS file and change the CFLAGS definition to look like CFLAGS=/optimize=noinline/define=PHOTO_MODE 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: a) If you have MMS installed on your system, enter $ MMS b) If you don't have MMS installed, enter $ @BUILD There are some free versions of MAKE available for VMS that might work with the DESCRIP.MMS file, although I've never tried any. 3. Copy JOBLOG.EXE to it's final destination. SYS$SYSTEM is a reasonable location for most systems and will be used in the following example steps. If your final destination is different, be sure to substitute wherever SYS$SYSTEM is used below. NOTE: Steps 3-8 are not required for PHOTO mode. 4. Install JOBLOG using the INSTALL program. Enter $ INSTALL and at the INSTALL> prompt enter INSTALL> ADD SYS$SYSTEM:JOBLOG.EXE/OPEN/HEADER/SHARE/PRIV=(SYSPRV,CMKRNL) Arrange for JOBLOG to be INSTALLed at system boot time by adding the line from step #3 to the appropriate startup file. 5. Add a symbol definition to SYS$SYSTEM:SYLOGIN.COM for JOBLOG. For example, $ JOBLOG :== $JOBLOG would work if JOBLOG is installed in SYS$SYSTEM. If it isn't, you'll have to use the full file specification. 6. Add the help file to the system help library. To do this, you must have exclusive access to SYS$HELP:HELPLIB.HLB. An ideal time would be when you have the machine to yourself and logins are disabled. If you're installing JOBLOG for the first time, the command for adding the help library is $ LIBRARY/HELP/INSERT SYS$HELP:HELPLIB.HLB JOBLOG.HLP If JOBLOG's help file already exists in your help library, the command would be $ LIBRARY/HELP/REPLACE SYS$HELP:HELPLIB.HLB JOBLOG.HLP If you don't have the system to yourself, you can: 1) Protect SYS$HELP:HELPLIB.HLB so that no one can access it, wait until everyone is done using it, insert the help file, and reset the protection back to what it was when you started. A few people might get protection failures when running HELP but it beats shutting down your machine. 2) Copy SYS$HELP:HELPLIB.HLB to your own area, do the update, and copy it back to SYS$HELPLIB.HLB;n+1. Make sure the file pro- tection is correct and verify that the new help library is correct. Purge the file later at your convenience. 7. Create the two directories required for JOBLOG: - a directory where log files live while the user is running JOBLOG; after a user exits JOBLOG, their log file will be 1) moved to 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] - 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,,, 8. Create two system-wide logical names pointing to the directories created in step #6. The logical names are JOBLOG$LOG JOBLOG$STAGE Define them as follows: $ DEFINE/SYSTEM/EXEC/TRANS=CONCEALED JOBLOG$LOG SYS$SYSTEM:[JOBLOG_LOG] $ DEFINE/SYSTEM/EXEC/TRANS=CONCEALED JOBLOG$STAGE SYS$SYSTEM:[JOBLOG_STAGE] Arrange for these logicals to be defined at system boot time by adding the above definitions to the appropriate startup file. 9. Add an entry into a batch job that runs once per day that will check the staging directory for old log files and notify the sender and recipient that they haven't been picked up. Example: $ JOBLOG/SKIM/WAIT=10/WARN=7 That should do it. Try running it and see if it works. If you have pro- blems building/installing JOBLOG, feel free to call me or send me e-mail and 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 Since the source is distributed, feel free to hack on the code. There is nothing very complicated in JOBLOG; the code itself is pretty straightforward (at least I think so! :^). If you find a bug, you can either 1) fix it your- 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. A NOTE ABOUT VMS 5.4 VMS 5.4 includes a new PTY driver, FTDRIVER, that will replace the TW/PY drivers. Once we get 5.4 installed here (which should be soon), I'll be porting JOBLOG to work with the new device driver. Thus, there will be two versions but each will contain the same features. The only differences will be the interaction with the respective PTY driver. Once the port is com- plete, I'll post the new version. CONCLUSION I put a lot of work into JOBLOG and I would appreciate any comments/ suggestions/flames that you might have. If you get it up and running, I would appreciate it if you would either send me e-mail or phone me, letting me know that you installed it and what your thoughts are about it. -- Leonard Peirce Internet: peirce@gumby.cc.wmich.edu Western Michigan University peirce@gw.wmich.edu Academic Computing Services UUCP: ...!uunet!sharkey!wmichgw!peirce Kalamazoo, MI 49008 Voice: (616) 387-5469