Google
 

Trailing-Edge - PDP-10 Archives - bb-l014w-bm_tops20_v7_0_atpch_23 - autopatch/acjsym.mac
There are 9 other files named acjsym.mac in the archive. Click here to see a list.
;RIP:<7.UTILITIES>ACJSYM.MAC.322 14-Jul-89 11:56:04, Edit by GSCOTT
;(131) Allow attach of not-logged-in jobs for FTPSRT.
;RIP:<7.UTILITIES>ACJSYM.MAC.321 25-May-89 15:39:44, Edit by GSCOTT
;(130) Edit 127 forgot about the case that the user is not enabled.
;RIP:<7.UTILITIES>ACJSYM.MAC.320 23-May-89 20:37:35, Edit by GSCOTT
;(127) Fix unkillable directories, RCDIR in GOCRDT kept directory cached.
;RIP:<7.UTILITIES>ACJSYM.MAC.319  8-Apr-89 14:31:14, Edit by GSCOTT
;(126) Add GETOK functions .GOGTD and .GOSTD.
;RIP:<7.UTILITIES>ACJSYM.MAC.318  4-Apr-89 16:00:39, Edit by GSCOTT
;(125) Sweep log file cache at time that system is going to be shutdown.
;RIP:<7.UTILITIES>ACJSYM.MAC.317 30-Mar-89 12:00:33, Edit by GSCOTT
;(124) Substitute "*" in log file name for the current time.
;RIP:<7.UTILITIES>ACJSYM.MAC.316 30-Mar-89 10:57:50, Edit by GSCOTT
;(123) Read LSN ACCESS.CONTROL files for feeble users.
;RIP:<7.UTILITIES>ACJSYM.MAC.315 29-Mar-89 15:33:46, Edit by GSCOTT
;(122) Small log file fixes, cause entry into MDDT to sweep the log file cache.
;RIP:<7.UTILITIES>ACJSYM.MAC.311 29-Mar-89 11:52:23, Edit by GSCOTT
;(121) Check for user deletion of access.control file to flush cache.
;RIP:<7.UTILITIES>ACJSYM.MAC.309 29-Mar-89 01:43:03, Edit by GSCOTT
;(120) Write summary info to log file when closing it.
;RIP:<7.UTILITIES>ACJSYM.MAC.308 29-Mar-89 01:38:11, Edit by GSCOTT
;(117) Change default to 16 access.control cache entries of 16 pages each.
;RIP:<7.UTILITIES>ACJSYM.MAC.306 28-Mar-89 23:59:06, Edit by GSCOTT
;(116) Fix log file line counter.
;RIP:<7.UTILITIES>ACJSYM.MAC.305 28-Mar-89 22:54:21, Edit by GSCOTT
;(115) Look for filename first in cache flush of access.control files.
;RIP:<7.UTILITIES>ACJSYM.MAC.304 28-Mar-89 22:39:47, Edit by GSCOTT
;(114) Add counter for cache flushes.
;RIP:<7.UTILITIES>ACJSYM.MAC.303 28-Mar-89 10:50:41, Edit by GSCOTT
;(113) Log file cache sweep interval of zero disables the cache.
;RIP:<7.UTILITIES>ACJSYM.MAC.301 28-Mar-89 10:42:31, Edit by GSCOTT
;(112) Make the log buffer three pages.
;RIP:<7.UTILITIES>ACJSYM.MAC.300 24-Mar-89 02:13:40, Edit by GSCOTT
;(111) Implement the access control cache.
;RIP:<7.UTILITIES>ACJSYM.MAC.290 21-Mar-89 13:45:46, Edit by GSCOTT
;(110) Sweep log file cache here and there.
;RIP:<7.UTILITIES>ACJSYM.MAC.288 20-Mar-89 13:46:16, Edit by GSCOTT
;(107) Implement the log file cache.
;RIP:<7.UTILITIES>ACJSYM.MAC.286 20-Mar-89 10:46:16, Edit by GSCOTT
;(106) Bad ND definitions of arguments to GOSMN and GOHSY.
;RIP:<7.UTILITIES>ACJSYM.MAC.285  9-Feb-89 10:13:19, Edit by GSCOTT
;(105) CRDIR policy had a bug allowing building new non-files-only directories.
;RIP:<7.UTILITIES>ACJSYM.MAC.284  4-Feb-89 10:41:04, Edit by GSCOTT
;(104) Do not log on special cases of FB%SEC bit changes.
;RIP:<7.UTILITIES>ACJSYM.MAC.283  2-Feb-89 21:06:37, Edit by GSCOTT
;(103) Always allow setting of new file nosecure.
;RIP:<7.UTILITIES>ACJSYM.MAC.282  2-Feb-89 10:27:21, Edit by GSCOTT
;(102) Change a couple of strings output to the log file.
;RIP:<7.UTILITIES>ACJSYM.MAC.281  2-Feb-89 10:23:03, Edit by GSCOTT
;(101) Don't output cap mask if job 0 in LOGSTA routine.
;RIP:<7.UTILITIES>ACJSYM.MAC.280  1-Feb-89 11:39:31, Edit by GSCOTT
;(100) Bug in TAKCHK broke TAKE command lines over half the buffer size.
;RIP:<7.UTILITIES>ACJSYM.MAC.279 31-Jan-89 18:24:16, Edit by GSCOTT
;(77) Make the log files secure when writing them.
;RIP:<7.UTILITIES>ACJSYM.MAC.277, 31-Jan-89 14:29:10, Edit by RASPUZZI
;(76) Test T4 for CD%MOD before making a decision about the mode bits in CRDIRT
;RIP:<7.UTILITIES>ACJSYM.MAC.276 30-Jan-89 10:55:15, Edit by GSCOTT
;(75) Don't output bad information in spy file trailer.
;RIP:<7.UTILITIES>ACJSYM.MAC.275 30-Jan-89 10:23:11, Edit by GSCOTT
;(74) Kill all inferior forks when crashing.
;RIP:<7.UTILITIES>ACJSYM.MAC.274 30-Jan-89 10:03:02, Edit by GSCOTT
;(73) Output spy filename to log file if we can't open the spy file.
;RIP:<7.UTILITIES>ACJSYM.MAC.271 26-Jan-89 11:13:15, Edit by GSCOTT
;(72) Add NOSECURE keyword to ACCESS.CONTROL
;RIP:<7.UTILITIES>ACJSYM.MAC.270 26-Jan-89 10:06:29, Edit by GSCOTT
;(71) Add DENY-CTY and LOGIN-CTY support.
;RIP:<7.UTILITIES>ACJSYM.MAC.268 25-Jan-89 09:49:28, Edit by GSCOTT
;(70) Minor bug and a bad comment in CRDIR policy code.
;RIP:<7.UTILITIES>ACJSYM.MAC.267 24-Jan-89 17:00:49, Edit by GSCOTT
;(67) Make job information blocks, clean up attach and login policy code.
;RIP:<7.UTILITIES>ACJSYM.MAC.265 19-Jan-89 22:40:52, Edit by GSCOTT
;(66) Fill text displayed by the SHOW command.
;RIP:<7.UTILITIES>ACJSYM.MAC.264 19-Jan-89 21:21:51, Edit by GSCOTT
;(65) Fill command lines output by the WRITE command.
;RIP:<7.UTILITIES>ACJSYM.MAC.263 19-Jan-89 17:47:27, Edit by GSCOTT
;(64) Improve logging of illegal requests.
;RIP:<7.UTILITIES>ACJSYM.MAC.262 19-Jan-89 13:30:02, Edit by GSCOTT
;(63) Add support for user functions.
;RIP:<7.UTILITIES>ACJSYM.MAC.259 12-Jan-89 23:13:08, Edit by GSCOTT
;(62) Ignore increment mount counts for ACJ just to be sure.
;RIP:<7.UTILITIES>ACJSYM.MAC.257 12-Jan-89 22:44:24, Edit by GSCOTT
;(61) Log "function n" if SMON function not in table of functions.
;RIP:<7.UTILITIES>ACJSYM.MAC.256 12-Jan-89 21:59:43, Edit by GSCOTT
;(60) Remove extra definition of RSKP, use MACREL's instead.
;RIP:<7.UTILITIES>ACJSYM.MAC.251 12-Jan-89 09:42:05, Edit by GSCOTT
;(57) Add "new" short bug typeout SMON function.
;RIP:<7.UTILITIES>ACJSYM.MAC.249 10-Jan-89 10:50:34, Edit by GSCOTT
;(56) Test was backwards in GOCRDL to say "set" or "clear".
;RIP:<7.UTILITIES>ACJSYM.MAC.248  5-Jan-89 12:13:23, Edit by GSCOTT
;(55) Provide check for CRDIRs on FOREIGN structures.
;RIP:<7.UTILITIES>ACJSYM.MAC.247  4-Jan-89 14:59:04, Edit by GSCOTT
;(54) Don't allow user/directory groups or passwords on any <ROOT-DIRECTORY>.
;RIP:<7.UTILITIES>ACJSYM.MAC.244  4-Jan-89 11:09:50, Edit by GSCOTT
;(53) Asciify the GETAB tables for logging.
;RIP:<7.UTILITIES>ACJSYM.MAC.243  3-Jan-89 15:29:24, Edit by GSCOTT
;(52) Asciify the INFO% functions logged.
;RIP:<7.UTILITIES>ACJSYM.MAC.242  3-Jan-89 15:20:19, Edit by GSCOTT
;(51) Update copyright date.
;RIP:<7.UTILITIES>ACJSYM.MAC.241  3-Jan-89 15:18:39, Edit by GSCOTT
;(50) Add output in log file of number requests failed.
;RIP:<7.UTILITIES>ACJSYM.MAC.239  3-Jan-89 13:29:53, Edit by GSCOTT
;(47) Log more information for CRDIRs.
;RIP:<7.UTILITIES>ACJSYM.MAC.238 30-Dec-88 11:32:33, Edit by GSCOTT
;(46) Prevent logging into ROOT-DIRECTORY or making it non-files-only.
;RIP:<7.UTILITIES>ACJSYM.MAC.236 29-Dec-88 10:48:57, Edit by GSCOTT
;(45) Remove edit 43, instead allow any secure operation if no ACCESS.CONTROL.
;RIP:<7.UTILITIES>ACJSYM.MAC.234 28-Dec-88 14:04:19, Edit by GSCOTT
;(44) Add support for OF%NXS bit on .GOOPN function.
;RIP:<7.UTILITIES>ACJSYM.MAC.231 28-Dec-88 13:02:51, Edit by GSCOTT
;(43) Allow setting and clearing of FB%SEC if enabled and file is new.
;RIP:<7.UTILITIES>ACJSYM.MAC.230 20-Dec-88 11:42:01, Edit by GSCOTT
;(42) Enhance logging of TMON/SMON functions.
;RIP:<7.UTILITIES>ACJSYM.MAC.229 20-Dec-88 10:06:02, Edit by GSCOTT
;(41) Problem with previous edit (extra comma in BYTE 7 statement).
;RIP:<7.UTILITIES>ACJSYM.MAC.228 16-Dec-88 10:57:22, Edit by GSCOTT
;(40) Paginate the logging file.
;RIP:<7.UTILITIES>ACJSYM.MAC.227 14-Dec-88 18:50:02, Edit by GSCOTT
;(37) Add LOGIN-xxxx keywords to user profile.
;RIP:<7.UTILITIES>ACJSYM.MAC.223 14-Dec-88 17:57:14, Edit by GSCOTT
;(36) Restart ourselves if under job 0.
;RIP:<7.UTILITIES>ACJSYM.MAC.222 13-Dec-88 11:15:29, Edit by GSCOTT
;(35) Put username first in logging for easier reading.
;RIP:<7.UTILITIES>ACJSYM.MAC.221 12-Dec-88 14:04:42, Edit by GSCOTT
;(34) Add invisible bit when looking for ACCESS.CONTROL.
;RIP:<7.UTILITIES>ACJSYM.MAC.220 12-Dec-88 13:56:11, Edit by GSCOTT
;(33) Add execute bit to those typed out on secure OPENF.
;RIP:<7.UTILITIES>ACJSYM.MAC.219  7-Dec-88 15:29:08, Edit by GSCOTT
;(32) In WRITE command only send keywords that differ from default enable bits.
;RIP:<7.UTILITIES>ACJSYM.MAC.218  7-Dec-88 14:38:28, Edit by GSCOTT
;(31) DECnet policy routine can now be activated due to NO POLICY setting.
;RIP:<7.UTILITIES>ACJSYM.MAC.217  6-Dec-88 22:40:42, Edit by GSCOTT
;(30) Implement DENY-xxx keywords for functions.
;RIP:<7.UTILITIES>ACJSYM.MAC.208  6-Dec-88 20:43:24, Edit by GSCOTT
;(27) Implement ALL as keyword in ACCESS.CONTROL, clean up here and there.
;RIP:<7.UTILITIES>ACJSYM.MAC.204  6-Dec-88 19:24:57, Edit by GSCOTT
;(26) Implement SET PRIME-TIME-BEGIN and SET PRIME-TIME-END
;RIP:<7.UTILITIES>ACJSYM.MAC.203  6-Dec-88 18:01:30, Edit by GSCOTT
;(25) Check for no functions enabled in SAVE command.
;RIP:<7.UTILITIES>ACJSYM.MAC.202  6-Dec-88 10:41:51, Edit by GSCOTT
;(24) Use TIME rather than HPTIM for uptime to prevent overflows after 4 days.
;RIP:<7.UTILITIES>ACJSYM.MAC.201  3-Dec-88 02:53:25, Edit by GSCOTT
;(23) OTIME routine needs to handle times in the range of days.
;RIP:<7.UTILITIES>ACJSYM.MAC.200  1-Dec-88 11:08:36, Edit by GSCOTT
;(22) Wrong AC tested in FINDIT after call to WTBLUK.
;RIP:<7.UTILITIES>ACJSYM.MAC.199 30-Nov-88 13:35:29, Edit by GSCOTT
;(21) Don't use TEXTBU in HDRLOG routine as logging routines could be using it.
;RIP:<7.UTILITIES>ACJSYM.MAC.195 30-Nov-88 10:34:14, Edit by GSCOTT
;(20) Allow policy for GOACC to allow connections to "owned" subdirectories.
;RIP:<7.UTILITIES>ACJSYM.MAC.194 30-Nov-88 10:03:04, Edit by GSCOTT
;(17) Add POLICY keyword.
;RIP:<7.UTILITIES>ACJSYM.MAC.191 29-Nov-88 17:33:50, Edit by GSCOTT
;(16) Allow hyphen at end of line as continuation in ACCESS.CONTROL.
;RIP:<7.UTILITIES>ACJSYM.MAC.189 29-Nov-88 09:53:56, Edit by GSCOTT
;(15) Implement ACCESS.CONTROL facility for secure files.
;RIP:<7.UTILITIES>ACJSYM.MAC.187 28-Nov-88 09:44:25, Edit by GSCOTT
;(14) Ignore errors from SPRIW.
;RIP:<7.UTILITIES>ACJSYM.MAC.186 22-Nov-88 17:06:48, Edit by GSCOTT
;(13) Support wild username specifications.
;RIP:<7.UTILITIES>ACJSYM.MAC.183 22-Nov-88 11:10:06, Edit by GSCOTT
;(12) Calculation of next midnight time was flawed.  Yet more info to log file.
;RIP:<7.UTILITIES>ACJSYM.MAC.181 21-Nov-88 22:11:56, Edit by GSCOTT
;(11) Another log file bug, more info with TLINK logging.
;RIP:<7.UTILITIES>ACJSYM.MAC.179 21-Nov-88 15:37:12, Edit by GSCOTT
;(10) Allow WHEEL to login to batch under OPERATOR.
;RIP:<7.UTILITIES>ACJSYM.MAC.178 21-Nov-88 15:12:48, Edit by GSCOTT
;(7) Statistics should be sent to log file.
;RIP:<7.UTILITIES>ACJSYM.MAC.177 21-Nov-88 14:30:16, Edit by GSCOTT
;(6) Repair setting timer interrupt in midnight routine.
;RIP:<7.UTILITIES>ACJSYM.MAC.176 21-Nov-88 13:33:27, Edit by GSCOTT
;(5) Fix bug in GOLOGT where second GTDIR would fail.
;RIP:<7.UTILITIES>ACJSYM.MAC.175 20-Nov-88 22:27:39, Edit by GSCOTT
;(4) Suppress created symbol on ERSKP, support log file switch at midnight.
;RIP:<7.UTILITIES>ACJSYM.MAC.169 20-Nov-88 14:11:36, Edit by GSCOTT
;(3) Define some more flags for sending errors to log file.
;RIP:<7.UTILITIES>ACJSYM.MAC.167 20-Nov-88 12:31:51, Edit by GSCOTT
;(2) Fix problem with DISFNC, adding FU%GOK.
;RIP:<GSCOTT>ACJSYM.MAC.165 20-Nov-88 12:05:32, Edit by GSCOTT
;(1) Creation.

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1988, 1989.
;	ALL RIGHTS RESERVED.
;
;	THIS SOFTWARE IS FURNISHED UNDER A  LICENSE AND MAY BE USED AND  COPIED
;	ONLY IN  ACCORDANCE  WITH  THE  TERMS OF  SUCH  LICENSE  AND  WITH  THE
;	INCLUSION OF THE ABOVE  COPYRIGHT NOTICE.  THIS  SOFTWARE OR ANY  OTHER
;	COPIES THEREOF MAY NOT BE PROVIDED  OR OTHERWISE MADE AVAILABLE TO  ANY
;	OTHER PERSON.  NO  TITLE TO  AND OWNERSHIP  OF THE  SOFTWARE IS  HEREBY
;	TRANSFERRED.
;
;	THE INFORMATION IN THIS  SOFTWARE IS SUBJECT  TO CHANGE WITHOUT  NOTICE
;	AND SHOULD  NOT  BE CONSTRUED  AS  A COMMITMENT  BY  DIGITAL  EQUIPMENT
;	CORPORATION.
;
;	DIGITAL ASSUMES NO  RESPONSIBILITY FOR  THE USE OR  RELIABILITY OF  ITS
;	SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.

	UNIVERSAL ACJSYM - Access Control Universal File
	SUBTTL Gregory A. Scott

	SEARCH MONSYM		;Get standard JSYS symbols

	SALL			;Clean the listing
	Subttl	Table of Contents

