COMPILATION LISTING OF SEGMENT update_handler_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1728.0 mst Thu 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 11 /* Procedure to interrogate user if he wishes to un-protect a protected segment for updating purposes. 12* Generalized from original of J Gintell by C Garman, June 1972. 13* Resurrected by E Stone Jan 1974 after being deleted accidently and changed to call the new acl primitives 14* Calling sequences modified 03/29/79 by Steve Herbst 15* */ 16 update_handler_: proc (path, name, caller, access_switches, old_mode, code); 17 18 dcl path char (*), /* directory name of segment */ 19 name char (*), /* entry name */ 20 caller char (*), /* Name of calling command */ 21 access_switches bit (36), /* whether access was forced */ 22 old_mode bit (36), /* user's previous mode to restore */ 23 code fixed bin (35); /* error code 24* = 0 if OK, 25* = 1 if no delete, 26* else std error code */ 27 28 dcl access_forced bit (1) def (access_switches) pos (1); /* whether access was forced */ 29 dcl old_acl_entry bit (1) def (access_switches) pos (2); /* whether an entry for the user already existed */ 30 31 dcl error_table_$moderr ext fixed bin (35); 32 33 dcl command_query_ entry options (variable), 34 get_group_id_ entry returns (char (32) aligned), 35 hcs_$add_acl_entries entry (char (*), char (*), ptr, fixed bin, fixed bin (35)), 36 hcs_$delete_acl_entries entry (char (*), char (*), ptr, fixed bin, fixed bin (35)), 37 hcs_$list_acl entry (char (*), char (*), ptr, ptr, ptr, fixed bin, fixed bin (35)); 38 39 declare 1 query_info aligned, /* Structure for command_query_ */ 40 2 version fixed bin init (1), 41 2 yes_or_no_sw bit (1) unal init ("1"b), /* require yes or no */ 42 2 suppress_name_sw bit (1) unal init ("0"b), /* print name with question */ 43 2 status_code fixed bin (35), /* set to code of prompting question */ 44 2 query_code fixed bin (35) init (0); 45 46 dcl 1 seg_acl aligned, /* structure used to add entry to acl */ 47 2 userid char (32) aligned, 48 2 mode bit (36) aligned, 49 2 ex_mode bit (36) aligned, 50 2 status_code fixed bin (35); 51 52 dcl 1 del_acl aligned, /* structure used to delete entry from acl */ 53 2 userid char (32), 54 2 status_code fixed bin (35); 55 56 57 dcl buffer char (150) varying; /* place to receive answer from command_query_ */ 58 59 dcl (addr, length, null, substr) builtin; 60 61 /* 62* 63* */ 64 access_switches = "00"b; 65 66 query_info.status_code = error_table_$moderr; 67 call command_query_ (addr (query_info), buffer, caller, 68 "Do you want to update the protected segment ^R^a>^a^B?", path, name); 69 70 if substr (buffer, 1, 2) = "no" 71 then do; 72 73 code = 1; /* indicate answer wasn't yes */ 74 return; 75 end; 76 77 unprotect: 78 seg_acl.userid = get_group_id_ (); 79 seg_acl.status_code = 0; 80 81 call hcs_$list_acl (path, name, null, null, addr (seg_acl), 1, code); 82 if code ^= 0 then return; 83 84 if seg_acl.status_code = 0 then do; /* user already on ACL */ 85 old_acl_entry = "1"b; 86 old_mode = seg_acl.mode; 87 end; 88 89 seg_acl.mode = "101"b; 90 seg_acl.ex_mode = "0"b; 91 92 call hcs_$add_acl_entries (path, name, addr (seg_acl), 1, code); 93 94 if code = 0 then access_forced = "1"b; 95 96 return; 97 98 99 reprotect: entry (path, name, access_switches, old_mode, code); 100 101 if ^access_forced then return; 102 103 if ^old_acl_entry then do; /* delete forced access */ 104 del_acl.userid = get_group_id_ (); 105 call hcs_$delete_acl_entries (path, name, addr (del_acl), 1, code); 106 end; 107 108 else do; /* restore user's old access */ 109 seg_acl.userid = get_group_id_ (); 110 seg_acl.mode = old_mode; 111 seg_acl.ex_mode = "00"b; 112 113 call hcs_$add_acl_entries (path, name, addr (seg_acl), 1, code); 114 end; 115 /* remove user from acl */ 116 117 return; 118 119 end update_handler_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1618.9 update_handler_.pl1 >dumps>old>recomp>update_handler_.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. access_forced defined bit(1) unaligned dcl 28 set ref 94* 101 access_switches parameter bit(36) unaligned dcl 18 set ref 16 64* 85* 85 94* 94 99 101 101 103 103 addr builtin function dcl 59 ref 67 67 81 81 92 92 105 105 113 113 buffer 000130 automatic varying char(150) dcl 57 set ref 67* 70 caller parameter char unaligned dcl 18 set ref 16 67* code parameter fixed bin(35,0) dcl 18 set ref 16 73* 81* 82 92* 94 99 105* 113* command_query_ 000012 constant entry external dcl 33 ref 67 del_acl 000117 automatic structure level 1 dcl 52 set ref 105 105 error_table_$moderr 000010 external static fixed bin(35,0) dcl 31 ref 66 ex_mode 11 000104 automatic bit(36) level 2 dcl 46 set ref 90* 111* get_group_id_ 000014 constant entry external dcl 33 ref 77 104 109 hcs_$add_acl_entries 000016 constant entry external dcl 33 ref 92 113 hcs_$delete_acl_entries 000020 constant entry external dcl 33 ref 105 hcs_$list_acl 000022 constant entry external dcl 33 ref 81 mode 10 000104 automatic bit(36) level 2 dcl 46 set ref 86 89* 110* name parameter char unaligned dcl 18 set ref 16 67* 81* 92* 99 105* 113* null builtin function dcl 59 ref 81 81 81 81 old_acl_entry defined bit(1) unaligned dcl 29 set ref 85* 103 old_mode parameter bit(36) unaligned dcl 18 set ref 16 86* 99 110 path parameter char unaligned dcl 18 set ref 16 67* 81* 92* 99 105* 113* query_code 3 000100 automatic fixed bin(35,0) initial level 2 dcl 39 set ref 39* query_info 000100 automatic structure level 1 dcl 39 set ref 67 67 seg_acl 000104 automatic structure level 1 dcl 46 set ref 81 81 92 92 113 113 status_code 2 000100 automatic fixed bin(35,0) level 2 in structure "query_info" dcl 39 in procedure "update_handler_" set ref 66* status_code 12 000104 automatic fixed bin(35,0) level 2 in structure "seg_acl" dcl 46 in procedure "update_handler_" set ref 79* 84 substr builtin function dcl 59 ref 70 suppress_name_sw 1(01) 000100 automatic bit(1) initial level 2 packed unaligned dcl 39 set ref 39* userid 000104 automatic char(32) level 2 in structure "seg_acl" dcl 46 in procedure "update_handler_" set ref 77* 109* userid 000117 automatic char(32) level 2 in structure "del_acl" dcl 52 in procedure "update_handler_" set ref 104* version 000100 automatic fixed bin(17,0) initial level 2 dcl 39 set ref 39* yes_or_no_sw 1 000100 automatic bit(1) initial level 2 packed unaligned dcl 39 set ref 39* NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. length builtin function dcl 59 NAMES DECLARED BY EXPLICIT CONTEXT. reprotect 000340 constant entry external dcl 99 unprotect 000166 constant label dcl 77 update_handler_ 000050 constant entry external dcl 16 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 636 662 525 646 Length 1042 525 24 144 111 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME update_handler_ 216 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME update_handler_ 000100 query_info update_handler_ 000104 seg_acl update_handler_ 000117 del_acl update_handler_ 000130 buffer update_handler_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. command_query_ get_group_id_ hcs_$add_acl_entries hcs_$delete_acl_entries hcs_$list_acl THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$moderr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 39 000031 16 000042 64 000105 66 000111 67 000114 70 000157 73 000163 74 000165 77 000166 79 000175 81 000176 82 000246 84 000250 85 000252 86 000256 89 000262 90 000264 92 000265 94 000324 96 000332 99 000333 101 000370 103 000375 104 000401 105 000410 106 000447 109 000450 110 000457 111 000463 113 000464 117 000523 ----------------------------------------------------------- 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