--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:34 by OpenVMS SDL EV3-3 -- Source: 08-JUL-1998 11:03:45 $1$DGA8085:[LIB_ADA.LIS]PXBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package PXBDEF is -- module $PXBDEF type PXB_TYPE is record FLINK : ADDRESS; -- forward link BLINK : ADDRESS; -- backward link SIZE : UNSIGNED_WORD; -- size TYP : UNSIGNED_BYTE; -- type code SUBTYP : UNSIGNED_BYTE; -- subtype code end record; for PXB_TYPE use record FLINK at 0 range 0 .. 31; BLINK at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; end record; for PXB_TYPE'SIZE use 96; PXB_TYPE_INIT : constant PXB_TYPE := (FLINK => ADDRESS_ZERO, BLINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, SUBTYP => 0); PXB_K_LENGTH : constant := 12; -- Length of header -- -- PXB Array (Persona Extension Block Array) -- PXB_ARRAY_ELEMENTS : constant := 16; PXB_ARRAY_K_PXB_ARRAY_HEADER : constant := 12; type PXB_ARRAY_TYPE is record FLINK : ADDRESS; -- forward link BLINK : ADDRESS; -- backward link SIZE : UNSIGNED_WORD; -- size TYP : UNSIGNED_BYTE; -- type code SUBTYP : UNSIGNED_BYTE; -- subtype code ELEMENTS : UNSIGNED_LONGWORD_ARRAY (1 .. 16); -- The array cells end record; for PXB_ARRAY_TYPE use record FLINK at 0 range 0 .. 31; BLINK at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; ELEMENTS at 12 range 0 .. 511; end record; for PXB_ARRAY_TYPE'SIZE use 608; PXB_ARRAY_TYPE_INIT : constant PXB_ARRAY_TYPE := (FLINK => ADDRESS_ZERO, BLINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, SUBTYP => 0, ELEMENTS => (others => 0)); -- -- delegate block -- type DELBK_TYPE is record FLINK : ADDRESS; -- forward link BLINK : ADDRESS; -- backward link SIZE : UNSIGNED_WORD; -- size TYP : UNSIGNED_BYTE; -- type code SUBTYP : UNSIGNED_BYTE; -- subtype cod PERSONA_ID : UNSIGNED_LONGWORD; -- Persona ID PERSONA_ADDRESS : UNSIGNED_LONGWORD; -- Persona address CLIENT_EPID : UNSIGNED_LONGWORD; -- Client's EPID CLIENT_TPID : UNSIGNED_LONGWORD; -- Client's Thread PID BYTCNT : UNSIGNED_LONGWORD; -- BYTCNT/BYTLM to be debited upon delegation IMGCNT : UNSIGNED_LONGWORD; -- Value of PHD$L_IMGCNT when we started STATUS : UNSIGNED_LONGWORD; -- status end record; for DELBK_TYPE use record FLINK at 0 range 0 .. 31; BLINK at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; PERSONA_ID at 12 range 0 .. 31; PERSONA_ADDRESS at 16 range 0 .. 31; CLIENT_EPID at 20 range 0 .. 31; CLIENT_TPID at 24 range 0 .. 31; BYTCNT at 28 range 0 .. 31; IMGCNT at 32 range 0 .. 31; STATUS at 36 range 0 .. 31; end record; for DELBK_TYPE'SIZE use 320; DELBK_TYPE_INIT : constant DELBK_TYPE := (FLINK => ADDRESS_ZERO, BLINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, SUBTYP => 0, PERSONA_ID => 0, PERSONA_ADDRESS => 0, CLIENT_EPID => 0, CLIENT_TPID => 0, BYTCNT => 0, IMGCNT => 0, STATUS => 0); DELBK_C_DELEGATE_BLOCK_SIZE : constant := 40; -- Length of DELBK struct -- -- Persona Security Extension Registration Block definitions -- type PXRB_TYPE is record FLINK : ADDRESS; -- forward link BLINK : ADDRESS; -- backward link SIZE : UNSIGNED_WORD; -- size TYP : UNSIGNED_BYTE; -- type code SUBTYP : UNSIGNED_BYTE; -- subtype cod FLAGS : UNSIGNED_LONGWORD; -- EID : UNSIGNED_LONGWORD; -- Extension ID NAME_DESC : UNSIGNED_LONGWORD_ARRAY (1 .. 2); -- Extension name descriptor NAME : STRING(1 .. 32); -- Extension name string CREATE : ADDRESS; -- Pointer to CREATE routine CLONE : ADDRESS; -- Pointer to CLONE routine DELEGATE : ADDRESS; -- Pointer to DELEGATE routine DELETE : ADDRESS; -- Pointer to DELETE routine MODIFY : ADDRESS; -- Pointer to MODIFY routine QUERY : ADDRESS; -- Pointer to QUERY routine MAKE_TLV : ADDRESS; -- Pointer to MAKE_TLV routine end record; for PXRB_TYPE use record FLINK at 0 range 0 .. 31; BLINK at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; FLAGS at 12 range 0 .. 31; EID at 16 range 0 .. 31; NAME_DESC at 20 range 0 .. 63; NAME at 28 range 0 .. 255; CREATE at 60 range 0 .. 31; CLONE at 64 range 0 .. 31; DELEGATE at 68 range 0 .. 31; DELETE at 72 range 0 .. 31; MODIFY at 76 range 0 .. 31; QUERY at 80 range 0 .. 31; MAKE_TLV at 84 range 0 .. 31; end record; for PXRB_TYPE'SIZE use 704; PXRB_TYPE_INIT : constant PXRB_TYPE := (FLINK => ADDRESS_ZERO, BLINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, SUBTYP => 0, FLAGS => 0, EID => 0, NAME_DESC => (others => 0), NAME => (others => ASCII.NUL), CREATE => ADDRESS_ZERO, CLONE => ADDRESS_ZERO, DELEGATE => ADDRESS_ZERO, DELETE => ADDRESS_ZERO, MODIFY => ADDRESS_ZERO, QUERY => ADDRESS_ZERO, MAKE_TLV => ADDRESS_ZERO); PXRB_K_LENGTH : constant := 88; -- Length of PXRB struct -- -- Persona Security Extension Dispatch Vector Block definitions -- PXDV_K_VERSION : constant := 1; PXDV_K_MIN_VERSION : constant := 1; PXDV_K_MAX_VERSION : constant := 1; type PXDV_TYPE is record VERSION : UNSIGNED_LONGWORD; -- Version of dispatch vector FLAGS : UNSIGNED_LONGWORD; -- CREATE : ADDRESS; -- Address to CREATE routine CLONE : ADDRESS; -- Address to CLONE routine DELEGATE : ADDRESS; -- Address to DELEGATE routine DELETE : ADDRESS; -- Address to DELETE routine MODIFY : ADDRESS; -- Address to MODIFY routine QUERY : ADDRESS; -- Address to QUERY routine MAKE_TLV : ADDRESS; -- Address to MAKE_TLV routine FILLER_1 : UNSIGNED_BYTE_ARRAY (0 .. 3); end record; for PXDV_TYPE use record VERSION at 0 range 0 .. 31; FLAGS at 4 range 0 .. 31; CREATE at 8 range 0 .. 31; CLONE at 12 range 0 .. 31; DELEGATE at 16 range 0 .. 31; DELETE at 20 range 0 .. 31; MODIFY at 24 range 0 .. 31; QUERY at 28 range 0 .. 31; MAKE_TLV at 32 range 0 .. 31; FILLER_1 at 36 range 0 .. 31; end record; for PXDV_TYPE'SIZE use 320; PXDV_TYPE_INIT : constant PXDV_TYPE := (VERSION => 0, FLAGS => 0, CREATE => ADDRESS_ZERO, CLONE => ADDRESS_ZERO, DELEGATE => ADDRESS_ZERO, DELETE => ADDRESS_ZERO, MODIFY => ADDRESS_ZERO, QUERY => ADDRESS_ZERO, MAKE_TLV => ADDRESS_ZERO, FILLER_1 => (others => 0)); -- -- Persona Security Extension Block definitions for NT -- PXBNT_K_VERSION_1 : constant := 1; -- version number 1 PXBNT_K_CURRENT_VERSION : constant := 1; -- current protocol PXBNT_M_CLONE : constant := 16#00000001#; PXBNT_M_DELEGATE : constant := 16#00000002#; PXBNT_M_FILL_3 : constant := 16#00000004#; PXBNT_M_FILL_4 : constant := 16#00000008#; PXBNT_M_FILL_5 : constant := 16#00000010#; PXBNT_M_FILL_6 : constant := 16#00000020#; PXBNT_M_FILL_7 : constant := 16#00000040#; PXBNT_M_DEBIT : constant := 16#00000080#; PXBNT_K_LENGTH : constant := 88; -- Length of PXBNT structure type PXBNT_FILL_2_TYPE is record CLONE : BOOLEAN; -- Clone operation DELEGATE : BOOLEAN; -- Delegate operation FILLER_1 : BOOLEAN; FILLER_2 : BOOLEAN; FILLER_3 : BOOLEAN; FILLER_4 : BOOLEAN; FILLER_5 : BOOLEAN; DEBIT : BOOLEAN; -- DEBIT -- This bit must be in -- synch with PSB flag. end record; for PXBNT_FILL_2_TYPE use record CLONE at 0 range 0 .. 0; DELEGATE at 0 range 1 .. 1; FILLER_1 at 0 range 2 .. 2; FILLER_2 at 0 range 3 .. 3; FILLER_3 at 0 range 4 .. 4; FILLER_4 at 0 range 5 .. 5; FILLER_5 at 0 range 6 .. 6; DEBIT at 0 range 7 .. 7; end record; for PXBNT_FILL_2_TYPE'SIZE use 8; PXBNT_FILL_2_TYPE_INIT : constant PXBNT_FILL_2_TYPE := (CLONE => FALSE, DELEGATE => FALSE, FILLER_1 => FALSE, FILLER_2 => FALSE, FILLER_3 => FALSE, FILLER_4 => FALSE, FILLER_5 => FALSE, DEBIT => FALSE); type PXBNT_DOI_TYPE is record DOI : UNSIGNED_LONGWORD; DOI_PID : UNSIGNED_LONGWORD; end record; for PXBNT_DOI_TYPE use record DOI at 0 range 0 .. 31; DOI_PID at 4 range 0 .. 31; end record; for PXBNT_DOI_TYPE'SIZE use 64; PXBNT_DOI_TYPE_INIT : constant PXBNT_DOI_TYPE := (DOI => 0, DOI_PID => 0); type PXBNT_TYPE is record FLINK : ADDRESS; -- forward link BLINK : ADDRESS; -- backward link SIZE : UNSIGNED_WORD; -- size, in bytes TYP : UNSIGNED_BYTE; -- type code for PXBNT (DYN$C_SECURITY) SUBTYP : UNSIGNED_BYTE; -- subtype code (DYN$C_SECURITY_PSB) VERSION : UNSIGNED_LONGWORD; -- version number FLAGS : UNSIGNED_LONGWORD; -- flags ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FILL_2 : PXBNT_FILL_2_TYPE; DOI : PXBNT_DOI_TYPE; USER_REFCOUNT : UNSIGNED_LONGWORD; NT_OWF_PASSWORD_LENGTH : UNSIGNED_WORD; LM_OWF_PASSWORD_LENGTH : UNSIGNED_WORD; NT_OWF_PASSWORD : STRING(1 .. 16); LM_OWF_PASSWORD : STRING(1 .. 16); USERNAME_O : UNSIGNED_WORD; USERNAME_S : UNSIGNED_WORD; DOMAIN_O : UNSIGNED_WORD; DOMAIN_S : UNSIGNED_WORD; USER_SESSION_KEY_O : UNSIGNED_WORD; USER_SESSION_KEY_S : UNSIGNED_WORD; LM_SESSION_KEY_O : UNSIGNED_WORD; LM_SESSION_KEY_S : UNSIGNED_WORD; DATA_SIZE : UNSIGNED_LONGWORD; -- size of data area DATA : STRING(1 .. 0); -- start of data area end record; for PXBNT_TYPE use record FLINK at 0 range 0 .. 31; BLINK at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; VERSION at 12 range 0 .. 31; FLAGS at 16 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FILL_2 at 16 range 0 .. 7; DOI at 20 range 0 .. 63; USER_REFCOUNT at 28 range 0 .. 31; NT_OWF_PASSWORD_LENGTH at 32 range 0 .. 15; LM_OWF_PASSWORD_LENGTH at 34 range 0 .. 15; NT_OWF_PASSWORD at 36 range 0 .. 127; LM_OWF_PASSWORD at 52 range 0 .. 127; USERNAME_O at 68 range 0 .. 15; USERNAME_S at 70 range 0 .. 15; DOMAIN_O at 72 range 0 .. 15; DOMAIN_S at 74 range 0 .. 15; USER_SESSION_KEY_O at 76 range 0 .. 15; USER_SESSION_KEY_S at 78 range 0 .. 15; LM_SESSION_KEY_O at 80 range 0 .. 15; LM_SESSION_KEY_S at 82 range 0 .. 15; DATA_SIZE at 84 range 0 .. 31; DATA at 88 range 0 .. -1; end record; for PXBNT_TYPE'SIZE use 704; PXBNT_TYPE_INIT : constant PXBNT_TYPE := (FLINK => ADDRESS_ZERO, BLINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, SUBTYP => 0, VERSION => 0, FLAGS => 0, DOI => PXBNT_DOI_TYPE_INIT, USER_REFCOUNT => 0, NT_OWF_PASSWORD_LENGTH => 0, LM_OWF_PASSWORD_LENGTH => 0, NT_OWF_PASSWORD => (others => ASCII.NUL), LM_OWF_PASSWORD => (others => ASCII.NUL), USERNAME_O => 0, USERNAME_S => 0, DOMAIN_O => 0, DOMAIN_S => 0, USER_SESSION_KEY_O => 0, USER_SESSION_KEY_S => 0, LM_SESSION_KEY_O => 0, LM_SESSION_KEY_S => 0, DATA_SIZE => 0, DATA => (others => ASCII.NUL)); -- -- PXB_FLAGS - These are generic PXB flags common to all Extensions. -- PXB_M_FILL_1 : constant := 16#00000001#; PXB_M_FILL_2 : constant := 16#00000002#; PXB_M_FILL_3 : constant := 16#00000004#; PXB_M_FILL_4 : constant := 16#00000008#; PXB_M_FILL_5 : constant := 16#00000010#; PXB_M_FILL_6 : constant := 16#00000020#; PXB_M_FILL_7 : constant := 16#00000040#; PXB_M_DEBIT : constant := 16#00000080#; type PXB_FLAGS_TYPE is -- flags record FILLER_1 : BOOLEAN; -- Clone operation FILLER_2 : BOOLEAN; -- Delegate operation FILLER_3 : BOOLEAN; FILLER_4 : BOOLEAN; FILLER_5 : BOOLEAN; FILLER_6 : BOOLEAN; FILLER_7 : BOOLEAN; DEBIT : BOOLEAN; -- DEBIT -- This bit must be in -- synch with PSB flag. FILLER_8 : UNSIGNED_BYTE_ARRAY (0 .. 2); end record; for PXB_FLAGS_TYPE use record FILLER_1 at 0 range 0 .. 0; FILLER_2 at 0 range 1 .. 1; FILLER_3 at 0 range 2 .. 2; FILLER_4 at 0 range 3 .. 3; FILLER_5 at 0 range 4 .. 4; FILLER_6 at 0 range 5 .. 5; FILLER_7 at 0 range 6 .. 6; DEBIT at 0 range 7 .. 7; FILLER_8 at 1 range 0 .. 23; end record; for PXB_FLAGS_TYPE'SIZE use 32; PXB_FLAGS_TYPE_INIT : constant PXB_FLAGS_TYPE := (FILLER_1 => FALSE, FILLER_2 => FALSE, FILLER_3 => FALSE, FILLER_4 => FALSE, FILLER_5 => FALSE, FILLER_6 => FALSE, FILLER_7 => FALSE, DEBIT => FALSE, FILLER_8 => (others => 0)); -- -- CREATE_FLAGS - Flags used for calls to CREATE_EXTENSION. -- PXB_M_PRIMARY_EXTENSION : constant := 16#00000001#; type PXB_CREATE_FLAGS_TYPE is -- flags record PRIMARY_EXTENSION : BOOLEAN; -- Clone operation FILLER_1 : UNSIGNED_31; end record; for PXB_CREATE_FLAGS_TYPE use record PRIMARY_EXTENSION at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 31; end record; for PXB_CREATE_FLAGS_TYPE'SIZE use 32; PXB_CREATE_FLAGS_TYPE_INIT : constant PXB_CREATE_FLAGS_TYPE := (PRIMARY_EXTENSION => FALSE, FILLER_1 => 0); -- -- define the offset and size for user session key and lm session key -- TOKEN_K_USERSESSIONKEY_OFFSET : constant := 120; -- user session key offset TOKEN_K_USERSESSIONKEY_SIZE : constant := 16; -- user session key size TOKEN_K_LMSESSIONKEY_OFFSET : constant := 136; -- LM session key offset TOKEN_K_LMSESSIONKEY_SIZE : constant := 8; -- LM session key offset end PXBDEF;