;		     Table of Contents for ACJSYM
;
;				  Section		      Page
;
;
;    1. General Comments . . . . . . . . . . . . . . . . . . .   3
;    2. Version  . . . . . . . . . . . . . . . . . . . . . . .   4
;    3. Definitions
;        3.1    Parameters Defaulted at Assembly Time  . . . .   5
;        3.2    Symbols Not (yet) In MONSYM
;            3.2.1    GETOK functions  . . . . . . . . . . . .   6
;            3.2.2    Other Symbols  . . . . . . . . . . . . .   8
;        3.3    Bits . . . . . . . . . . . . . . . . . . . . .   9
;        3.4    Interesting Constants  . . . . . . . . . . . .  10
;    4. Macros
;        4.1    PSECT Selection Macros . . . . . . . . . . . .  11
;        4.2    Command Parsing  . . . . . . . . . . . . . . .  12
;        4.3    Ignore or Skip on JSYS Errors  . . . . . . . .  13
;        4.4    JSYS Error Handler . . . . . . . . . . . . . .  14
;        4.5    Crash Handler  . . . . . . . . . . . . . . . .  15
;    5. Globular Symbols . . . . . . . . . . . . . . . . . . .  16
;    6. End of ACJSYM  . . . . . . . . . . . . . . . . . . . .  17
	SUBTTL General Comments

	COMMENT ~

