--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:32 by OpenVMS SDL EV3-3 -- Source: 17-MAR-1995 07:57:43 $1$DGA8085:[LIB_ADA.LIS]ORBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package ORBDEF is -- module $ORBDEF --+ -- -- Object's Rights Block - structure defining the protection information -- for various objects within the system. -- --- ORB_M_PROT_16 : constant := 16#00000001#; ORB_M_ACL_QUEUE : constant := 16#00000002#; ORB_M_MODE_VECTOR : constant := 16#00000004#; ORB_M_NOACL : constant := 16#00000008#; ORB_M_CLASS_PROT : constant := 16#00000010#; ORB_M_NOAUDIT : constant := 16#00000020#; ORB_M_MODE_VALID : constant := 16#00000080#; ORB_M_PROFILE_LOCKED : constant := 16#00000100#; ORB_M_INDIRECT_ACL : constant := 16#00000200#; ORB_M_BOOTTIME : constant := 16#00000400#; ORB_M_UNMODIFIED : constant := 16#00000800#; ORB_M_DAMAGED : constant := 16#00001000#; ORB_M_TEMPLATE : constant := 16#00002000#; ORB_M_TRANSITION : constant := 16#00004000#; ORB_M_EXT_NAMEBLOCK : constant := 16#00008000#; ORB_K_LENGTH : constant := 124; -- Structure length ORB_C_LENGTH : constant := 124; -- Structure length ORB_K_DEVNAM_LENGTH : constant := 64; -- size of static device name ORB_C_DEVNAM_LENGTH : constant := 64; -- size of static device name ORB_S_ORBDEF : constant := 125; -- Old ORB size field for compatability type ORB_OWNER_TYPE is -- Object's owner record UICMEMBER : UNSIGNED_WORD; -- Member number UICGROUP : UNSIGNED_WORD; -- Group number end record; for ORB_OWNER_TYPE use record UICMEMBER at 0 range 0 .. 15; UICGROUP at 2 range 0 .. 15; end record; for ORB_OWNER_TYPE'SIZE use 32; ORB_OWNER_TYPE_INIT : constant ORB_OWNER_TYPE := (UICMEMBER => 0, UICGROUP => 0); type ORB_FLAGS_TYPE is -- System protection field record FLAGS_1 : UNSIGNED_BYTE; -- first byte of flags FLAGS_2 : UNSIGNED_BYTE; -- second byte of flags end record; for ORB_FLAGS_TYPE use record FLAGS_1 at 0 range 0 .. 7; FLAGS_2 at 1 range 0 .. 7; end record; for ORB_FLAGS_TYPE'SIZE use 16; ORB_FLAGS_TYPE_INIT : constant ORB_FLAGS_TYPE := (FLAGS_1 => 0, FLAGS_2 => 0); type ORB_FLAG_BITS_TYPE is record PROT_16 : BOOLEAN; -- Use word not vector protection ACL_QUEUE : BOOLEAN; -- (*temp*) remove at later time MODE_VECTOR : BOOLEAN; -- Use vector not byte mode protection NOACL : BOOLEAN; -- Object cannot have an ACL CLASS_PROT : BOOLEAN; -- Security classification is valid NOAUDIT : BOOLEAN; -- Do not perform $CHKPRO auditing FILLER_1 : BOOLEAN; -- MODE_VALID : BOOLEAN; -- Access mode protection is valid PROFILE_LOCKED : BOOLEAN; -- Object locked, no modification allowed -- The PROFILE_LOCKED flag is intended to be set when the profile cannot -- reasonably be modified. I.e., the protection of a volume set may only be -- altered if the root volume of the set is mounted, though mounting a selected -- volume from a volume set is supported. INDIRECT_ACL : BOOLEAN; -- Use the ACL from the template -- ORB (ORB$L_TEMPLATE) BOOTTIME : BOOLEAN; -- ORB created prior to securty object init. UNMODIFIED : BOOLEAN; -- ORB has not been explicitly modified DAMAGED : BOOLEAN; -- Deny access to all but system (BADACL) TEMPLATE : BOOLEAN; -- This orb is a template TRANSITION : BOOLEAN; -- Profile content uncertain -- -- eg. cluster instantiation EXT_NAMEBLOCK : BOOLEAN; -- ORB name is store in a separate 'ORB' block end record; for ORB_FLAG_BITS_TYPE use record PROT_16 at 0 range 0 .. 0; ACL_QUEUE at 0 range 1 .. 1; MODE_VECTOR at 0 range 2 .. 2; NOACL at 0 range 3 .. 3; CLASS_PROT at 0 range 4 .. 4; NOAUDIT at 0 range 5 .. 5; FILLER_1 at 0 range 6 .. 6; MODE_VALID at 0 range 7 .. 7; PROFILE_LOCKED at 1 range 0 .. 0; INDIRECT_ACL at 1 range 1 .. 1; BOOTTIME at 1 range 2 .. 2; UNMODIFIED at 1 range 3 .. 3; DAMAGED at 1 range 4 .. 4; TEMPLATE at 1 range 5 .. 5; TRANSITION at 1 range 6 .. 6; EXT_NAMEBLOCK at 1 range 7 .. 7; end record; for ORB_FLAG_BITS_TYPE'SIZE use 16; ORB_FLAG_BITS_TYPE_INIT : constant ORB_FLAG_BITS_TYPE := (PROT_16 => FALSE, ACL_QUEUE => FALSE, MODE_VECTOR => FALSE, NOACL => FALSE, CLASS_PROT => FALSE, NOAUDIT => FALSE, FILLER_1 => FALSE, MODE_VALID => FALSE, PROFILE_LOCKED => FALSE, INDIRECT_ACL => FALSE, BOOTTIME => FALSE, UNMODIFIED => FALSE, DAMAGED => FALSE, TEMPLATE => FALSE, TRANSITION => FALSE, EXT_NAMEBLOCK => FALSE); type ORB_MODE_PROT_TYPE is -- Mode protection vector record MODE_PROTL : UNSIGNED_LONGWORD; -- Low longword of vector MODE_PROTH : UNSIGNED_LONGWORD; -- High longword of vector end record; for ORB_MODE_PROT_TYPE use record MODE_PROTL at 0 range 0 .. 31; MODE_PROTH at 4 range 0 .. 31; end record; for ORB_MODE_PROT_TYPE'SIZE use 64; ORB_MODE_PROT_TYPE_INIT : constant ORB_MODE_PROT_TYPE := (MODE_PROTL => 0, MODE_PROTH => 0); type ORB_MIN_CLASS_TYPE is record FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 20); -- Minimum classification mask end record; for ORB_MIN_CLASS_TYPE use record FILLER_1 at 0 range 0 .. 159; end record; for ORB_MIN_CLASS_TYPE'SIZE use 160; ORB_MIN_CLASS_TYPE_INIT : constant ORB_MIN_CLASS_TYPE := (FILLER_1 => (others => 0)); type ORB_MAX_CLASS_TYPE is record FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 20); -- Maximum classification mask end record; for ORB_MAX_CLASS_TYPE use record FILLER_1 at 0 range 0 .. 159; end record; for ORB_MAX_CLASS_TYPE'SIZE use 160; ORB_MAX_CLASS_TYPE_INIT : constant ORB_MAX_CLASS_TYPE := (FILLER_1 => (others => 0)); type ORB_TYPE is record OWNER : ORB_OWNER_TYPE; -- Object's owner ACL_MUTEX : UNSIGNED_LONGWORD; -- Mutex for this ACL SIZE : UNSIGNED_WORD; -- Size of the ORB in bytes TYP : UNSIGNED_BYTE; -- Structure type SUBTYP : UNSIGNED_BYTE; -- Subtype of ORB block: -- 0 - normal ORB -- 1 - block used to contain a name (only) FLAGS : ORB_FLAGS_TYPE; -- System protection field ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FLAGS : UNSIGNED_BYTE; -- first byte of flags ----FLAG_BITS : ORB_FLAG_BITS_TYPE; -- REFCOUNT : UNSIGNED_WORD; -- Reference count MODE_PROT : ORB_MODE_PROT_TYPE; -- Mode protection vector ----Component(s) below are defined as comments since they ----overlap other fields ---- ----MODE : UNSIGNED_LONGWORD; -- Simple access mode SYS_PROT : UNSIGNED_LONGWORD; -- System protection field ----Component(s) below are defined as comments since they ----overlap other fields ---- ----PROT : UNSIGNED_WORD; -- Standard SOGW protection OWN_PROT : UNSIGNED_LONGWORD; -- Owner protection field GRP_PROT : UNSIGNED_LONGWORD; -- Group protection field WOR_PROT : UNSIGNED_LONGWORD; -- World protection field ACLFL : ADDRESS; -- ACL queue forward link ----Component(s) below are defined as comments since they ----overlap other fields ---- ----ACL_COUNT : UNSIGNED_LONGWORD; -- Count of ACL segments ACLBL : ADDRESS; -- ACL queue backward link ----Component(s) below are defined as comments since they ----overlap other fields ---- ----ACL_DESC : ADDRESS; -- Address of ACL segment descriptor list MIN_CLASS : ORB_MIN_CLASS_TYPE; MAX_CLASS : ORB_MAX_CLASS_TYPE; NAME_LENGTH : UNSIGNED_WORD; -- Length of object name FILLER_1 : UNSIGNED_WORD; -- Unused (MBZ) NAME_POINTER : ADDRESS; -- Pointer to object name OCB : ADDRESS; -- Pointer to Object Class Block TEMPLATE_ORB : ADDRESS; -- Pointer to template ORB OBJECT_SPECIFIC : INTEGER_32; -- Object class specific usage cell ORIGINAL_ORB : ADDRESS; -- Pointer to another ORB UPDSEQ : UNSIGNED_LONGWORD; -- Update sequence number MUTEX_ADDRESS : ADDRESS; -- Address of mutex for CHKPRO RESERVE2 : INTEGER_32; -- for future use OBJECT_NAME : CHARACTER; -- Start of object name end record; for ORB_TYPE use record OWNER at 0 range 0 .. 31; ACL_MUTEX 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 .. 15; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FLAGS at 12 range 0 .. 7; ----FLAG_BITS at 12 range 0 .. 15; REFCOUNT at 14 range 0 .. 15; MODE_PROT at 16 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----MODE at 16 range 0 .. 31; SYS_PROT at 24 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----PROT at 24 range 0 .. 15; OWN_PROT at 28 range 0 .. 31; GRP_PROT at 32 range 0 .. 31; WOR_PROT at 36 range 0 .. 31; ACLFL at 40 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----ACL_COUNT at 40 range 0 .. 31; ACLBL at 44 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----ACL_DESC at 44 range 0 .. 31; MIN_CLASS at 48 range 0 .. 159; MAX_CLASS at 68 range 0 .. 159; NAME_LENGTH at 88 range 0 .. 15; FILLER_1 at 90 range 0 .. 15; NAME_POINTER at 92 range 0 .. 31; OCB at 96 range 0 .. 31; TEMPLATE_ORB at 100 range 0 .. 31; OBJECT_SPECIFIC at 104 range 0 .. 31; ORIGINAL_ORB at 108 range 0 .. 31; UPDSEQ at 112 range 0 .. 31; MUTEX_ADDRESS at 116 range 0 .. 31; RESERVE2 at 120 range 0 .. 31; OBJECT_NAME at 124 range 0 .. 7; end record; for ORB_TYPE'SIZE use 1000; ORB_TYPE_INIT : constant ORB_TYPE := ( OWNER => ORB_OWNER_TYPE_INIT, ACL_MUTEX => 0, SIZE => 0, TYP => 0, SUBTYP => 0, FLAGS => ORB_FLAGS_TYPE_INIT REFCOUNT => 0, MODE_PROT => ORB_MODE_PROT_TYPE_INIT SYS_PROT => 0, OWN_PROT => 0, GRP_PROT => 0, WOR_PROT => 0, ACLFL => ADDRESS_ZERO, ACLBL => ADDRESS_ZERO, MIN_CLASS => ORB_MIN_CLASS_TYPE_INIT, MAX_CLASS => ORB_MAX_CLASS_TYPE_INIT, NAME_LENGTH => 0, FILLER_1 => 0, NAME_POINTER => ADDRESS_ZERO, OCB => ADDRESS_ZERO, TEMPLATE_ORB => ADDRESS_ZERO, OBJECT_SPECIFIC => 0, ORIGINAL_ORB => ADDRESS_ZERO, UPDSEQ => 0, MUTEX_ADDRESS => ADDRESS_ZERO, RESERVE2 => 0, OBJECT_NAME => ASCII.NUL); end ORBDEF;