--******************************************************************************************************************** -- Created: 30-Mar-2010 17:01:55 by OpenVMS SDL EV3-3 -- Source: 02-OCT-2001 01:57:09 $1$DGA7274:[STARLET_ADA.LIS]REGDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package REGDEF is -- module $REGDEF -- -- +===================================================================+ -- | -- | REG - Registry system service ($REGISTRY) definition -- | -- +===================================================================+ -- -- +-------------------------------------------------------------------+ -- | Function codes -- +-------------------------------------------------------------------+ -- REG_FC_CLOSE_KEY : constant := 1; -- Releases the resources for a given key REG_FC_CREATE_KEY : constant := 2; -- Either creates a specified key or opens it if it already exists REG_FC_DELETE_KEY : constant := 3; -- Removes a specified key from the registry REG_FC_DELETE_VALUE : constant := 4; -- Deletes the specified value from a given key REG_FC_ENUM_KEY : constant := 5; -- Retrieves information about a subkey REG_FC_ENUM_VALUE : constant := 6; -- Retrieves information about a value REG_FC_FLUSH_KEY : constant := 7; -- Write all the information of a specified key to disk REG_FC_LOAD_KEY : constant := 8; -- Create a subkey and store information from a given file REG_FC_MODIFY_KEY : constant := 9; -- Modifies information about a specified key REG_FC_MODIFY_TREE_KEY : constant := 10; -- Modifies information about a specified key and all its subkeys REG_FC_NOTIFY_CHANGE_KEY_VALUE : constant := 11; -- Notifies the calling process when a specified key has changed REG_FC_OPEN_KEY : constant := 12; -- Opens a specified key REG_FC_QUERY_KEY : constant := 13; -- Retrieves information about a specified key REG_FC_QUERY_VALUE : constant := 14; -- Retrieves information about a specified value REG_FC_REPLACE_KEY : constant := 15; -- Replaces a key and all its subkeys with information in a specified file REG_FC_RESTORE_KEY : constant := 16; -- Restores a key from a specified file REG_FC_SAVE_KEY : constant := 17; -- Saves a key and its subkeys to a specified file REG_FC_SEARCH_TREE_DATA : constant := 18; -- Scan a key and its subkeys for a given data component REG_FC_SEARCH_TREE_KEY : constant := 19; -- Scan a key and its subkeys for a given subkey REG_FC_SEARCH_TREE_VALUE : constant := 20; -- Scan a key and its subkeys for a given value REG_FC_SET_VALUE : constant := 21; -- Sets value infornation REG_FC_UNLOAD_KEY : constant := 22; -- Removes a key tree form the registry REG_FC_GET_KEY_SECURITY : constant := 23; -- Retrieves a key security profile REG_FC_SET_KEY_SECURITY : constant := 24; -- Sets a key security profile REG_FC_GET_PERFORMANCE : constant := 25; -- Retrieves performance information REG_FC_GET_FILE_INFO : constant := 26; -- Retrieves file statistics REG_FC_GET_FILE_UPDATE : constant := 27; -- Retrieves segment allocation information REG_FC_CREATE_DATABASE : constant := 28; -- Creates the registry database REG_FC_MAKE_SNAPSHOT : constant := 29; -- Take a snpashot of the Registry database REG_FC_ARCHIVE : constant := 30; -- Archive the registry database REG_FC_LAST : constant := 31; -- Always last -- -- +-------------------------------------------------------------------+ -- | Item Code Modifiers -- +-------------------------------------------------------------------+ -- REG_M_UNICODE_STRING : constant := 8192; -- 0x2000 string is Unicode -- -- +-------------------------------------------------------------------+ -- | Item Codes -- +-------------------------------------------------------------------+ -- REG_TERMINATOR : constant := 0; -- network packet terminator REG_SEPARATOR : constant := 1; -- item code list seperator REG_SECPROFILE : constant := 514; -- security profile REG_REQUEST : constant := 515; -- TLV of item code TLVs (request) REG_ACMODE : constant := 1284; -- access mode REG_ACTIONCODE : constant := 1285; -- action code for performance & space REG_CACHEACTION : constant := 1286; -- cache action (thru/behind ) REG_CANCELNOTIFICATION : constant := 519; -- Cancel notify key change notify REG_CLASSNAME : constant := 264; -- class name REG_CLASSNAMEMAX : constant := 1289; -- longest class name length REG_CLASSNAMESIZE : constant := 1290; -- destination's class name buffer size REG_DATAFLAGS : constant := 1547; -- data flags REG_DATATYPE : constant := 1292; -- data type REG_DISPOSITION : constant := 1293; -- createnewkey/openexistingkey REG_FILEINFODATA : constant := 526; -- File info data REG_FILELOAD : constant := 1807; -- OpenVMS file name to load REG_FILESAVE : constant := 1808; -- OpenVMS file name to save REG_FILEUPDATEDATA : constant := 529; -- File update data REG_FLAGOPCODE : constant := 1298; -- how data flags is used REG_FLAGSUBKEY : constant := 1299; -- report (sub)key changes REG_KEYID : constant := 1300; -- input key id in longword format REG_KEYID_INTERNAL : constant := 533; -- internal key id in UID/FSO/LH format REG_KEYFLAGS : constant := 1302; -- KEY flags REG_KEYPATH : constant := 279; -- Path to key object REG_KEYRESULT : constant := 1304; -- output key id in longword format REG_KEYRESULT_INTERNAL : constant := 537; -- internal key id in UID/FSO/LH format REG_LASTWRITE : constant := 1562; -- time key was last written REG_LINKCOUNT : constant := 1307; -- Count of links refer to item REG_LINKPATH : constant := 284; -- key path a key is linked to REG_LINKPATHSIZE : constant := 1309; -- destination's link path buffer size REG_LINKTYPE : constant := 1310; -- Link type (logical/physical) REG_LOCK : constant := 1311; -- what lock on open/create key REG_NEWNAME : constant := 288; -- new name of a key create/rename REG_NOTIFYFILTER : constant := 1313; -- which key changes to reported REG_PATHBUFFER : constant := 546; -- set of paths separated by null byte REG_PERFORMANCEDATA : constant := 547; -- Performance data REG_REQLENGTH : constant := 1316; -- required buffer size REG_RETURNSTATUS : constant := 1317; -- return status for a given operation REG_SECACCESS : constant := 1318; -- security access for a new key REG_SECONDSTATUS : constant := 1319; -- secondary status for a given operation REG_SECURITYPOLICY : constant := 1320; -- Security policy to enforce for a key REG_SEGMENTNUMBER : constant := 1321; -- Segment Number for locating space info REG_SNAPSHOTDESTINATION : constant := 1834; -- Snapshot destination directory REG_SNAPSHOTVERSIONS : constant := 1323; -- Snapshot versions to maintain REG_SUBKEYINDEX : constant := 1324; -- Index of the subkey to retrieve REG_SUBKEYNAME : constant := 301; -- name of a subkey REG_SUBKEYNAMEMAX : constant := 1326; -- longest subkey name for a given key REG_SUBKEYNAMESIZE : constant := 1327; -- destination's subkey name buffer size REG_SUBKEYSNUMBER : constant := 1328; -- Number of subkeys in a given key REG_SECURITYINFORMATION : constant := 1329; -- NT Security information REG_SECURITYDESCRIPTOR : constant := 562; -- NT Security descriptor REG_VALUEINDEX : constant := 1331; -- index of the value to retrieve REG_VALUEDATA : constant := 564; -- value data component REG_VALUEDATAMAX : constant := 1333; -- longest value data for a given key REG_VALUEDATASIZE : constant := 1334; -- destination's value data buffer size REG_VALUENAME : constant := 311; -- specifies the name of a value REG_VALUENAMEMAX : constant := 1336; -- longest value name for a given key REG_VALUENAMESIZE : constant := 1337; -- destination's value name buffer size REG_VALUENUMBER : constant := 1338; -- number of values in a given key REG_VOLATILE : constant := 1339; -- Identifies volatility of an object REG_WILDASTERISK : constant := 316; -- char to replace asterisk wildcard REG_WILDPERCENT : constant := 317; -- char to replace percent wildcard REG_WILDPERIODS : constant := 318; -- char to replace periods wildcard REG_INSTRUMENTFILE : constant := 575; -- unknown REG_INSTRUMENTKEY : constant := 576; -- unknown REG_INSTRUMENTDATA : constant := 577; -- unknown REG_FILENAME : constant := 1858; -- file requested for space monitoring REG_COUNTER : constant := 1347; -- a counter index REG_SECDESCRIPTORLEN : constant := 1348; -- Length of security descriptor REG_SECDESCLEN_INTERNAL : constant := 1349; -- Internal length of security descriptor REG_VALUEDATASIZE_INTERNAL : constant := 1350; -- Internal dest value data buffer size REG_SAMDESIRED : constant := 1351; -- SamDesired - for AS & Bristol only REG_DATABASE_VERSION : constant := 1352; -- Database version for Create Database REG_LAST : constant := 73; -- Always last -- -- +-------------------------------------------------------------------+ -- | Item Code Values -- +-------------------------------------------------------------------+ -- REG_K_NONE : constant := 0; -- The item is not volatile REG_K_CLUSTER : constant := 1; -- The item is removed when the cluster reboots REG_K_SYSTEM : constant := 2; -- The item is removed when the system reboots REG_K_PROCESS : constant := 3; -- The item is removed when the creating process terminates REG_K_IMAGE : constant := 4; -- The item is removes when the creating image terminates REG_K_WRITEBEHIND : constant := 5; -- The information on the given object can be written to disk at a later time REG_K_WRITETHRU : constant := 6; -- The information on the given object must be written to disk immediately REG_K_CREATENEWKEY : constant := 7; -- Created a new key REG_K_OPENEXISTINGKEY : constant := 8; -- Opened an existing key REG_K_POLICY_OPENVMS : constant := 9; -- Access is required to all keys in the key path REG_K_POLICY_NT_40 : constant := 10; -- Access is required to the first key and the requested key REG_K_INTERNAL : constant := 11; -- REG_K_HARDLINK : constant := 12; -- Hard (physical) link REG_K_SYMBOLICLINK : constant := 13; -- Symbolic (logical) link REG_K_BINARY : constant := 14; -- Binary data REG_K_DWORD : constant := 15; -- A 32 bit number REG_K_DWLITTLEENDIAN : constant := 16; -- A 32 bit number in little endian format REG_K_DWBIGENDIAN : constant := 17; -- A 32 bit number in bi endian format REG_K_EXPAND_SZ : constant := 18; -- A string of ISO-1 Latin characters containing environment variables REG_K_LINK : constant := 19; -- A link to another value REG_K_MULTI_SZ : constant := 20; -- A concatenated array of REG$K_SZ strings REG_K_QWORD : constant := 21; -- A 64 bit number REG_K_RESOURCELIST : constant := 22; -- A device driver resource list REG_K_SZ : constant := 23; -- A null terminated string REG_K_START_FILE : constant := 24; -- REG_K_START_PERF : constant := 25; -- REG_K_STOP_FILE : constant := 26; -- REG_K_STOP_PERF : constant := 27; -- REG_K_ZERO_FILE : constant := 28; -- REG_K_ZERO_PERF : constant := 29; -- REG_K_SHOW_CTR_FILE : constant := 30; -- REG_K_SHOW_CTR_PERF : constant := 31; -- REG_K_SHOW_FILE : constant := 32; -- REG_K_NORMAL : constant := 33; -- String size <= 8K REG_K_LARGE : constant := 34; -- String size > 8K REG_K_EXACTMATCH : constant := 35; -- REG_K_INCLUDE : constant := 36; -- REG_K_EXCLUDE : constant := 37; -- REG_K_ANY : constant := 38; -- REG_K_NOTANY : constant := 39; -- -- -- +-------------------------------------------------------------------+ -- | Function Code Modifiers -- +-------------------------------------------------------------------+ -- REG_M_FC : constant := 16#000003FF#; REG_M_CASE_SENSITIVE : constant := 16#00000400#; REG_M_DISABLE_WILDCARDS : constant := 16#00000800#; REG_M_IGNORE_LINKS : constant := 16#00001000#; REG_M_NOW : constant := 16#00002000#; REG_M_NOWAIT : constant := 16#00004000#; REG_M_UNICODE_VALUES : constant := 16#00008000#; REG_M_BYPASS : constant := 16#00010000#; REG_M_INTERNAL : constant := 16#00020000#; type REG_TYPE is record FC : UNSIGNED_10; CASE_SENSITIVE : BOOLEAN; -- Indicates that the case sensitivity of keys be uses for matches DISABLE_WILDCARDS : BOOLEAN; -- Indicates that wildcards characters should be traited as normal characters IGNORE_LINKS : BOOLEAN; -- Indicates that symbolic links should not be followed NOW : BOOLEAN; -- Indicates whether or not an operation should be written to disk immediately NOWAIT : BOOLEAN; -- Indicates that operation should be aborted rather than stalled UNICODE_VALUES : BOOLEAN; -- Indicates that data is an UNICODE string BYPASS : BOOLEAN; -- INTERNAL : BOOLEAN; -- Indicates internal operation FILLER_1 : UNSIGNED_6; end record; for REG_TYPE use record FC at 0 range 0 .. 9; CASE_SENSITIVE at 1 range 2 .. 2; DISABLE_WILDCARDS at 1 range 3 .. 3; IGNORE_LINKS at 1 range 4 .. 4; NOW at 1 range 5 .. 5; NOWAIT at 1 range 6 .. 6; UNICODE_VALUES at 1 range 7 .. 7; BYPASS at 2 range 0 .. 0; INTERNAL at 2 range 1 .. 1; FILLER_1 at 2 range 2 .. 7; end record; for REG_TYPE'SIZE use 24; REG_TYPE_INIT : constant REG_TYPE := (FC => 0, CASE_SENSITIVE => FALSE, DISABLE_WILDCARDS => FALSE, IGNORE_LINKS => FALSE, NOW => FALSE, NOWAIT => FALSE, UNICODE_VALUES => FALSE, BYPASS => FALSE, INTERNAL => FALSE, FILLER_1 => 0); -- -- +-------------------------------------------------------------------+ -- | Key Change Notify Flags -- +-------------------------------------------------------------------+ -- REG_M_CHANGENAME : constant := 16#00000001#; REG_M_CHANGEATTRIBUTES : constant := 16#00000002#; REG_M_CHANGELASTSET : constant := 16#00000004#; REG_M_CHANGESECURITY : constant := 16#00000008#; type REG_KEYCHANGE_TYPE is record CHANGENAME : BOOLEAN; -- A key name change, includes creation and deletion of its subkeys. CHANGEATTRIBUTES : BOOLEAN; -- Attribute change of key or subkeys CHANGELASTSET : BOOLEAN; -- Last write time change of key or subkeys CHANGESECURITY : BOOLEAN; -- Security descriptor change of key or subkeys FILLER_1 : UNSIGNED_4; end record; for REG_KEYCHANGE_TYPE use record CHANGENAME at 0 range 0 .. 0; CHANGEATTRIBUTES at 0 range 1 .. 1; CHANGELASTSET at 0 range 2 .. 2; CHANGESECURITY at 0 range 3 .. 3; FILLER_1 at 0 range 4 .. 7; end record; for REG_KEYCHANGE_TYPE'SIZE use 8; REG_KEYCHANGE_TYPE_INIT : constant REG_KEYCHANGE_TYPE := (CHANGENAME => FALSE, CHANGEATTRIBUTES => FALSE, CHANGELASTSET => FALSE, CHANGESECURITY => FALSE, FILLER_1 => 0); -- -- +-------------------------------------------------------------------+ -- | Security access Mask -- +-------------------------------------------------------------------+ -- REG_M_ALLACCESS : constant := 16#00000001#; REG_M_CREATELINK : constant := 16#00000002#; REG_M_CREATESUBKEY : constant := 16#00000004#; REG_M_ENUMSUBKEYS : constant := 16#00000008#; REG_M_EXECUTE : constant := 16#00000010#; REG_M_NOTIFY : constant := 16#00000020#; REG_M_QUERYVALUE : constant := 16#00000040#; REG_M_READ : constant := 16#00000080#; REG_M_SETVALUE : constant := 16#00000100#; REG_M_WRITE : constant := 16#00000200#; REG_M_DELETEACCESS : constant := 16#00000400#; REG_M_READCONTROL : constant := 16#00000800#; REG_M_WRITEDAC : constant := 16#00001000#; REG_M_WRITEOWNER : constant := 16#00002000#; REG_M_SYNCHRONIZE : constant := 16#00004000#; REG_M_ACCESSSYSTEMSECURITY : constant := 16#00008000#; REG_M_MAXIMUMALLOWED : constant := 16#00010000#; REG_M_GENERICALL : constant := 16#00020000#; REG_M_GENERICEXECUTE : constant := 16#00040000#; REG_M_GENERICWRITE : constant := 16#00080000#; REG_M_GENERICREAD : constant := 16#00100000#; type REG_SECACCESS_TYPE is record -- NT equivalent ALLACCESS : BOOLEAN; -- KEY_ALL_ACCESS CREATELINK : BOOLEAN; -- KEY_CREATE_LINK CREATESUBKEY : BOOLEAN; -- KEY_CREATE_SUB_KEY ENUMSUBKEYS : BOOLEAN; -- KEY_ENUMERATE_SUB_KEYS EXECUTE : BOOLEAN; -- KEY_EXECUTE NOTIFY : BOOLEAN; -- KEY_NOTIFY QUERYVALUE : BOOLEAN; -- KEY_QUERY_VALUE READ : BOOLEAN; -- READ_CONTROL|KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS|KEY_NOTIFY SETVALUE : BOOLEAN; -- KEY_SET_VALUE WRITE : BOOLEAN; -- READ_CONTROL|KEY_SET_VALUE|KEY_CREATE_SUB_KEY DELETEACCESS : BOOLEAN; -- DELETE_ACCESS READCONTROL : BOOLEAN; -- READ_CONTROL WRITEDAC : BOOLEAN; -- WRITE_DAC WRITEOWNER : BOOLEAN; -- WRITE_OWNER SYNCHRONIZE : BOOLEAN; -- SYNCHRONIZE ACCESSSYSTEMSECURITY : BOOLEAN; -- ACCESS_SYSTEM_SECURITY MAXIMUMALLOWED : BOOLEAN; -- MAXIMUM_ALLOWED GENERICALL : BOOLEAN; -- GENERIC_ALL GENERICEXECUTE : BOOLEAN; -- GENERIC_EXECUTE GENERICWRITE : BOOLEAN; -- GENERIC_WRITE GENERICREAD : BOOLEAN; -- GENERIC_READ FILLER_1 : UNSIGNED_3; end record; for REG_SECACCESS_TYPE use record ALLACCESS at 0 range 0 .. 0; CREATELINK at 0 range 1 .. 1; CREATESUBKEY at 0 range 2 .. 2; ENUMSUBKEYS at 0 range 3 .. 3; EXECUTE at 0 range 4 .. 4; NOTIFY at 0 range 5 .. 5; QUERYVALUE at 0 range 6 .. 6; READ at 0 range 7 .. 7; SETVALUE at 1 range 0 .. 0; WRITE at 1 range 1 .. 1; DELETEACCESS at 1 range 2 .. 2; READCONTROL at 1 range 3 .. 3; WRITEDAC at 1 range 4 .. 4; WRITEOWNER at 1 range 5 .. 5; SYNCHRONIZE at 1 range 6 .. 6; ACCESSSYSTEMSECURITY at 1 range 7 .. 7; MAXIMUMALLOWED at 2 range 0 .. 0; GENERICALL at 2 range 1 .. 1; GENERICEXECUTE at 2 range 2 .. 2; GENERICWRITE at 2 range 3 .. 3; GENERICREAD at 2 range 4 .. 4; FILLER_1 at 2 range 5 .. 7; end record; for REG_SECACCESS_TYPE'SIZE use 24; REG_SECACCESS_TYPE_INIT : constant REG_SECACCESS_TYPE := (ALLACCESS => FALSE, CREATELINK => FALSE, CREATESUBKEY => FALSE, ENUMSUBKEYS => FALSE, EXECUTE => FALSE, NOTIFY => FALSE, QUERYVALUE => FALSE, READ => FALSE, SETVALUE => FALSE, WRITE => FALSE, DELETEACCESS => FALSE, READCONTROL => FALSE, WRITEDAC => FALSE, WRITEOWNER => FALSE, SYNCHRONIZE => FALSE, ACCESSSYSTEMSECURITY => FALSE, MAXIMUMALLOWED => FALSE, GENERICALL => FALSE, GENERICEXECUTE => FALSE, GENERICWRITE => FALSE, GENERICREAD => FALSE, FILLER_1 => 0); -- -- +-------------------------------------------------------------------+ -- | HKEY Definitions -- +-------------------------------------------------------------------+ -- REG_HKEY_NONE : constant := 0; -- %x00000000 REG_HKEY_CLASSES_ROOT : constant := -2147483648; -- %x80000000 REG_HKEY_CURRENT_USER : constant := -2147483647; -- %x80000001 REG_HKEY_LOCAL_MACHINE : constant := -2147483646; -- %x80000002 REG_HKEY_USERS : constant := -2147483645; -- %x80000003 REG_HKEY_PERFORMANCE_DATA : constant := -2147483644; -- %x80000004 REG_HKEY_LAST_ROOT_KEY : constant := 5; -- end REGDEF;