This Access Control Facility operates in two phases.  In the first ("profile")
phase, commands are entered to set up a database of which GETOK functions are
desired and which users need special treatment.  In the second ("policy") phase
the program implements the policy specified in the first phase by running as
the system access control facility.

This is the ACJSYM module.  This module of the access control facility where
the version, revision history, defaulted paramaters, constants, macros, and the
global symbol list are defined.  Most of these symbols defined here are those
that are used in more than one ACJ source file.  Currently there are two
modules making use of ACJSYM: ACJDEC (profile generation, subroutines, policy
driver) and ACJUSR (function specific codes and tables).

The design of the program allows site specific policy implementations and
access control functions to be changed in the ACJUSR module.  It is expected
that any site should not have to change any code in the ACJDEC module,
particularly in the core access control code.  The ACJSYM module contains all
symbols that need to be shared between ACJDEC and ACJUSR.

This program was written in November 1988 by Gregory A. Scott, Digital
Equipment Corporation, Marlboro, Massachusetts.

	~
	SUBTTL Version

;The revision history is kept in usual TOPS-20 development format at the
;beginning of the file, most recent edits first.  Each time one or more of the
;other source modules are edited, the version number must be changed here.

;Define the version of today's program.

VMAJOR==7			;Version (Same as monitor)
VMINOR==0			;Minor version
VEDIT==131			;Edit (Octal edit number like monitor)
VWHO==0				;Who last edited (0=DEC development)

