COMPILATION LISTING OF SEGMENT validate_card_input_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/27/85 1134.2 mst Wed Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 /* format: style2 */ 11 12 validate_card_input_: 13 procedure options (separate_static); 14 15 /* Changed by DRV 5/78 to add check for default password acs and to allow changing of card input password */ 16 /* Modified by J. C. Whitmore, 5/24/79, to add locking to the PNT changes and hash table changes */ 17 /* Modified by C. Hornig, January 1980, for new PNT. */ 18 /* Modified 1984-08-16 by E. Swenson for Version 2 PNT */ 19 /* Modified 1984-12-11 by E. Swenson to handle aliases correctly. */ 20 21 /* Automatic */ 22 dcl mode fixed bin (5); 23 dcl ec fixed bin (35); 24 dcl username char (32); 25 26 dcl 1 pnte aligned like pnt_entry; 27 28 /* Constant */ 29 30 dcl access (2) bit (5) static init ("01000"b, "00100"b) options (constant); 31 32 /* Internal Static */ 33 34 dcl sysdir char (168) static init (">system_control_1"); 35 36 /* External Static */ 37 38 dcl error_table_$bad_arg fixed bin (35) external static; 39 dcl error_table_$bad_password 40 fixed bin (35) external static; 41 dcl error_table_$action_not_performed 42 fixed bin (35) external static; 43 dcl iox_$error_output pointer external static; 44 45 /* External Entries */ 46 47 dcl continue_to_signal_ entry (fixed bin (35)); 48 dcl convert_status_code_ entry (fixed bin (35), char (8), char (100)); 49 dcl hcs_$get_user_effmode entry (char (*), char (*), char (*), fixed bin (3), fixed bin (5), 50 fixed bin (35)); /* SWS */ 51 dcl ioa_$ioa_switch entry options (variable); 52 dcl ioa_$rsnnl entry options (variable); 53 dcl pnt_manager_$test entry (character (*)); 54 dcl pnt_manager_$network_get_entry 55 entry (char (*), char (*), ptr, fixed bin (35)); 56 dcl pnt_manager_$update_entry 57 entry (ptr, bit (1), bit (1), fixed bin (35)); 58 dcl system_privilege_$seg_priv_on 59 entry (fixed bin (35)); 60 dcl system_privilege_$seg_priv_off 61 entry (fixed bin (35)); 62 63 /* Builtins */ 64 65 dcl (bit, rtrim) builtin; 66 67 /* Program */ 68 69 /* * * * * * * * * * USER * * * * * * * * * */ 70 71 user: 72 entry (person, project, password, new_password, station_id, type, error_message, code); 73 74 dcl (person, project, password, new_password, station_id, error_message) 75 char (*) parameter; 76 dcl code fixed bin (35) parameter; 77 dcl type fixed bin parameter; 78 /* 1 -> data, 2 -> RJE */ 79 80 code = 0; 81 error_message = ""; 82 83 /* First check: In the system rcp directory, there must exist a segment called station_id.acs, 84* and the user must have R access for bulk data input and E access for RJE. . */ 85 86 username = rtrim (person) || "." || rtrim (project) || ".p"; 87 call hcs_$get_user_effmode (rtrim (sysdir) || ">rcp", rtrim (station_id) || ".acs", username, 4, mode, ec); 88 if ec ^= 0 89 then call error (ec, "Unable to check user access to station ACS"); 90 if (bit (mode) & access (type)) ^= access (type) 91 then call error (0, "Incorrect user access to station"); 92 93 /* Second check: In user's mailbox directory >udd>project>person, there must exist 94* a segment called card_input.acs, and station_id.*.* must have R access for bulk data 95* input and E access for RJE. */ 96 97 call hcs_$get_user_effmode (">udd>" || rtrim (project) || ">" || person, "card_input.acs", 98 rtrim (station_id) || ".*.*", 4, mode, ec); 99 if ec ^= 0 100 then call error (ec, "Unable to check station access to user access control segment"); 101 if (bit (mode) & access (type)) ^= access (type) 102 then call error (0, "Incorrect station access for user"); 103 104 /**** Third check: If a password is supplied (and it must be for 105* RJE input) it must be the valid network password in the PNT. 106* If it is not supplied, the user must have access to the acs 107* segment >sc1>rcp>card_input_password.acs. */ 108 109 if password = "" 110 then if type ^= 1 /* DATA */ 111 then call error (0, "No password supplied"); 112 else do; 113 call hcs_$get_user_effmode (rtrim (sysdir) || ">rcp", "card_input_password.acs", username, 4, 114 mode, ec); 115 if ec ^= 0 116 then call error (ec, "Unable to check user access to card_input_password.acs"); 117 if (bit (mode) & access (1)) ^= access (1) 118 then call error (0, "Incorrect access to card_input_password.acs"); 119 end; 120 else call check_password (person, (password), (new_password)); 121 122 RETURN_TO_CALLER: 123 return; 124 125 /* ============================================= */ 126 127 station: 128 entry (station_id, password, error_message, code); 129 130 code = 0; 131 error_message = ""; 132 133 /**** Station names are registed in the PNT with only a network 134* password. The password must match. */ 135 136 call check_password (station_id, (password), ""); 137 return; 138 139 /* * * * * * * * * * TEST * * * * * * * * * */ 140 141 test: 142 entry (tdir); 143 dcl tdir char (*); 144 145 sysdir = tdir; 146 call pnt_manager_$test (sysdir); 147 return; 148 149 /* * * * * * * * * * * CHECK_PASSWORD * * * * * * * * * */ 150 151 check_password: 152 procedure (Uid, Password, New_password); 153 dcl Uid char (*) parameter; 154 dcl (Password, New_password) 155 char (8) aligned parameter; 156 dcl dont_use_aim_priv bit aligned static init ("0"b); 157 dcl aim_ind fixed bin (35) init (-1); 158 /* When zero, priv has been enabled */ 159 dcl code fixed bin (35); 160 dcl (any_other, cleanup, linkage_error) 161 condition; 162 163 /**** First verify the password and get the PNT entry.*/ 164 165 call pnt_manager_$network_get_entry (Uid, (Password), addr (pnte), code); 166 if code ^= 0 167 then if code = error_table_$bad_password 168 then call error (0, "Incorrect password supplied."); 169 else call error (code, "Checking card password."); 170 171 /**** If we get here, the password was valid. Set Uid to the userid in 172* the PNT entry (in case an alias was used). */ 173 174 Uid = pnte.user_id; 175 176 /**** See if the user wants it changed. */ 177 178 if New_password ^= "" 179 then do; /* Changing password */ 180 on any_other 181 begin; /* keep tight control over AIM */ 182 if aim_ind = 0 183 then do; /* Priv has been enabled */ 184 call priv_off (); /* Disable */ 185 call ioa_$ioa_switch (iox_$error_output, 186 "validate_card_input_: Fault with AIM privilege on. Privilege revoked."); 187 end; 188 call continue_to_signal_ (code); 189 end; 190 191 on cleanup call priv_off; 192 193 if ^dont_use_aim_priv 194 then do; /* set AIM privilege */ 195 on linkage_error 196 begin; 197 dont_use_aim_priv = "1"b; 198 goto no_aim; 199 end; 200 call system_privilege_$seg_priv_on (aim_ind); 201 no_aim: 202 revert linkage_error; 203 end; 204 pnte.network_password = New_password; 205 call pnt_manager_$update_entry (addr (pnte), "0"b, 206 /* don't set regular password */ 207 "1"b, /* do set network password */ 208 code); 209 call priv_off (); 210 if code ^= 0 211 then call error (code, "Changing network password."); 212 end; /* End of changing password code */ 213 return; 214 215 priv_off: 216 procedure (); 217 218 dcl code fixed bin (35); 219 220 if aim_ind = 0 221 then do; 222 call system_privilege_$seg_priv_off (code); 223 aim_ind = -1; 224 end; 225 end priv_off; 226 end check_password; 227 228 /* * * * * * * * * * ERROR * * * * * * * * * */ 229 230 error: 231 proc (Ec, String); 232 dcl Ec fixed bin (35) parameter; 233 dcl String char (*) parameter; 234 dcl long char (100); 235 236 if Ec ^= 0 237 then call convert_status_code_ (Ec, (""), long); 238 239 call ioa_$rsnnl ("^a ^[because ^a^]", error_message, (0), String, (Ec ^= 0), long); 240 241 if Ec = 0 242 then code = error_table_$action_not_performed; 243 else code = Ec; 244 goto RETURN_TO_CALLER; 245 end error; 246 247 /* format: off */ 1 1 /* BEGIN INCLUDE FILE ... pnt_entry.incl.pl1 */ 1 2 1 3 /* Modified 790702 by C. Hornig for MSF PNT */ 1 4 /* Modified 84-07-18 BIM for V2, aim ranges, long passwords. */ 1 5 /* Modified 84-09-25 for operator attribute... -E. A. Ranzenbach */ 1 6 /* Modified 85-03-05 E. Swenson for user_validated_time */ 1 7 1 8 /**** The ms_table_mgr_ has fixed sized entries, for now. 1 9* The presence of a version field and some pad allow 1 10* us to have incrementally-upgraded PNTE's in a future change. 1 11**/ 1 12 1 13 /**** The conversion to V2 copies the existing encrypted passwords. 1 14* Since the 32 character scrambling algorithm will not give the 1 15* same results, the short_XX flags indicate that the old scrambler 1 16* should be used. The short flags are automatically turned off 1 17* by calls to update the password with the long-scrambled form. */ 1 18 1 19 /* format: style4,insnl,delnl */ 1 20 1 21 declare pntep pointer automatic; 1 22 declare 1 pnt_entry based (pntep) aligned, /* declaration of a single PNT entry */ 1 23 2 version fixed bin, 1 24 2 private aligned, 1 25 3 pw_flags aligned, 1 26 4 short_pw bit (1) unal, /* ON password is eight-character form */ 1 27 4 short_network_pw bit (1) unal, /* ON card password is eight character form. */ 1 28 3 password character (32), /* person's password */ 1 29 3 network_password character (32), 1 30 2 public, 1 31 3 user_id character (32), /* user ID (for alias entries */ 1 32 3 alias character (8), 1 33 3 default_project character (16), /* user's default project */ 1 34 3 flags, /* one-bit flags */ 1 35 4 has_password bit (1) unaligned, 1 36 4 has_network_password bit (1) unaligned, 1 37 4 trap bit (1) unal, /* If this password is used, holler */ 1 38 4 lock bit (1) unal, /* prevent login if on. */ 1 39 4 nochange bit (1) unal, /* user cannot change password */ 1 40 4 must_change bit unal, /* user must change password at next login */ 1 41 4 pw_time_lock bit (1) unal, /* if password has a time lock */ 1 42 4 generate_pw bit (1) unal, /* ON if we give new pw, OFF lets user select new pw */ 1 43 4 last_bad_pw_reported bit (1) unal, /* ON if user has NOT been told about last bad password */ 1 44 4 operator bit (1) unal, /* ON if user can login as an operator... */ 1 45 4 pads bit (26) unal, 1 46 3 n_good_pw fixed bin, /* Number of good passwords */ 1 47 3 n_bad_pw fixed bin, /* Number of wrong passwords */ 1 48 3 n_bad_pw_since_good fixed bin, /* Number of wrong passwords since good */ 1 49 3 time_pw_changed fixed bin (71), /* When password was modified by user */ 1 50 1 51 3 time_last_good_pw fixed bin (71), 1 52 3 time_last_bad_pw fixed bin (71), /* When pw was last given wrong */ 1 53 3 bad_pw_term_id character (4), /* where bad password from */ 1 54 3 bad_pw_line_type fixed bin (17), /* ... */ 1 55 3 bad_pw_term_type character (32), 1 56 3 password_timelock fixed bin (71), /* Password is locked up until here */ 1 57 3 person_authorization (2) bit (72), /* authorization of this person */ 1 58 3 default_person_authorization bit (72), /* default authorization of this person */ 1 59 3 audit bit (36), /* audit flags for person */ 1 60 3 pad1 bit (36), /* pad to even word boundary */ 1 61 3 user_validated_time fixed bin (71), /* time this PNT entry was last validated by an administrator */ 1 62 2 pad (80 - 64) bit (36) aligned; 1 63 1 64 declare PNT_ENTRY_VERSION_2 fixed bin init (2) int static options (constant); 1 65 1 66 /* END INCLUDE FILE ... pnte.incl.pl1 */ 248 249 /* format: on */ 250 251 end validate_card_input_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/27/85 1132.1 validate_card_input_.pl1 >spec>on>7.ds>validate_card_input_.pl1 248 1 03/15/85 0953.1 pnt_entry.incl.pl1 >ldd>include>pnt_entry.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. Ec parameter fixed bin(35,0) dcl 232 set ref 230 236 236* 239 241 243 New_password parameter char(8) dcl 154 ref 151 178 204 Password parameter char(8) dcl 154 ref 151 165 String parameter char unaligned dcl 233 set ref 230 239* Uid parameter char unaligned dcl 153 set ref 151 165* 174* access 000000 constant bit(5) initial array unaligned dcl 30 ref 90 90 101 101 117 117 aim_ind 000100 automatic fixed bin(35,0) initial dcl 157 set ref 157* 182 200* 220 223* any_other 000102 stack reference condition dcl 160 ref 180 bit builtin function dcl 65 ref 90 101 117 cleanup 000110 stack reference condition dcl 160 ref 191 code 000101 automatic fixed bin(35,0) dcl 159 in procedure "check_password" set ref 165* 166 166 169* 188* 205* 210 210* code parameter fixed bin(35,0) dcl 76 in procedure "validate_card_input_" set ref 71 80* 127 130* 241* 243* code 000100 automatic fixed bin(35,0) dcl 218 in procedure "priv_off" set ref 222* continue_to_signal_ 000016 constant entry external dcl 47 ref 188 convert_status_code_ 000020 constant entry external dcl 48 ref 236 dont_use_aim_priv 000052 internal static bit(1) initial dcl 156 set ref 193 197* ec 000101 automatic fixed bin(35,0) dcl 23 set ref 87* 88 88* 97* 99 99* 113* 115 115* error_message parameter char unaligned dcl 74 set ref 71 81* 127 131* 239* error_table_$action_not_performed 000012 external static fixed bin(35,0) dcl 41 ref 241 error_table_$bad_password 000010 external static fixed bin(35,0) dcl 39 ref 166 hcs_$get_user_effmode 000022 constant entry external dcl 49 ref 87 97 113 ioa_$ioa_switch 000024 constant entry external dcl 51 ref 185 ioa_$rsnnl 000026 constant entry external dcl 52 ref 239 iox_$error_output 000014 external static pointer dcl 43 set ref 185* linkage_error 000116 stack reference condition dcl 160 ref 195 201 long 000100 automatic char(100) unaligned dcl 234 set ref 236* 239* mode 000100 automatic fixed bin(5,0) dcl 22 set ref 87* 90 97* 101 113* 117 network_password 12 000112 automatic char(32) level 3 dcl 26 set ref 204* new_password parameter char unaligned dcl 74 ref 71 120 password parameter char unaligned dcl 74 ref 71 109 120 127 136 person parameter char unaligned dcl 74 set ref 71 86 97 120* pnt_entry based structure level 1 dcl 1-22 pnt_manager_$network_get_entry 000032 constant entry external dcl 54 ref 165 pnt_manager_$test 000030 constant entry external dcl 53 ref 146 pnt_manager_$update_entry 000034 constant entry external dcl 56 ref 205 pnte 000112 automatic structure level 1 dcl 26 set ref 165 165 205 205 private 1 000112 automatic structure level 2 dcl 26 project parameter char unaligned dcl 74 ref 71 86 97 public 22 000112 automatic structure level 2 dcl 26 rtrim builtin function dcl 65 ref 86 86 87 87 97 97 113 station_id parameter char unaligned dcl 74 set ref 71 87 97 127 136* sysdir 000000 internal static char(168) initial unaligned dcl 34 set ref 87 113 145* 146* system_privilege_$seg_priv_off 000040 constant entry external dcl 60 ref 222 system_privilege_$seg_priv_on 000036 constant entry external dcl 58 ref 200 tdir parameter char unaligned dcl 143 ref 141 145 type parameter fixed bin(17,0) dcl 77 ref 71 90 90 101 101 109 user_id 22 000112 automatic char(32) level 3 dcl 26 set ref 174 username 000102 automatic char(32) unaligned dcl 24 set ref 86* 87* 113* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. PNT_ENTRY_VERSION_2 internal static fixed bin(17,0) initial dcl 1-64 error_table_$bad_arg external static fixed bin(35,0) dcl 38 pntep automatic pointer dcl 1-21 NAMES DECLARED BY EXPLICIT CONTEXT. RETURN_TO_CALLER 001337 constant label dcl 122 ref 244 check_password 001476 constant entry internal dcl 151 ref 120 136 error 002074 constant entry internal dcl 230 ref 88 90 99 101 109 115 117 166 169 210 no_aim 001767 constant label dcl 201 ref 198 priv_off 002051 constant entry internal dcl 215 ref 184 191 209 station 001345 constant entry external dcl 127 test 001441 constant entry external dcl 141 user 000270 constant entry external dcl 71 validate_card_input_ 000253 constant entry external dcl 12 NAME DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 165 165 205 205 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2506 2624 2215 2550 Length 3056 2215 42 215 270 53 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME validate_card_input_ 221 external procedure is an external procedure. check_password 121 internal procedure enables or reverts conditions. on unit on line 180 92 on unit on unit on line 191 64 on unit on unit on line 195 64 on unit priv_off 70 internal procedure is called by several nonquick procedures. error 128 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000000 sysdir validate_card_input_ 000052 dont_use_aim_priv check_password STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME check_password 000100 aim_ind check_password 000101 code check_password error 000100 long error priv_off 000100 code priv_off validate_card_input_ 000100 mode validate_card_input_ 000101 ec validate_card_input_ 000102 username validate_card_input_ 000112 pnte validate_card_input_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return tra_ext enable shorten_stack ss_ext_entry ss_ext_entry_desc ss_int_entry ss_int_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. continue_to_signal_ convert_status_code_ hcs_$get_user_effmode ioa_$ioa_switch ioa_$rsnnl pnt_manager_$network_get_entry pnt_manager_$test pnt_manager_$update_entry system_privilege_$seg_priv_off system_privilege_$seg_priv_on THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed error_table_$bad_password iox_$error_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000252 71 000260 80 000334 81 000335 86 000345 87 000434 88 000556 90 000600 97 000640 99 001014 101 001036 109 001076 113 001140 115 001231 117 001253 119 001305 120 001306 122 001337 127 001340 130 001373 131 001374 136 001404 137 001435 141 001436 145 001454 146 001463 147 001474 151 001475 157 001511 165 001513 166 001547 169 001576 174 001616 178 001625 180 001634 182 001650 184 001653 185 001660 188 001700 189 001710 191 001711 193 001733 195 001736 197 001752 198 001755 200 001760 201 001767 204 001770 205 001776 209 002021 210 002025 213 002047 215 002050 220 002056 222 002061 223 002067 225 002072 230 002073 236 002107 239 002126 241 002175 243 002205 244 002207 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved