COMPILATION LISTING OF SEGMENT check_gate_acl_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1010.3 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 check_gate_acl_: proc (pass_ptr, acl_sw, acl_count, user_project, code); 14 15 /* Modified 07/77 by THVV for bad_dir_ check */ 16 /* Converted by E. Stone to version 2 06/74 */ 17 18 /* subroutine used to check if an access list has only the user's project 19* or SysDaemon as the project field of all access names. */ 20 21 dcl (list_ptr, anp, in_aclp, pass_ptr) ptr; 22 dcl (acl_count, i) fixed bin; 23 dcl code fixed bin (35); 24 dcl acle_seen fixed bin; 25 dcl acl_sw bit (1) aligned ; 26 dcl (aclrp, projrp, own_projrp) bit (18) aligned; 27 dcl (process_name, project_on_acl, user_project) char (32) aligned ; 28 29 dcl 1 a_n aligned, 30 2 person char (32), 31 2 project char (32), 32 2 tag char (1), 33 2 pad72 bit (72); 34 35 dcl 1 acl (acl_count) based (list_ptr) aligned, 36 2 access_name char (32), 37 2 mode bit (36), 38 2 pad bit (36), 39 2 error_code fixed bin (35) ; 40 41 dcl error_table_$invalid_project_for_gate ext fixed bin (35) ; 42 43 dcl (addr, ptr) builtin; 44 dcl bad_dir_ condition; 45 46 dcl 1 pds$access_name aligned ext, 47 2 person char (32) aligned, 48 2 project char (32) aligned, 49 2 tag char (1) aligned; 50 dcl acc_name_$elements entry (ptr, ptr, fixed bin (35)); 51 1 1 /* BEGIN INCLUDE FILE ... dir_acl.incl.pl1 ... last modified Nov 1975 for nss */ 1 2 1 3 /* Template for an ACL entry. Length = 8 words */ 1 4 1 5 dcl aclep ptr; 1 6 1 7 dcl 1 acl_entry based (aclep) aligned, /* length is 8 words */ 1 8 2 frp bit(18) unaligned, /* rel ptr to next entry */ 1 9 2 brp bit(18) unaligned, /* rel ptr to previous entry */ 1 10 1 11 2 type bit (18) unaligned, /* type = dir acl */ 1 12 2 size fixed bin (17) unaligned, /* size of acl entry */ 1 13 1 14 1 15 2 name unaligned, /* user name associated with this ACL entry */ 1 16 3 pers_rp bit(18) unaligned, /* name of user */ 1 17 3 proj_rp bit(18) unaligned, /* project of user */ 1 18 3 tag char(1) unaligned, /* tag of user */ 1 19 2 mode bit (3) unaligned, /* mode for userid */ 1 20 2 pad24 bit(24) unaligned, 1 21 1 22 2 ex_mode bit(36), /* extended access modes */ 1 23 1 24 2 checksum bit (36), /* checksum from acl_entry.name */ 1 25 2 owner bit (36); /* uid of owning entry */ 1 26 1 27 /* Template for a person or project name on ACL. Length = 14 words. */ 1 28 1 29 dcl 1 access_name aligned based, /* person or project name */ 1 30 2 frp bit(18) unaligned, /* rel ptr to next name structure */ 1 31 2 brp bit(18) unaligned, /* rel ptr to prev name structure */ 1 32 1 33 2 type bit (18) unaligned, /* type = access name */ 1 34 2 size fixed bin (17) unaligned, /* size of access name */ 1 35 1 36 2 salv_flag fixed bin(17) unaligned, /* used by salvager to check for ascii names */ 1 37 2 usage fixed bin(17) unaligned, /* number of ACL entries that refer to this name */ 1 38 1 39 2 pad1 bit (36), 1 40 1 41 2 name char(32) aligned, /* person or project name itself */ 1 42 1 43 2 checksum bit (36), /* checksum from salv_flag */ 1 44 1 45 2 owner bit (36); /* uid of containing directory */ 1 46 1 47 /* END INCLUDE FILE ... dir_acl.incl.pl1 */ 52 2 1 /* BEGIN INCLUDE FILE ... dir_header.incl.pl1 */ 2 2 /* Modified 8/74 for NSS */ 2 3 /* Modified 8/76 to add version number and hash table rel pointer for variable hash table sizes */ 2 4 /* Modified 3/82 BIM for change pclock */ 2 5 /* format: style3 */ 2 6 2 7 /* Template for the directory header. Length = 64 words. */ 2 8 2 9 dcl dp ptr; 2 10 2 11 dcl 1 dir based (dp) aligned, 2 12 2 13 2 modify bit (36), /* Process ID of last modifier */ 2 14 2 type bit (18) unaligned, /* type of object = dir header */ 2 15 2 size fixed bin (17) unaligned, /* size of header in words */ 2 16 2 dtc (3), /* date-time checked by salvager array */ 2 17 3 date bit (36), /* the date */ 2 18 3 error bit (36), /* what errors were discovered */ 2 19 2 20 2 uid bit (36), /* uid of the directory - copied from branch */ 2 21 2 22 2 pvid bit (36), /* phys vol id of the dir - copied from branch */ 2 23 2 24 2 sons_lvid bit (36), /* log vol id for inf non dir seg - copied from branch */ 2 25 2 26 2 access_class bit (72), /* security attributes of dir - copied from branch */ 2 27 2 28 (2 vtocx fixed bin (17), /* vtoc entry index of the dir - copied from branch */ 2 29 2 version_number fixed bin (17), /* version number of header */ 2 30 2 31 2 entryfrp bit (18), /* rel ptr to beginning of entry list */ 2 32 2 pad2 bit (18), 2 33 2 34 2 entrybrp bit (18), /* rel ptr to end of entry list */ 2 35 2 pad3 bit (18), 2 36 2 37 2 pers_frp bit (18), /* rel ptr to start of person name list */ 2 38 2 proj_frp bit (18), /* rel ptr to start of project name list */ 2 39 2 40 2 pers_brp bit (18), /* rel ptr to end of person name list */ 2 41 2 proj_brp bit (18), /* rel ptr to end of project name list */ 2 42 2 43 2 seg_count fixed bin (17), /* number of non-directory branches */ 2 44 2 dir_count fixed bin (17), /* number of directory branches */ 2 45 2 46 2 lcount fixed bin (17), /* number of links */ 2 47 2 acle_total fixed bin (17), /* total number of ACL entries in directory */ 2 48 2 49 2 arearp bit (18), /* relative pointer to beginning of allocation area */ 2 50 2 per_process_sw bit (1), /* indicates dir contains per process segments */ 2 51 2 master_dir bit (1), /* TRUE if this is a master dir */ 2 52 2 force_rpv bit (1), /* TRUE if segs must be on RPV */ 2 53 2 rehashing bit (1), /* TRUE if hash table is being constructed */ 2 54 2 pad4 bit (14), 2 55 2 56 2 iacl_count (0:7), 2 57 3 seg fixed bin (17), /* number of initial acl entries for segs */ 2 58 3 dir fixed bin (17), /* number of initial acl entries for dir */ 2 59 2 60 2 iacl (0:7), /* pointer to initial ACLs for each ring */ 2 61 3 seg_frp bit (18), /* rel ptr to start of initial ACL for segs */ 2 62 3 seg_brp bit (18), /* rel ptr to end of initial ACL for segs */ 2 63 2 64 3 dir_frp bit (18), /* rel ptr to start of initial for dirs */ 2 65 3 dir_brp bit (18), /* rel ptr to end of initial ACL for dirs */ 2 66 2 67 2 htsize fixed bin (17), /* size of hash table */ 2 68 2 hash_table_rp bit (18), /* rel ptr to start of hash table */ 2 69 2 70 2 htused fixed bin (17), /* no. of used places in hash table */ 2 71 2 pad6 fixed bin (17), 2 72 2 73 2 tree_depth fixed bin (17), /* number of levels from root of this dir */ 2 74 2 pad7 bit (18)) unaligned, 2 75 2 76 2 dts bit (36), /* date-time directory last salvaged */ 2 77 2 78 2 master_dir_uid bit (36), /* uid of superior master dir */ 2 79 2 change_pclock fixed bin (35), /* up one each call to sum$dirmod */ 2 80 2 pad8 (11) bit (36), /* pad to make it a 64 word header */ 2 81 2 checksum bit (36), /* checksummed from uid on */ 2 82 2 owner bit (36); /* uid of parent dir */ 2 83 2 84 dcl version_number_2 fixed bin int static options (constant) init (2); 2 85 2 86 /* END INCLUDE FILE ... dir_header.incl.pl1 */ 53 3 1 /* BEGIN INCLUDE FILE ... fs_types.incl.pl1 */ 3 2 3 3 dcl ACCESS_NAME_TYPE bit (18) static options (constant) init ("000001"b3); 3 4 dcl ACLE_TYPE bit (18) static options (constant) init ("000002"b3); 3 5 dcl DIR_HEADER_TYPE bit (18) static options (constant) init ("000003"b3); 3 6 dcl DIR_TYPE bit (18) static options (constant) init ("000004"b3); 3 7 dcl LINK_TYPE bit (18) static options (constant) init ("000005"b3); 3 8 dcl NAME_TYPE bit (18) static options (constant) init ("000006"b3); 3 9 dcl SEG_TYPE bit (18) static options (constant) init ("000007"b3); 3 10 dcl HASH_TABLE_TYPE bit (18) static options (constant) init ("000013"b3); 3 11 3 12 dcl access_name_type fixed bin static options (constant) init (1); 3 13 dcl acle_type fixed bin static options (constant) init (2); 3 14 dcl dir_header_type fixed bin static options (constant) init (3); 3 15 dcl dir_type fixed bin static options (constant) init (4); 3 16 dcl link_type fixed bin static options (constant) init (5); 3 17 dcl name_type fixed bin static options (constant) init (6); 3 18 dcl seg_type fixed bin static options (constant) init (7); 3 19 dcl hash_table_type fixed bin static options (constant) init (11); 3 20 3 21 /* END INCLUDE FILE ... fs_types.incl.pl1 */ 54 55 56 /* */ 57 code = 0; /* initialize code before check is begun */ 58 dp = ptr (pass_ptr, 0); 59 user_project, process_name = pds$access_name.project; /* get name of caller's project */ 60 61 if acl_sw then do; /* check for consistency will be made on an acl */ 62 own_projrp = "0"b; /* save rel ptr to caller's project */ 63 aclep = pass_ptr; /* copy pointer to start of acl */ 64 acle_seen = 0; 65 do aclrp = aclep -> acl_entry.frp repeat aclep -> acl_entry.frp while (aclrp); 66 aclep = ptr (aclep, aclrp); /* get address of acl */ 67 acle_seen = acle_seen + 1; 68 if acle_seen > dir.acle_total then signal bad_dir_; 69 if aclep -> acl_entry.type ^= ACLE_TYPE then signal bad_dir_; 70 projrp = aclep -> acl_entry.name.proj_rp; /* pick up rp to project name */ 71 if projrp = (18)"0"b then goto bad_proj; /* if project = "*", this should not be a gate */ 72 if projrp ^= own_projrp then do; /* cannot do it the easy way so drag out the project name */ 73 project_on_acl = ptr (aclep, projrp) -> access_name.name; 74 if project_on_acl ^= "SysDaemon" then 75 if project_on_acl ^= process_name then go to bad_proj; 76 else own_projrp = projrp; /* remember rp to user's project name */ 77 end; 78 end; 79 end; 80 81 else do; /* name list supplied, like input to acl_ */ 82 anp = addr (a_n); /* get address of temp to hold 3 part access name */ 83 list_ptr = pass_ptr; /* copy pointer to start of name list */ 84 do i = 1 to acl_count; /* check access_name structure for gate consistency */ 85 in_aclp = addr (list_ptr -> acl (i)); 86 call acc_name_$elements (in_aclp, anp, code); /* break name into person, project and tag components */ 87 if code ^= 0 then go to ret; 88 if a_n.project ^= "SysDaemon" then 89 if a_n.project ^= process_name then go to bad_proj; 90 end; 91 end; 92 93 ret: return; 94 95 bad_proj: code = error_table_$invalid_project_for_gate; 96 go to ret; 97 98 end check_gate_acl_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0839.4 check_gate_acl_.pl1 >special_ldd>install>MR12.3-1114>check_gate_acl_.pl1 52 1 04/29/76 1048.9 dir_acl.incl.pl1 >ldd>include>dir_acl.incl.pl1 53 2 05/24/82 1005.0 dir_header.incl.pl1 >ldd>include>dir_header.incl.pl1 54 3 05/26/77 0922.2 fs_types.incl.pl1 >ldd>include>fs_types.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. ACLE_TYPE constant bit(18) initial packed unaligned dcl 3-4 ref 69 a_n 000133 automatic structure level 1 dcl 29 set ref 82 acc_name_$elements 000014 constant entry external dcl 50 ref 86 access_name based structure level 1 dcl 1-29 acl based structure array level 1 dcl 35 set ref 85 acl_count parameter fixed bin(17,0) dcl 22 ref 13 84 acl_entry based structure level 1 dcl 1-7 acl_sw parameter bit(1) dcl 25 ref 13 61 acle_seen 000107 automatic fixed bin(17,0) dcl 24 set ref 64* 67* 67 68 acle_total 23(18) based fixed bin(17,0) level 2 packed packed unaligned dcl 2-11 ref 68 aclep 000164 automatic pointer dcl 1-5 set ref 63* 65 66* 66 69 70 73 78 aclrp 000110 automatic bit(18) dcl 26 set ref 65* 65* 66* addr builtin function dcl 43 ref 82 85 anp 000102 automatic pointer dcl 21 set ref 82* 86* bad_dir_ 000156 stack reference condition dcl 44 ref 68 69 code parameter fixed bin(35,0) dcl 23 set ref 13 57* 86* 87 95* dir based structure level 1 dcl 2-11 dp 000166 automatic pointer dcl 2-9 set ref 58* 68 error_table_$invalid_project_for_gate 000010 external static fixed bin(35,0) dcl 41 ref 95 frp based bit(18) level 2 packed packed unaligned dcl 1-7 ref 65 78 i 000106 automatic fixed bin(17,0) dcl 22 set ref 84* 85* in_aclp 000104 automatic pointer dcl 21 set ref 85* 86* list_ptr 000100 automatic pointer dcl 21 set ref 83* 85 name 4 based char(32) level 2 in structure "access_name" dcl 1-29 in procedure "check_gate_acl_" ref 73 name 2 based structure level 2 in structure "acl_entry" packed packed unaligned dcl 1-7 in procedure "check_gate_acl_" own_projrp 000112 automatic bit(18) dcl 26 set ref 62* 72 76* pass_ptr parameter pointer dcl 21 ref 13 58 63 83 pds$access_name 000012 external static structure level 1 dcl 46 process_name 000113 automatic char(32) dcl 27 set ref 59* 74 88 proj_rp 2(18) based bit(18) level 3 packed packed unaligned dcl 1-7 ref 70 project 10 000012 external static char(32) level 2 in structure "pds$access_name" dcl 46 in procedure "check_gate_acl_" ref 59 project 10 000133 automatic char(32) level 2 in structure "a_n" dcl 29 in procedure "check_gate_acl_" set ref 88 88 project_on_acl 000123 automatic char(32) dcl 27 set ref 73* 74 74 projrp 000111 automatic bit(18) dcl 26 set ref 70* 71 72 73 76 ptr builtin function dcl 43 ref 58 66 73 type 1 based bit(18) level 2 packed packed unaligned dcl 1-7 ref 69 user_project parameter char(32) dcl 27 set ref 13 59* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACCESS_NAME_TYPE internal static bit(18) initial packed unaligned dcl 3-3 DIR_HEADER_TYPE internal static bit(18) initial packed unaligned dcl 3-5 DIR_TYPE internal static bit(18) initial packed unaligned dcl 3-6 HASH_TABLE_TYPE internal static bit(18) initial packed unaligned dcl 3-10 LINK_TYPE internal static bit(18) initial packed unaligned dcl 3-7 NAME_TYPE internal static bit(18) initial packed unaligned dcl 3-8 SEG_TYPE internal static bit(18) initial packed unaligned dcl 3-9 access_name_type internal static fixed bin(17,0) initial dcl 3-12 acle_type internal static fixed bin(17,0) initial dcl 3-13 dir_header_type internal static fixed bin(17,0) initial dcl 3-14 dir_type internal static fixed bin(17,0) initial dcl 3-15 hash_table_type internal static fixed bin(17,0) initial dcl 3-19 link_type internal static fixed bin(17,0) initial dcl 3-16 name_type internal static fixed bin(17,0) initial dcl 3-17 seg_type internal static fixed bin(17,0) initial dcl 3-18 version_number_2 internal static fixed bin(17,0) initial dcl 2-84 NAMES DECLARED BY EXPLICIT CONTEXT. bad_proj 000213 constant label dcl 95 ref 71 74 88 check_gate_acl_ 000020 constant entry external dcl 13 ret 000212 constant label dcl 93 ref 87 96 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 304 322 220 314 Length 540 220 16 202 63 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME check_gate_acl_ 130 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME check_gate_acl_ 000100 list_ptr check_gate_acl_ 000102 anp check_gate_acl_ 000104 in_aclp check_gate_acl_ 000106 i check_gate_acl_ 000107 acle_seen check_gate_acl_ 000110 aclrp check_gate_acl_ 000111 projrp check_gate_acl_ 000112 own_projrp check_gate_acl_ 000113 process_name check_gate_acl_ 000123 project_on_acl check_gate_acl_ 000133 a_n check_gate_acl_ 000164 aclep check_gate_acl_ 000166 dp check_gate_acl_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac signal_op ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. acc_name_$elements THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$invalid_project_for_gate pds$access_name LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000013 57 000025 58 000027 59 000032 61 000045 62 000050 63 000051 64 000054 65 000055 66 000062 67 000065 68 000066 69 000077 70 000107 71 000113 72 000114 73 000116 74 000123 76 000133 78 000134 79 000140 82 000141 83 000143 84 000146 85 000155 86 000161 87 000175 88 000200 90 000210 93 000212 95 000213 96 000217 ----------------------------------------------------------- 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