VACJ==BYTE(3)VWHO(9)VMAJOR(6)VMINOR(18)VEDIT ;Build version number


;Make a macro that generates a string with the version in it

DEFINE ....VG(MAJOR,EDIT),<ASCIZ/ACJ MAJOR(EDIT)/>

DEFINE VERSIO,<....VG(\VMAJOR,\VEDIT)>
	SUBTTL Definitions --  Parameters Defaulted at Assembly Time

DEFINE ND(SYM,VAL),<		;Defines default values for symbols
	IFNDEF SYM,<SYM==VAL>>	;If not defined yet, do so now

ND DBUGSW,0			;Nonzero for debug version
IFN DBUGSW,SAVCNT==770		;Save everything if debug mode
ND SAVCNT,400			;Normally only save pages 0-377

ND ARGLEN,1000			;Largest possible argument block for RCVOK
ND NUSERS,100			;Sixty four user profiles allowed today

ND PAGLEN,^D58			;Lines per page as if we really cared

ND BUGLEN,200			;BUG PDL size
ND PLEN,400			;Generous stack size today

ND PRIMDB,^D<7*60*60>		;Load 7 am default for prime time
ND PRIMDE,^D<18*60*60>		;Load 6 pm default for prime time

ND LOGDCI,^D30			;[107] Default log file cache sweep interval
ND LOGBPC,3			;[112] Number of pages in log file cache

