--******************************************************************************************************************** -- Created: 30-Mar-2010 17:35:53 by OpenVMS SDL EV3-3 -- Source: 11-MAR-1998 06:08:10 $1$DGA7274:[LIB_ADA.LIS]PWDHISDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package PWDHISDEF is -- module $PWDHISDEF -- Password History Record - This structure defines the layout of the system -- password history file. This is a variable record length indexed file (keyed -- by username) where each record contains the last "n" quadword hash values for -- the user's last "n" passwords. PWDHIS_C_ENTRY_LENGTH : constant := 16; -- size of one entry PWDHIS_K_ENTRY_LENGTH : constant := 16; -- size of one entry PWDHIS_S_PWDENTDEF : constant := 16; type PWDHIS_PWDENT_TYPE is record ENTR : UNSIGNED_QUADWORD; -- the quadword hash CHANGE : UNSIGNED_QUADWORD; -- password change date end record; for PWDHIS_PWDENT_TYPE use record ENTR at 0 range 0 .. 63; CHANGE at 8 range 0 .. 63; end record; for PWDHIS_PWDENT_TYPE'SIZE use 128; PWDHIS_PWDENT_TYPE_INIT : constant PWDHIS_PWDENT_TYPE := (ENTR => (0, 0), CHANGE => (0, 0)); PWDHIS_C_FIXED : constant := 32; -- fixed part of record PWDHIS_K_FIXED : constant := 32; -- fixed part of record PWDHIS_C_DEFAULT_LIFETIME : constant := 365; -- default history lifetime (days) PWDHIS_K_DEFAULT_LIFETIME : constant := 365; -- default history lifetime (days) PWDHIS_C_DEFAULT_LIMIT : constant := 60; -- default # of history entries per user PWDHIS_K_DEFAULT_LIMIT : constant := 60; -- default # of history entries per user PWDHIS_C_MAXIMUM_LIMIT : constant := 2000; -- maximum # of history entries per user PWDHIS_K_MAXIMUM_LIMIT : constant := 2000; -- maximum # of history entries per user PWDHIS_S_PWDHISDEF : constant := 32032; type PWDHIS_HISTORY_COMPONENT_TYPE is -- offset to start of list record HISTORY_ENTRY : PWDHIS_PWDENT_TYPE; end record; for PWDHIS_HISTORY_COMPONENT_TYPE use record HISTORY_ENTRY at 0 range 0 .. 127; end record; for PWDHIS_HISTORY_COMPONENT_TYPE'SIZE use 128; PWDHIS_HISTORY_COMPONENT_TYPE_INIT : constant PWDHIS_HISTORY_COMPONENT_TYPE := (HISTORY_ENTRY => PWDHIS_PWDENT_TYPE_INIT); TYPE PWDHIS_HISTORY_TYPE is ARRAY (1 .. 2000) of PWDHIS_HISTORY_COMPONENT_TYPE; PWDHIS_HISTORY_TYPE_INIT : constant PWDHIS_HISTORY_TYPE := ( others => PWDHIS_HISTORY_COMPONENT_TYPE_INIT); type PWDHIS_TYPE is record USERNAME : STRING(1 .. 32); -- username (KEY0) HISTORY : PWDHIS_HISTORY_COMPONENT_TYPE; -- offset to start of list end record; for PWDHIS_TYPE use record USERNAME at 0 range 0 .. 255; HISTORY at 32 range 0 .. 255999; end record; for PWDHIS_TYPE'SIZE use 256256; PWDHIS_TYPE_INIT : constant PWDHIS_TYPE := (USERNAME => (others => ASCII.NUL), HISTORY => PWDHIS_HISTORY_TYPE_INIT); end PWDHISDEF;