COMPILATION LISTING OF SEGMENT acc_list_ 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 1011.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 14 acc_list_: proc; 15 16 /* Modified by E. Stone 05/74 to convert to version 2 pl1 */ 17 /* Modified by E Stone Nov 1974 to correct declaration of acl_input */ 18 /* Modified 07/77 by THVV for bad_dir_ check */ 19 20 21 /* 22* entry: match(count,owner,acl_start_ptr,acl_entry_ptr,list_match_ptr,offset,code) 23* This entry is used to indicate where to add an acl or if match occurs ,in which acl to replace mode. 24* 25* 26* 1. count is max length of acl, used for loop detection 27* 2. owner is uid needed in each acle 28* 3. acl_start_ptr pts to the acl frp in the entry (Input) 29* 4. acl_entry_ptr pts to the following structure (Input) 30* dcl 1 acl_input based aligned, 31* 2 person char(32), 32* 2 project char(32), 33* 2 tag char(1), 34* 2 mode bit(36), 35* 2 ex_mode bit(36); 36* 37* 5. list_match_ptr pts to acl entry on match - see below (Output) 38* 6. offset is the number of the acl entry where searching for match stopped 39* 7. code is a standard error code used with list_match_ptr to give info on match 40* 41* _c_o_d_e 42* 0 list_match_ptr pts to the matching acl entry 43* error_table_$empty_acl no acl exists and list_match_ptr will be null 44* error_table_$user_not_found if list_match_ptr is null then add acl entry to bottom of list , 45* . else list_match_ptr pts to acl entry where matching failed; i.e. the 46* . entry before which acl should be added. 47* anything else error. 48**/ 49 50 dcl 1 acl_input based aligned, 51 2 person char (32), 52 2 project char (32), 53 2 tag char (1), 54 2 mode bit (36), 55 2 ex_mode bit (36); 56 57 dcl count fixed bin; /* parameter */ 58 dcl owner bit (36); /* parameter */ 59 dcl (acl_start_ptr, acl_entry_ptr, list_match_ptr) ptr; /* parameter */ 60 61 dcl person char (32) aligned; 62 dcl project char (32) aligned; 63 dcl nnp ptr; 64 dcl (i, offset, len) fixed bin; 65 dcl code fixed bin (35); 66 67 dcl (rtrim, length, null, ptr) builtin; 68 dcl bad_dir_ condition; 69 70 dcl (error_table_$empty_acl, error_table_$user_not_found) ext fixed bin (35); 71 dcl error_table_$argerr ext fixed bin (35); 72 73 dcl (star_pers, star_proj, star_tag) bit (1) aligned; 74 dcl (pers_eq, proj_eq, tag_eq) bit (1) aligned; 75 dcl (persrp, projrp, rp) bit (18) aligned; 76 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 */ 77 2 1 /* BEGIN INCLUDE FILE ... fs_types.incl.pl1 */ 2 2 2 3 dcl ACCESS_NAME_TYPE bit (18) static options (constant) init ("000001"b3); 2 4 dcl ACLE_TYPE bit (18) static options (constant) init ("000002"b3); 2 5 dcl DIR_HEADER_TYPE bit (18) static options (constant) init ("000003"b3); 2 6 dcl DIR_TYPE bit (18) static options (constant) init ("000004"b3); 2 7 dcl LINK_TYPE bit (18) static options (constant) init ("000005"b3); 2 8 dcl NAME_TYPE bit (18) static options (constant) init ("000006"b3); 2 9 dcl SEG_TYPE bit (18) static options (constant) init ("000007"b3); 2 10 dcl HASH_TABLE_TYPE bit (18) static options (constant) init ("000013"b3); 2 11 2 12 dcl access_name_type fixed bin static options (constant) init (1); 2 13 dcl acle_type fixed bin static options (constant) init (2); 2 14 dcl dir_header_type fixed bin static options (constant) init (3); 2 15 dcl dir_type fixed bin static options (constant) init (4); 2 16 dcl link_type fixed bin static options (constant) init (5); 2 17 dcl name_type fixed bin static options (constant) init (6); 2 18 dcl seg_type fixed bin static options (constant) init (7); 2 19 dcl hash_table_type fixed bin static options (constant) init (11); 2 20 2 21 /* END INCLUDE FILE ... fs_types.incl.pl1 */ 78 79 80 /* */ 81 82 /* * * * * * * * * * */ 83 84 match: entry (count, owner, acl_start_ptr, acl_entry_ptr, list_match_ptr, offset, code); 85 86 /* first check if list is empty */ 87 /* brp is used as frp may point to start of perm slots 88* in an entry */ 89 90 code, offset = 0; 91 list_match_ptr = null; 92 aclep = acl_start_ptr; /* copy pointer to head of acl */ 93 94 if aclep -> acl_entry.brp = "0"b then do; 95 code = error_table_$empty_acl; 96 return; 97 end; 98 99 /* do checks on person name */ 100 person = acl_entry_ptr -> acl_input.person; /* copy person name into local string */ 101 if length (rtrim (person)) > 28 then goto bad_name; 102 if person = "*" then star_pers = "1"b; 103 else star_pers = "0"b; /* flag if person name is "*" */ 104 105 project = acl_entry_ptr -> acl_input.project; /* copy project name into local string */ 106 if project = "" | length (rtrim (project)) > 28 then go to bad_name; 107 if project = "*" then star_proj = "1"b; 108 else star_proj = "0"b; /* flag if project is "*" */ 109 110 if acl_entry_ptr -> acl_input.tag = "*" then star_tag = "1"b; /* flag if tag is "*" */ 111 else star_tag = "0"b; 112 113 /* first put into local store the list's acl names, 114* then check if thens names are "*", if so then check 115* input acl for "*", else lengths are checked, and if 116* equal, then the character strings */ 117 118 i = 0; 119 do rp = aclep -> acl_entry.frp repeat aclep -> acl_entry.frp while (rp); 120 121 offset = offset + 1; /* offset in acl list */ 122 aclep = ptr (aclep, rp); /* get pointer to acl */ 123 i = i + 1; 124 if i > count 125 | aclep -> acl_entry.owner ^= owner 126 | aclep -> acl_entry.type ^= ACLE_TYPE then signal bad_dir_; 127 pers_eq, proj_eq, tag_eq = "0"b; /* set flags to say components not equal */ 128 129 persrp = aclep -> acl_entry.name.pers_rp; /* get rp to person name of acl entry */ 130 if persrp ^= "0"b then 131 if ^star_pers then do; /* if neither input name nor acl name = "*", compare them */ 132 nnp = ptr (aclep, persrp); 133 if nnp -> access_name.type ^= ACCESS_NAME_TYPE then signal bad_dir_; 134 if nnp -> access_name.name = person then pers_eq = "1"b; /* person names match */ 135 go to compare_project; 136 end; 137 else go to next_acl; /* if input name = "*", look at next acl */ 138 else if ^star_pers then go to no_eq; /* if have reached a "*" in acl, not a match */ 139 pers_eq = "1"b; /* both person names are "*" */ 140 compare_project: 141 projrp = aclep -> acl_entry.name.proj_rp; /* get rp to project on acl entry */ 142 if projrp ^= "0"b then /* if neither input name nor acl name = "*", */ 143 if ^star_proj then do; /* compare them */ 144 nnp = ptr (aclep, projrp); 145 if nnp -> access_name.type ^= ACCESS_NAME_TYPE then signal bad_dir_; 146 if nnp -> access_name.name = project then proj_eq = "1"b; /* project names match */ 147 go to compare_tag; 148 end; 149 else go to next_acl; /* if input name = "*", look at next acl */ 150 else if ^star_proj then go to no_eq; /* if have reached a "*" in acl, not a match */ 151 proj_eq = "1"b; /* both project names are "*" */ 152 compare_tag: 153 if aclep -> acl_entry.name.tag ^= "*" then 154 if ^star_tag then /* compare both tags if not "*" */ 155 if aclep -> acl_entry.name.tag = acl_entry_ptr -> acl_input.tag then do; 156 tag_eq = "1"b; /* tags match */ 157 if pers_eq then if proj_eq then go to mate; 158 end; 159 else go to next_acl; /* tags are unequal */ 160 else go to next_acl; /* if input tag = "*", look at next acl entry */ 161 else if ^star_tag then go to no_eq; /* if acl tag is "*", no possible match */ 162 else do; /* both "*" */ 163 tag_eq = "1"b; /* tags match */ 164 if pers_eq then if proj_eq then go to mate; 165 end; 166 167 next_acl: end; 168 169 /* no matches have occured and bottom of list has been 170* reached */ 171 code = error_table_$user_not_found; /* returning bottom of list condition */ 172 return; 173 174 no_eq: code = error_table_$user_not_found; 175 list_match_ptr = aclep; 176 return; 177 178 mate: list_match_ptr = aclep; 179 return; 180 181 bad_name: code = error_table_$argerr; 182 return; 183 184 end acc_list_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0839.4 acc_list_.pl1 >special_ldd>install>MR12.3-1114>acc_list_.pl1 77 1 04/29/76 1048.9 dir_acl.incl.pl1 >ldd>include>dir_acl.incl.pl1 78 2 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. ACCESS_NAME_TYPE constant bit(18) initial packed unaligned dcl 2-3 ref 133 145 ACLE_TYPE constant bit(18) initial packed unaligned dcl 2-4 ref 124 access_name based structure level 1 dcl 1-29 acl_entry based structure level 1 dcl 1-7 acl_entry_ptr parameter pointer dcl 59 ref 84 100 105 110 152 acl_input based structure level 1 dcl 50 acl_start_ptr parameter pointer dcl 59 ref 84 92 aclep 000144 automatic pointer dcl 1-5 set ref 92* 94 119 122* 122 124 124 129 132 140 144 152 152 167 175 178 bad_dir_ 000124 stack reference condition dcl 68 ref 124 133 145 brp 0(18) based bit(18) level 2 packed packed unaligned dcl 1-7 ref 94 code parameter fixed bin(35,0) dcl 65 set ref 84 90* 95* 171* 174* 181* count parameter fixed bin(17,0) dcl 57 ref 84 124 error_table_$argerr 000014 external static fixed bin(35,0) dcl 71 ref 181 error_table_$empty_acl 000010 external static fixed bin(35,0) dcl 70 ref 95 error_table_$user_not_found 000012 external static fixed bin(35,0) dcl 70 ref 171 174 frp based bit(18) level 2 packed packed unaligned dcl 1-7 ref 119 167 i 000122 automatic fixed bin(17,0) dcl 64 set ref 118* 123* 123 124 length builtin function dcl 67 ref 101 106 list_match_ptr parameter pointer dcl 59 set ref 84 91* 175* 178* name 4 based char(32) level 2 in structure "access_name" dcl 1-29 in procedure "acc_list_" ref 134 146 name 2 based structure level 2 in structure "acl_entry" packed packed unaligned dcl 1-7 in procedure "acc_list_" nnp 000120 automatic pointer dcl 63 set ref 132* 133 134 144* 145 146 null builtin function dcl 67 ref 91 offset parameter fixed bin(17,0) dcl 64 set ref 84 90* 121* 121 owner parameter bit(36) packed unaligned dcl 58 in procedure "acc_list_" ref 84 124 owner 6 based bit(36) level 2 in structure "acl_entry" dcl 1-7 in procedure "acc_list_" ref 124 pers_eq 000135 automatic bit(1) dcl 74 set ref 127* 134* 139* 157 164 pers_rp 2 based bit(18) level 3 packed packed unaligned dcl 1-7 ref 129 person based char(32) level 2 in structure "acl_input" dcl 50 in procedure "acc_list_" ref 100 person 000100 automatic char(32) dcl 61 in procedure "acc_list_" set ref 100* 101 102 134 persrp 000140 automatic bit(18) dcl 75 set ref 129* 130 132 proj_eq 000136 automatic bit(1) dcl 74 set ref 127* 146* 151* 157 164 proj_rp 2(18) based bit(18) level 3 packed packed unaligned dcl 1-7 ref 140 project 10 based char(32) level 2 in structure "acl_input" dcl 50 in procedure "acc_list_" ref 105 project 000110 automatic char(32) dcl 62 in procedure "acc_list_" set ref 105* 106 106 107 146 projrp 000141 automatic bit(18) dcl 75 set ref 140* 142 144 ptr builtin function dcl 67 ref 122 132 144 rp 000142 automatic bit(18) dcl 75 set ref 119* 119* 122* rtrim builtin function dcl 67 ref 101 106 star_pers 000132 automatic bit(1) dcl 73 set ref 102* 103* 130 138 star_proj 000133 automatic bit(1) dcl 73 set ref 107* 108* 142 150 star_tag 000134 automatic bit(1) dcl 73 set ref 110* 111* 152 161 tag 3 based char(1) level 3 in structure "acl_entry" packed packed unaligned dcl 1-7 in procedure "acc_list_" ref 152 152 tag 20 based char(1) level 2 in structure "acl_input" dcl 50 in procedure "acc_list_" ref 110 152 tag_eq 000137 automatic bit(1) dcl 74 set ref 127* 156* 163* type 1 based bit(18) level 2 in structure "access_name" packed packed unaligned dcl 1-29 in procedure "acc_list_" ref 133 145 type 1 based bit(18) level 2 in structure "acl_entry" packed packed unaligned dcl 1-7 in procedure "acc_list_" ref 124 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DIR_HEADER_TYPE internal static bit(18) initial packed unaligned dcl 2-5 DIR_TYPE internal static bit(18) initial packed unaligned dcl 2-6 HASH_TABLE_TYPE internal static bit(18) initial packed unaligned dcl 2-10 LINK_TYPE internal static bit(18) initial packed unaligned dcl 2-7 NAME_TYPE internal static bit(18) initial packed unaligned dcl 2-8 SEG_TYPE internal static bit(18) initial packed unaligned dcl 2-9 access_name_type internal static fixed bin(17,0) initial dcl 2-12 acle_type internal static fixed bin(17,0) initial dcl 2-13 dir_header_type internal static fixed bin(17,0) initial dcl 2-14 dir_type internal static fixed bin(17,0) initial dcl 2-15 hash_table_type internal static fixed bin(17,0) initial dcl 2-19 len automatic fixed bin(17,0) dcl 64 link_type internal static fixed bin(17,0) initial dcl 2-16 name_type internal static fixed bin(17,0) initial dcl 2-17 seg_type internal static fixed bin(17,0) initial dcl 2-18 NAMES DECLARED BY EXPLICIT CONTEXT. acc_list_ 000011 constant entry external dcl 14 bad_name 000353 constant label dcl 181 ref 101 106 compare_project 000236 constant label dcl 140 ref 135 compare_tag 000274 constant label dcl 152 ref 147 match 000025 constant entry external dcl 84 mate 000350 constant label dcl 178 ref 157 164 next_acl 000331 constant label dcl 167 ref 130 142 152 152 no_eq 000342 constant label dcl 174 ref 138 150 161 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 436 454 357 446 Length 656 357 16 165 57 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME acc_list_ 103 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME acc_list_ 000100 person acc_list_ 000110 project acc_list_ 000120 nnp acc_list_ 000122 i acc_list_ 000132 star_pers acc_list_ 000133 star_proj acc_list_ 000134 star_tag acc_list_ 000135 pers_eq acc_list_ 000136 proj_eq acc_list_ 000137 tag_eq acc_list_ 000140 persrp acc_list_ 000141 projrp acc_list_ 000142 rp acc_list_ 000144 aclep acc_list_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac signal_op ext_entry NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$argerr error_table_$empty_acl error_table_$user_not_found LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000010 84 000016 90 000032 91 000035 92 000037 94 000042 95 000045 96 000047 100 000050 101 000055 102 000070 103 000077 105 000100 106 000103 107 000122 108 000131 110 000132 111 000140 118 000141 119 000142 121 000150 122 000152 123 000155 124 000156 127 000175 129 000200 130 000204 132 000207 133 000213 134 000222 135 000231 138 000232 139 000234 140 000236 142 000242 144 000245 145 000251 146 000260 147 000267 150 000270 151 000272 152 000274 156 000312 157 000314 158 000320 161 000321 163 000323 164 000325 167 000331 171 000335 172 000341 174 000342 175 000346 176 000347 178 000350 179 000352 181 000353 182 000355 ----------------------------------------------------------- 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