ND SPYDCI,^D10			;Default check interval 10 seconds
ND SPLEN,400			;Size of fork spy stacks
ND NSPYS,10			;Number of spy forks

ND WRICPL,^D<79-7>		;Maximum characters in lines in WRITE command

ND SECCPL,^D80*5		;Maximum length of line in ACCESS.CONTROL
ND SECDCI,^D60			;[111] Access control cache stale time
ND NCACHE,^D16			;[117] Entries in the access control cache
ND SCACHE,^D16			;[117] Size of each cache buffer in pages
	SUBTTL Definitions -- Symbols Not (yet) In MONSYM -- GETOK functions

;Define symbols that may not be in MONSYM yet.  We provide this so that the
;program may be built and used on 4.1, 6.1, or early 7.0 systems.  No testing
;has been done under 4.1 or 6.1 however.

ND .GECFL,1			;(.GOCRD) CRDIR% flags from AC 2
ND .GEDIR,2			;(.GOCRD) Start of STR:<DIRECTORY> 
ND .GECAB,15			;(.GOCRD) Start of CRDIR% argument block
ND CD%SEC,1B8			;(.GOCRD) Directory is secure (in .CDMOD word)

ND .GEHST,1			;(.GODNA) Host name

ND .GEHSN,1			;(.GOANA) Host number
ND .GEPRT,2			;(.GOANA) Port number

ND .GOCTM,26			;CTERM connection
  ND .GEWHO,1			;(.GOCTM) ASCIZ/NODE::USER/ on remote system

ND .GOTTM,27			;TTMSG% monitor call
  ND .GEDTY,1			;(.GOTTM) AC1 as given to the TTMSG% JSYS
  ND TT%REM,1B1			;(TTMSG% AC1) Remote send indicator
  ND .TTCIN,37B17		;(TTMSG% AC1) CI node designator
  ND .CSALL,37B17		;(TTMSG% AC1) Send to all nodes mnemonic
  ND .TTTTY,777777B35		;(TTMSG% AC1) Terminal destined for message

