.TITLE GRANTID Establish a System-wide Id  .IDENT /1.0/ ;++ ; ; Title: ; GRANTID.MAR - Establish a system-wide id for a node. ; ; Facility: ; System Startup Program ; ; Abstract: ; This program establishes a system-wide rightslist identifier. ; This id can be used to control access to objects, based on ; which node a process is executing from. Note, that if the id ; specified is not already in the rightslist database, it is ; created. ; ; Environment: ; CMKRNL, SYSNAM required. Should be executed from SYSTEM account ; at boot time. ; ; Author: ; Mark Oakley DuPont Experimental Station 06-Mar-1985 ; ; Modifications: ; ;--   .SBTTL Symbols, macros, data   $SSDEF ; Symbols for termination status. ! "; #; Macro to handle return codes. $; % .MACRO ON_ERR THERE,?HERE & BLBS R0,HERE ' BRW THERE (HERE: .ENDM ON_ERR ) * + .PSECT GRANTID_DATA,RD,WRT,NOEXE,SHR,PAGE,PIC , -USER_PROMPT_DESC: . .ASCID /Enter Id to be granted system-wide: / / 0NODE_ID_DESC: 1 .LONG NODE_ID_BUF_SIZ 2 .ADDRESS NODE_ID_BUF 3 4NODE_ID_BUF: ; Store the id here. 5 .BLKB 80 6NODE_ID_BUF_SIZ = . - NODE_ID_BUF 7 8SYSTEM_PID: ; Designates a system-wide 9 .LONG -1 ; id. : ;ADD_ID_MSG: < .ASCID /%GRANTID-I-ADDID, rightslist identifier added/ = > .SBTTL Code ? .PSECT GRANTID_CODE,RD,NOWRT,EXE,PAGE,SHR,PIC @ .ENTRY GRANTID,^M A B PUSHAL NODE_ID_DESC ; Query for a system-wide C PUSHAL USER_PROMPT_DESC ; id, if one is not already D PUSHAL NODE_ID_DESC ; on the command line. E CALLS #3,G^LIB$GET_FOREIGN F ON_ERR MAIN_EXIT G H $ASCTOID_S - ; See if id is in the I NAME=NODE_ID_DESC ; rightslist database. J CMPL #SS$_NOSUCHID,R0 K BNEQ 40$ L M $ADD_IDENT_S - ; Not in database, try to N NAME=NODE_ID_DESC ; add it. O ON_ERR MAIN_EXIT P PUSHAL ADD_ID_MSG Q CALLS #1,G^LIB$PUT_OUTPUT R S40$: T ON_ERR MAIN_EXIT U V W $GRANTID_S - ; Grant the id to this system. X PIDADR=SYSTEM_PID,- ; LOGINOUT will propagate it to Y NAME=NODE_ID_DESC ; all processes on this node. Z ON_ERR MAIN_EXIT [ \MAIN_EXIT: ] RET ^ .END GRANTID