COMPILATION LISTING OF SEGMENT set_special_password Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: ACTC Technologies Inc. Compiled on: 10/19/92 1613.6 mdt Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1989 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* *********************************************************** */ 8 9 /* set_special_password: Manipulates non-alias non-mte PNTE's */ 10 /* format: style2 */ 11 12 set_special_password: 13 procedure options (variable); 14 15 /* BIM 1984-10-08 */ 16 17 18 /****^ HISTORY COMMENTS: 19* 1) change(89-05-23,Beattie), approve(89-09-29,MCR8113), 20* audit(89-10-02,Farley), install(89-10-03,MR12.3-1082): 21* Display an appropriate error message if the add or update to the 22* PNT operation returns a non-zero error code. 23* 2) change(90-11-22,Vu), approve(90-11-22,MCR8230), 24* audit(92-09-30,WAAnderson), install(92-10-19,MR12.5-1029): 25* Query the user twice for the password by default. 26* END HISTORY COMMENTS */ 27 28 29 call cu_$arg_count (arg_count, code); 30 if code ^= 0 31 then do; 32 call com_err_ (code, ME); 33 return; 34 end; 35 36 if arg_count = 0 37 then do; 38 call com_err_$suppress_name (0, ME, USAGE_LINE); 39 return; 40 end; 41 42 user_name = ""; 43 user_index = 0; 44 none_flag = "0"b; 45 prompt_flag = "1"b; 46 password_flag = "0"b; 47 password = ""; 48 do argx = 1 to arg_count; 49 call cu_$arg_ptr (argx, ap, al, (0)); 50 if index (argument, "-") ^= 1 51 then do; 52 if user_name ^= "" 53 then do; 54 call com_err_ (0, ME, "More than one user name supplied."); 55 return; 56 end; 57 user_name = argument; 58 end; 59 else if argument = "-none" 60 then do; 61 none_flag = "1"b; 62 prompt_flag = "0"b; 63 password = ""; 64 end; 65 else if argument = "-prompt" 66 then do; 67 prompt_flag = "1"b; 68 none_flag = "0"b; 69 password = ""; 70 end; 71 else if argument = "-password" 72 then do; 73 prompt_flag = "0"b; 74 none_flag = "0"b; 75 if argx = arg_count 76 then do; 77 call com_err_ (error_table_$noarg, ME, "A password must be given after -password"); 78 return; 79 end; 80 argx = argx + 1; 81 call cu_$arg_ptr (argx, ap, al, (0)); 82 password = argument; 83 end; 84 else do; 85 call com_err_ (error_table_$badopt, ME, USAGE_LINE); 86 return; 87 end; 88 end; 89 if user_name = "" 90 then do; 91 call com_err_ (error_table_$noarg, ME, USAGE_LINE); 92 return; 93 end; 94 95 do user_index = 1 to hbound (SPECIAL_USER_NAME_ARRAY, 1); 96 if user_name = SPECIAL_USER_NAME_ARRAY (user_index).command_line_name 97 then go to HAVE_USER_INDEX; 98 end; 99 call com_err_ (0, ME, "The name ""^a"" is not a special person name.", user_name); 100 return; 101 102 HAVE_USER_INDEX: 103 if prompt_flag 104 then do; 105 call read_password_ ("Password", password); 106 save_password = password; 107 password = " "; 108 call read_password_ ("Password Again", password); 109 if password ^= save_password 110 then do; 111 call com_err_$suppress_name (0, ME, "Password typed incorrectly second time."); 112 call com_err_$suppress_name (0, ME, "Password has not been changed."); 113 password = " "; 114 save_password = " "; 115 return; 116 end; 117 save_password = " "; 118 end; 119 120 if ^none_flag 121 then password = scramble_ (password); 122 else password = ""; 123 124 pnt_entry_name = SPECIAL_USER_NAME_ARRAY (user_index).pnte_entry_name; 125 126 unspec (PNTE) = ""b; 127 call pnt_manager_$admin_get_entry (pnt_entry_name, addr (PNTE), code); 128 if code = 0 129 then update = "1"b; 130 else if code = error_table_$id_not_found 131 then do; 132 update = "0"b; 133 unspec (PNTE) = ""b; 134 PNTE.version = PNT_ENTRY_VERSION_2; 135 PNTE.user_id = pnt_entry_name; 136 end; 137 else do; 138 call com_err_ (code, ME, "Looking in PNT for ^a", pnt_entry_name); 139 return; 140 end; 141 142 PNTE.private.pw_flags.short_pw = "1"b; 143 PNTE.password = password; 144 PNTE.alias = ""; 145 PNTE.default_project = ""; 146 PNTE.flags = "0"b; 147 PNTE.flags.trap, PNTE.flags.lock = "1"b; 148 PNTE.flags.has_password = (password ^= ""); 149 150 if update 151 then call pnt_manager_$update_entry (addr (PNTE), "1"b, "0"b, code); 152 /* set password, leave network PW alone */ 153 else call pnt_manager_$add_entry (pnt_entry_name, addr (PNTE), code); 154 155 if code ^= 0 156 then call com_err_ (code, ME, "Error encountered while ^[updating^;adding to^] the PNT.", update); 157 158 return; 159 160 declare com_err_ entry () options (variable); 161 declare com_err_$suppress_name entry () options (variable); 162 declare cu_$arg_count entry (fixed bin, fixed bin (35)); 163 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 164 declare pnt_manager_$admin_get_entry 165 entry (char (*), pointer, fixed bin (35)); 166 declare pnt_manager_$update_entry 167 entry (pointer, bit (1) aligned, bit (1) aligned, fixed bin (35)); 168 declare pnt_manager_$add_entry entry (char (*), pointer, fixed bin (35)); 169 declare read_password_ entry (character (*), character (*)); 170 declare scramble_ entry (character (8)) returns (character (8)); 171 declare error_table_$badopt fixed bin (35) ext static; 172 declare error_table_$id_not_found 173 fixed bin (35) ext static; 174 declare error_table_$noarg fixed bin (35) ext static; 175 176 declare arg_count fixed bin; 177 declare argx fixed bin; 178 declare ap pointer; 179 declare al fixed bin (21); 180 declare argument char (al) based (ap); 181 declare code fixed bin (35); 182 declare ME char (20) int static options (constant) init ("set_special_password"); 183 declare none_flag bit (1) aligned; 184 declare prompt_flag bit (1) aligned; 185 declare password_flag bit (1) aligned; 186 declare password char (8); 187 declare pnt_entry_name char (32); 188 declare save_password char (8); 189 declare USAGE_LINE char (80) int static options (constant) 190 init ( 191 "Usage: set_special_password special_person_name -prompt|-none|-password PASSWORD" 192 ); 193 declare user_index fixed bin; 194 declare user_name char (32); 195 declare update bit (1) aligned; 196 declare 1 PNTE aligned like pnt_entry; 197 198 declare addr builtin; 199 declare hbound builtin; 200 declare index builtin; 201 declare unspec builtin; 202 203 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 */ 204 205 2 1 /* Begin include file special_person_names.incl.pl1 BIM 1984-10-12 */ 2 2 /* format: style3,idind30 */ 2 3 2 4 /* This include file contains the user names which are used for 2 5* special (non-login) passwords stored in the PNT. Since there 2 6* are not very many of these (one, as of this writing), having 2 7* to recompile programs to add them seems a small price to pay. 2 8* 2 9* At worst, set_special_password and new_user have to be 2 10* recompiled when one is added. */ 2 11 2 12 declare OPERATOR_ADMIN_MODE_USER_NAME char (32) init ("_operator_admin_mode_") int static options (constant); 2 13 2 14 declare 1 SPECIAL_USER_NAME_ARRAY (1) aligned int static options (constant), 2 15 2 print_name char (40) init ("Operator admin mode"), 2 16 2 command_line_name char (40) init ("operator_admin_mode"), 2 17 2 pnte_entry_name char (32) init ("_operator_admin_mode_"); 2 18 2 19 /* End include file special_person_names.incl.pl1 */ 206 207 208 end set_special_password; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/19/92 1612.2 set_special_password.pl1 >spec>install>1029>set_special_password.pl1 204 1 03/15/85 1053.1 pnt_entry.incl.pl1 >ldd>include>pnt_entry.incl.pl1 206 2 01/21/85 1012.3 special_person_names.incl.pl1 >ldd>include>special_person_names.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. ME 000060 constant char(20) initial packed unaligned dcl 182 set ref 32* 38* 54* 77* 85* 91* 99* 111* 112* 138* 155* PNTE 000140 automatic structure level 1 dcl 196 set ref 126* 127 127 133* 150 150 153 153 PNT_ENTRY_VERSION_2 constant fixed bin(17,0) initial dcl 1-64 ref 134 SPECIAL_USER_NAME_ARRAY 000000 constant structure array level 1 dcl 2-14 ref 95 USAGE_LINE 000034 constant char(80) initial packed unaligned dcl 189 set ref 38* 85* 91* addr builtin function dcl 198 ref 127 127 150 150 153 153 al 000104 automatic fixed bin(21,0) dcl 179 set ref 49* 50 57 59 65 71 81* 82 alias 32 000140 automatic char(8) level 3 dcl 196 set ref 144* ap 000102 automatic pointer dcl 178 set ref 49* 50 57 59 65 71 81* 82 arg_count 000100 automatic fixed bin(17,0) dcl 176 set ref 29* 36 48 75 argument based char packed unaligned dcl 180 ref 50 57 59 65 71 82 argx 000101 automatic fixed bin(17,0) dcl 177 set ref 48* 49* 75 80* 80 81* code 000105 automatic fixed bin(35,0) dcl 181 set ref 29* 30 32* 127* 128 130 138* 150* 153* 155 155* com_err_ 000010 constant entry external dcl 160 ref 32 54 77 85 91 99 138 155 com_err_$suppress_name 000012 constant entry external dcl 161 ref 38 111 112 command_line_name 12 000000 constant char(40) initial array level 2 dcl 2-14 ref 96 cu_$arg_count 000014 constant entry external dcl 162 ref 29 cu_$arg_ptr 000016 constant entry external dcl 163 ref 49 81 default_project 34 000140 automatic char(16) level 3 dcl 196 set ref 145* error_table_$badopt 000032 external static fixed bin(35,0) dcl 171 set ref 85* error_table_$id_not_found 000034 external static fixed bin(35,0) dcl 172 ref 130 error_table_$noarg 000036 external static fixed bin(35,0) dcl 174 set ref 77* 91* flags 40 000140 automatic structure level 3 dcl 196 set ref 146* has_password 40 000140 automatic bit(1) level 4 packed packed unaligned dcl 196 set ref 148* hbound builtin function dcl 199 ref 95 index builtin function dcl 200 ref 50 lock 40(03) 000140 automatic bit(1) level 4 packed packed unaligned dcl 196 set ref 147* none_flag 000106 automatic bit(1) dcl 183 set ref 44* 61* 68* 74* 120 password 000112 automatic char(8) packed unaligned dcl 186 in procedure "set_special_password" set ref 47* 63* 69* 82* 105* 106 107* 108* 109 113* 120* 120* 122* 143 148 password 2 000140 automatic char(32) level 3 in structure "PNTE" dcl 196 in procedure "set_special_password" set ref 143* password_flag 000110 automatic bit(1) dcl 185 set ref 46* pnt_entry based structure level 1 dcl 1-22 pnt_entry_name 000114 automatic char(32) packed unaligned dcl 187 set ref 124* 127* 135 138* 153* pnt_manager_$add_entry 000024 constant entry external dcl 168 ref 153 pnt_manager_$admin_get_entry 000020 constant entry external dcl 164 ref 127 pnt_manager_$update_entry 000022 constant entry external dcl 166 ref 150 pnte_entry_name 24 000000 constant char(32) initial array level 2 dcl 2-14 ref 124 private 1 000140 automatic structure level 2 dcl 196 prompt_flag 000107 automatic bit(1) dcl 184 set ref 45* 62* 67* 73* 102 public 22 000140 automatic structure level 2 dcl 196 pw_flags 1 000140 automatic structure level 3 dcl 196 read_password_ 000026 constant entry external dcl 169 ref 105 108 save_password 000124 automatic char(8) packed unaligned dcl 188 set ref 106* 109 114* 117* scramble_ 000030 constant entry external dcl 170 ref 120 short_pw 1 000140 automatic bit(1) level 4 packed packed unaligned dcl 196 set ref 142* trap 40(02) 000140 automatic bit(1) level 4 packed packed unaligned dcl 196 set ref 147* unspec builtin function dcl 201 set ref 126* 133* update 000137 automatic bit(1) dcl 195 set ref 128* 132* 150 155* user_id 22 000140 automatic char(32) level 3 dcl 196 set ref 135* user_index 000126 automatic fixed bin(17,0) dcl 193 set ref 43* 95* 96* 124 user_name 000127 automatic char(32) packed unaligned dcl 194 set ref 42* 52 57* 89 96 99* version 000140 automatic fixed bin(17,0) level 2 dcl 196 set ref 134* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. OPERATOR_ADMIN_MODE_USER_NAME internal static char(32) initial packed unaligned dcl 2-12 pntep automatic pointer dcl 1-21 NAMES DECLARED BY EXPLICIT CONTEXT. HAVE_USER_INDEX 000656 constant label dcl 102 ref 96 set_special_password 000232 constant entry external dcl 12 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1500 1540 1325 1510 Length 1774 1325 40 217 152 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME set_special_password 230 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME set_special_password 000100 arg_count set_special_password 000101 argx set_special_password 000102 ap set_special_password 000104 al set_special_password 000105 code set_special_password 000106 none_flag set_special_password 000107 prompt_flag set_special_password 000110 password_flag set_special_password 000112 password set_special_password 000114 pnt_entry_name set_special_password 000124 save_password set_special_password 000126 user_index set_special_password 000127 user_name set_special_password 000137 update set_special_password 000140 PNTE set_special_password THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ com_err_$suppress_name cu_$arg_count cu_$arg_ptr pnt_manager_$add_entry pnt_manager_$admin_get_entry pnt_manager_$update_entry read_password_ scramble_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$id_not_found error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000231 29 000237 30 000247 32 000251 33 000266 36 000267 38 000271 39 000313 42 000314 43 000317 44 000320 45 000321 46 000323 47 000324 48 000326 49 000335 50 000353 52 000367 54 000373 55 000420 57 000421 58 000424 59 000425 61 000431 62 000433 63 000434 64 000436 65 000437 67 000443 68 000445 69 000446 70 000450 71 000451 73 000455 74 000456 75 000457 77 000462 78 000506 80 000507 81 000510 82 000526 83 000533 85 000534 86 000555 88 000556 89 000560 91 000564 92 000605 95 000606 96 000613 98 000622 99 000624 100 000655 102 000656 105 000660 106 000677 107 000701 108 000703 109 000726 111 000731 112 000756 113 001003 114 001005 115 001006 117 001007 120 001011 122 001024 124 001026 126 001033 127 001036 128 001061 130 001066 132 001071 133 001072 134 001075 135 001077 136 001102 138 001103 139 001132 142 001133 143 001135 144 001140 145 001142 146 001145 147 001173 148 001177 150 001206 153 001235 155 001260 158 001312 ----------------------------------------------------------- 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