ND  .GOSMN,30			;SMON% monitor call
  ND .GESMF,1			;[106] (.GOSMN) SMON% function number
  ND .GESMV,2			;[106] (.GOSMN) New value for function

ND .GOHSY,31			;HSYS% monitor call
  ND .GESDT,1			;[106] (.GOHSY) Shutdown time (internal format)
  ND .GERES,2			;[106] (.GOHSY) System resume time (internal)

ND .GOSGT,32			;Allow SYSGT% monitor call
  ND .GETBN,1			;(.GOSGT) SIXBIT table name

ND .GOGTB,33			;Allow access of information via GETAB%
  ND .GETBN,1			;(.GOGTB) Index into table,,table number
ND .GOOPN,34			;Allow opening a file that is set secure
  ND .GEOAC,1			;(.GOOPN) AC 2 of OPENF%
    ND OF%NXS,1B35		;(.GEOAC) File is a new file
  ND .GEFIL,2			;(.GOOPN) 226 (octal) words for filespec

ND .GORNF,35			;Allow renaming a file that is set secure
  ND .GEFIL,2			;(.GORNF) 226 (octal) words for filespec

ND .GODLF,36			;Allow deleting a file that is set secure 
  ND .GEDAC,1			;(.GODLF) Bits selected in user's AC 1
  ND .GEFIL,2			;(.GODLF) 226 (octal) words containing filename

ND .GOTLK,37			;Allow use of the TLINK% monitor call
  ND .GETTB,1			;(.GOTLK) AC1 (flags,,object)
  ND .GERMT,2			;(.GOTLK) AC2 (remote designator)

ND .GOCRL,40			;CRLNM% functions .CLNS1, .CLNSA or .CLNSY
  ND .GECFN,1			;(.GOCRL) CRLNM% function
  ND .GELNM,2			;(.GOCRL) 16. words that contain logical name

ND .GODTC,41			;Inform access control job of DTACH%
  ND .GEJOB,1			;(.GODTC) Job number

ND .GOCFD,42			;Allow CHFDB% to set or clear FB%SEC on a file
  ND .GESFS,1			;(.GOCFD) New .FBCTL word for this file
    ND FB%SEC,1B21		;(.FBCTL) File is secure
  ND .GEFIL,2			;(.GOCFD) 226 (octal) words containing filename

ND .GOGTD,43			;[126] GTDIR% JSYS
  ND .GEDNO,1			;[126] (.GOGTD) Directory number

ND .GOSTD,44			;[126] STAD% JSYS
  ND .GESTT,1			;[126] (.GOSTD) Time to set


ND .GOUSR,400000		;Special user functions start at 400000
	SUBTTL Definitions -- Symbols Not (yet) In MONSYM -- Other Symbols

;Define symbols (other than GETOK functions) that may not be in MONSYM yet.  We
;provide this so that the program may be built and used on 4.1, 6.1, or early
;7.0 systems.  No testing has been done under 4.1 or 6.1 however.

;SMON/TMON functions that are in new (7.0 after security project) monitors.

ND .SFWDN,33			;WHEEL LOGINs over DECnet connections
ND .SFBUG,63			;Short bug output
ND .SFACJ,102			;System ACJ
ND .SFPEX,103			;Password expiration
ND .SFPWD,104			;Password dictionary function
ND .SFHDT,105			;Hangup on DETACH

;INFO% functions (INFO% JSYS not in 4.1/6.1 monitors).

ND .INCIN,0			;Get CI nodes in cluster
ND .INCFG,1			;Do remote CNFIG%
ND .INDST,2			;Do remote DIRST%
ND .INGTB,3			;Do remote GETAB%
ND .INGJI,4			;Do remote GETJI%
ND .INGTY,5			;Do remote GTTYP%
ND .ININL,6			;Do remote INLNM%
ND .INLNS,7			;Do remote LNMST%
ND .INMSR,10			;Do remote MSTR%
ND .INMTO,11			;Do remote MTOPR%
ND .INMUT,12			;Do remote MUTIL%
ND .INRCR,13			;Do remote RCUSR%
ND .INSKD,14			;Do remote SKED%
ND .INSNP,15			;Do remote SNOOP%
ND .INSGT,16			;Do remote SYSGT%
ND .INTMN,17			;Do remote TMON%
ND .INXPK,20			;Do remote XPEEK%
ND .INDVC,21			;Do remote DVCHR%
ND .INNTF,22			;Do remote NTINF%
ND .INSTV,23			;Do remote STDEV%
ND .INDVT,24			;Do remote DEVST%
ND .INSYS,25			;Obtain remote SYSTAT information
ND .INJOB,26			;Obtain remote jobs for supplied user
ND .INRCD,27			;Do remote RCDIR%
ND .INTIM,30			;Do remote TIME%
	SUBTTL Definitions -- Bits

;Define the flags in AC F

	FL%NO==1B0		;"NO" keyword typed
	FL%DEN==1B1		;Request is denied
	FL%UNU==1B2		;User did something unusual
	FL%FAI==1B3		;User request eventually failed
	FL%SIO==1B4		;Spy file I/O has happened recently
	FL%ACJ==1B5		;Running as ACJ now (rather than profile phase)
	FL%ERR==1B6		;Running in error processing code now
	FL%NLF==1B7		;New ACJ log file is needed
	FL%NOI==1B8		;ACJ is not interruptable (NOINT)
	FL%SLF==1B9		;[107] Need to sweep log file cache if set
	FL%LAC==1B10		;[111] Page mapped in long access.control
				;[111] 1B11-1B35 free

;Define flags used for function profile bits (needed in both ACJUSR and ACJDEC)

	FU%SET==1B0		;If 1 if set this bit (command table only)
	FU%ENA==1B1		;If 1 enable this function, if 0 do not enable
	FU%GOK==1B2		;If 1 we are getting OKs on this function
	FU%POL==1B3		;If 1 call the policy routine for this function
				;1B3-1B6 reserved by DEC for future 
				;All other bits are defined in ACJUSR


;Bits 1B35 through 1B18 of the ACCESS.CONTROL keyword table has bits to
;determine the access type that this keyword applies to.  The definition of
;these bits follow.

	SF.APP==1B35		;Append access (OPENF)
	SF.DEL==1B34		;Delete access (DELF)
	SF.NOS==1B33		;Clear secure access (CHFDB)
	SF.REA==1B32		;Read access (OPENF)
	SF.REN==1B31		;Rename access (RNAMF)
	SF.SEC==1B30		;Set secure access (CHFDB)
	SF.WRI==1B29		;Write access (OPENF)
	;1B28-1B18		;Free
	SF.ALL==SF.APP!SF.DEL!SF.REA!SF.REN!SF.SEC!SF.NOS!SF.WRI ;All bits
	SUBTTL Definitions -- Interesting Constants

;Define a few well used constants today.

.SAT==:5			;Saturday
.SUN==:6			; and Sunday days of week

USRCHR==^D40			;Number of characters in username

PGSIZ==1000			;Number of words in a page
PGSFT==11			;Used to shift something to a page value

ROOTDN==1			;Root-directory number is always directory 1
INFQUO==377777,,0		;Special inf quota number

;Define format of job information block used by ACJDEC and ACJUSR.  This block
;consists of a complete GETJI block, a complete NTINF block, the job's origin
;string (only if network terminal), and the terminal's speed word (only if
;local terminal).  The following offsets are used in routines GETINF and OGETJI
;as well as the policy routines.

GETJIB==0			;The GETJI block must be first please
NTINFB==GETJIB+.JIMAX+1		;NTINF block after complete GETJI block
NTBLK==NTINFB+.NWNU1+1		;Job's origin string after complete NTINF block
MORSPW==NTBLK+<^D<40+8+2+8+1>/5> ;Speed word is after origin name
JISIZ==MORSPW+1			;Size of block

;The following two definitons are from the historical ACJ.MEM "document".

ERRILR==400001			;Illegal GETOK request, access denied
ERRAEC==400002			;Invalid error code returned from ACJ routine
				;(This indicates a bug in ACJ)
	SUBTTL Macros -- PSECT Selection Macros

;Code that is kept with ACJ.EXE should be in LOWCD

DEFINE LOHIGH,<
	TWOSEG 400000		;Tell LINK to expect two segments
	RELOC			;Get to low segment
	CODSEC==0		;We are now in the low seg
	.TEXT \/SYMSEG:HIGH\	;Put symbols in high segment
>				;End of DEFINE LOHIGH

DEFINE LOWCD,<
	IFN CODSEC,<
		XLIST		;Turn off listing of literals
		LIT		;Dump literals in high
		LIST		;Turn on listing
		RELOC		;Do a reloc statement to get to low seg
	>			;End of IFN CODSEC
	CODSEC==0		;Zero is low
>

;Code that is used in policy formation only is kept in HIGHCD.

DEFINE HIGHCD,<
	IFE CODSEC,<
		XLIST		;Turn off listing of literals
		LIT		;Dump literals in low seg
		LIST		;Turn on listing
		RELOC		;Do a reloc statement to get to high seg
	>			;End of IFN CODSEC 
	CODSEC==1		;We are now in high section
>
	SUBTTL Macros -- Command Parsing

;Macro to parse noise words

DEFINE NOISE (GWRD) <
	MOVEI T2,[FLDDB. .CMNOI,,<-1,,[ASCIZ /GWRD/]>]
	CALL COMANE>

;Macro to output just error message text.

DEFINE EMSG (TEXT),<
	HRROI T1,[ASCIZ |TEXT|]
	ESOUT%
>

;Macros used to define a table

DEFINE TBEGIN(%A,%B),<
	XWD %B,%B
%A:	DEFINE TEND,<%B==.-%A>
>				;End of DEFINE TBEGIN

DEFINE TENTRY(A,B),<[ASCIZ/A/],,<B>>
	SUBTTL Macros -- Ignore or Skip on JSYS Errors

;Macro to take skip return if a JSYS fails.

DEFINE ERSKP.(%A),<
	ERJMP %A+1
%A:!>

;Macro to ignore errors from a JSYS.

DEFINE ERNOP.(%A),<
	ERJMP %A
%A:!>
	SUBTTL Macros -- JSYS Error Handler

;Macro to catch a JSYS error.  First argument is the error string to print, it
;will be followed by the last JSYS error.  The second argument is optional code
;to execute and the third argument is a place to JRST to.

DEFINE JSERRO(TEXT,CODE,WHERE),<
IFB <WHERE>,<
	IFB <CODE>,<
	ERCAL [	JSP CX,JSERR1
		ASCIZ/TEXT: /]
	>; End of IFB <CODE>
	IFNB <CODE>,<
	ERCAL [	MOVEI CX,[ASCIZ/TEXT: /]
		CALL JSERR1
		CODE
		RET]
	>; End of IFNB <CODE>
>;End of IFB <WHERE>
IFNB <WHERE>,<
	ERJMP [	MOVEI CX,[ASCIZ/TEXT: /]
		CALL JSERR1
		CODE
		JRST WHERE]
>;End of IFB <WHERE>
>;End of DEFINE JSERR

;Macro to just output a string and the last JSYS error.

DEFINE OJSERR(TEXT,CODE,WHERE),<
IFB <WHERE>,<
	IFB <CODE>,<
	CALL [	JSP CX,JSERR1
		ASCIZ/TEXT: /]
	>; End of IFB <CODE>
	IFNB <CODE>,<
	CALL [	MOVEI CX,[ASCIZ/TEXT: /]
		CALL JSERR1
		CODE
		RET]
	>; End of IFNB <CODE>
>;End of IFB <WHERE>
IFNB <WHERE>,<
	JRST [	MOVEI CX,[ASCIZ/TEXT: /]
		CALL JSERR1
		CODE
		JRST WHERE]
>;End of IFB <WHERE>
>;End of DEFINE JSERR
	SUBTTL Macros -- Crash Handler

;Macro that is used to crash the ACJ.

DEFINE BUG(TYP,COD,TEXT),<
	IFIDN <TYP>,<HLT>,<
		CALL [	JSR BUGHLT
			ASCIZ/COD/
			ASCIZ/TEXT/]
	>			;End of IFIDN
	IFDIF <TYP>,<HLT>,<PRINTX ?Bad BUG macro>
>				;End of define crash
	SUBTTL Globular Symbols

DEFINE GGLOBS,<
	.XCREF

	DEFINE QEXT (SYM)<
		IRP SYM,<
		.IF SYM,NEEDED,<EXTERN SYM> ;Symbol is extern if not defined
		.IF SYM,LOCAL,<INTERN SYM> ;[120] Symbol is intern if local
		>		;End of IRP SYM
	>			;End of DEFINE QEXT

;Routines in ACJDEC called globally.

	QEXT <GETINF,ISOUT,JSERR1,LOGTAR>
	QEXT <OCAPAB,OCRLF,OCOMMA,ODEC,ODEVST,ODIRST,OGETJI>
	QEXT <OLDEC,OLOCT,OLPPN,ODEC,OOCT,OPPN,OODTIM,OSIXBI,OSPACE>
	QEXT <PRSBIT,PRSDEC,PTEXT,SECFIL,SHOBIT,SHODEC,SENLOG,SPYON>
	QEXT <WRIBIT,WRIDEC,WTBLUK>

;Routines in ACJUSR called globally.

	QEXT <SETUNU,USRLOG,USRPOL>

;Data in ACJUSR used globally.

	QEXT <ENAAOB,ENADEF,ENANOT,ENASHO,ENATBL,ENAKEY>
	QEXT <FUNAOB,FUNCTB,FUNCOD,FUNCTB,FUNKEY,FUNLOG,FUNTBL,FUNTMO,FUNTST>
	QEXT <GOCFDB,GODLFB,GOOPNB,GORNFB,GOTLKB> ;[111]
	QEXT <USEAOB,USEDEF,USEKEY,USENOT,USEPRS,USESHO,USETBL,USEWRI>
	
;Data in ACJDEC used globally.

	QEXT <ACRLF,ARGBLK,CJBLK,CHNTAB,CTYLNO,FUNCTB,JIBLK,LOGIDX,MAXPTY>
	QEXT <OPRUNO,OURNAM,PRIMEB,PRIMEE,TEXTBP,TEXTBU,TJBLK,TTYPTY>
	QEXT <USRNUM,USRPRO,USRSTG,USRSTR,USRTBL>

>				;End of DEFINE GGLOBS
	SUBTTL End of ACJSYM
	END