COMPILATION LISTING OF SEGMENT find_acl_names_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1756.3 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 find_acl_names_: proc (aptr, acln, aclp, aclcnt, flptr, num, code); 12 13 /* This procedure takes an access name as given to access commands, determines its type, and 14* searches the given ACL for matches. A flag is set for any match. */ 15 16 /* initially coded by M. Weaver 17 March 1970 */ 17 /* last modified by M. Weaver 11 April 1970 5:45 PM */ 18 19 dcl acname char (acln) based (aptr); 20 dcl (name, nm) char (32) var; 21 dcl (temp1, temp2) char (29) var; 22 dcl (aclp, flptr, ap, fp, aptr) ptr; 23 dcl (nfd, i, j, m, n, type, aclcnt, acln, num, typ) fixed bin; 24 dcl code fixed bin (35); 25 dcl flags (0:99) bit (1) aligned based (fp); 26 dcl ft bit (1) aligned; 27 dcl 1 acl (0:99) aligned based (ap), 28 2 userid char (32) aligned, 29 2 pack_bits char (4) aligned; 30 dcl (index, mod, length, substr) builtin; 31 32 /* * * * * * * * * * */ 33 34 /* copy arguments */ 35 ap = aclp; 36 fp = flptr; 37 code = 0; /* code = 1 => all acl names are to be used */ 38 39 ft = "0"b; 40 go to start; 41 42 find_type_: entry (aptr, acln, nm, typ); 43 ft = "1"b; 44 /* this entry is for setacl, which only needs the type, not the search */ 45 46 /* determine structure of acname */ 47 48 start: type = 0; /* initialize */ 49 if acname = "." then go to set_all; 50 n = index (acname, "."); /* find first . */ 51 if n ^= 1 then type = 4; /* pn. or pn.. or pn.pj. or pn.pj.t */ 52 if n = 0 then go to set_name; 53 else if n = acln then do; 54 set_name: name = acname; 55 go to check_t; 56 end; 57 m = index (substr (acname, n+1), "."); /* find second . */ 58 if m = 1 then do; 59 if n + m = acln then do; /* pn.. or .. */ 60 if type = 0 then do; /* .. */ 61 set_all: if ^ft then do; 62 code = 1; 63 num = 0; 64 end; 65 else typ = 8; 66 return; 67 end; 68 else do; /* pn.. */ 69 name = substr (acname, 1, n); 70 go to check_t; 71 end; 72 end; 73 else do; /* pn..t or ..t */ 74 if type = 0 then name = substr (acname, 2) || " "; /* ..t */ 75 else name = acname; /* pn..t */ 76 type = type + 1; 77 go to check_t; 78 end; 79 end; /* end of m = 1 */ 80 81 else do; /* pn.pj.t or pn.pj. or .pj. or .pj.t or pn.pj or .pj */ 82 if m ^= 0 then 83 if n + m ^= acln then type = type + 1; /* pn.pj.t or .pj.t */ 84 type = type + 2; 85 go to set_name; 86 end; 87 88 check_t: if mod (type, 2) = 0 then 89 if substr (name, length (name), 1) ^= "." 90 then name = name || "."; /* pn or pn.pj or .pj */ 91 if ft then do; /* only need type and name for setacl */ 92 typ = type; 93 nm = name; 94 return; 95 end; 96 nfd = 0; /* initialize number found */ 97 98 if type < 4 then /* ..t or .pj. or .pj.t */ 99 do i = 0 to aclcnt; 100 if index (acl (i).userid, name) > 0 then do; 101 flags (i) = "1"b; 102 nfd = nfd+ 1; 103 end; 104 end; 105 106 else if type = 7 then do; /* pn.pj.t */ 107 do i = 0 to aclcnt while (acl (i).userid ^= name); end; 108 if i <= aclcnt then do; 109 flags (i) = "1"b; 110 nfd = 1; 111 end; 112 end; 113 114 else if type = 5 then do; /* pn..t */ 115 temp1 = substr (name, 1, n); /* get pn. */ 116 do i = 0 to aclcnt while (index (acl (i).userid, temp1) ^= 1); end; 117 if i < aclcnt then do; /* found pn. */ 118 temp2 = substr (name, n+1) || " "; 119 do j = i to aclcnt while (index (acl (j).userid, temp1) = 1); 120 if index (acl (j).userid, temp2) ^= 0 then do; /* look for .t */ 121 flags (j) = "1"b; 122 nfd = nfd + 1; 123 end; 124 end; 125 end; 126 end; 127 128 else do; /* type = 4 or 6; pn. or pn.pj. */ 129 do i = 0 to aclcnt while (index (acl (i).userid, name) ^= 1); end; 130 if i <= aclcnt then 131 do j = i to aclcnt while (index (acl (j).userid, name) = 1); 132 flags (j) = "1"b; 133 nfd = nfd + 1; 134 end; 135 end; 136 137 138 /* The acl primitives put all the entries for a person together, and within this 139* grouping they put all the entries for a particular project together. */ 140 141 142 num = nfd; 143 if nfd = aclcnt + 1 then code = 1; 144 return; 145 end find_acl_names_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1624.4 find_acl_names_.pl1 >dumps>old>recomp>find_acl_names_.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. acl based structure array level 1 dcl 27 aclcnt parameter fixed bin(17,0) dcl 23 ref 11 98 107 108 116 117 119 129 130 130 143 acln parameter fixed bin(17,0) dcl 23 ref 11 42 49 50 53 54 57 59 69 74 75 82 aclp parameter pointer dcl 22 ref 11 35 acname based char unaligned dcl 19 ref 49 50 54 57 69 74 75 ap 000134 automatic pointer dcl 22 set ref 35* 100 107 116 119 120 129 130 aptr parameter pointer dcl 22 ref 11 42 49 50 54 57 69 74 75 code parameter fixed bin(35,0) dcl 24 set ref 11 37* 62* 143* flags based bit(1) array dcl 25 set ref 101* 109* 121* 132* flptr parameter pointer dcl 22 ref 11 36 fp 000136 automatic pointer dcl 22 set ref 36* 101 109 121 132 ft 000146 automatic bit(1) dcl 26 set ref 39* 43* 61 91 i 000141 automatic fixed bin(17,0) dcl 23 set ref 98* 100 101* 107* 107* 108 109 116* 116* 117 119 129* 129* 130 130 index builtin function dcl 30 ref 50 57 100 116 119 120 129 130 j 000142 automatic fixed bin(17,0) dcl 23 set ref 119* 119* 120 121* 130* 130* 132* length builtin function dcl 30 ref 88 m 000143 automatic fixed bin(17,0) dcl 23 set ref 57* 58 59 82 82 mod builtin function dcl 30 ref 88 n 000144 automatic fixed bin(17,0) dcl 23 set ref 50* 51 52 53 57 59 69 82 115 118 name 000100 automatic varying char(32) dcl 20 set ref 54* 69* 74* 75* 88 88 88* 88 93 100 107 115 118 129 130 nfd 000140 automatic fixed bin(17,0) dcl 23 set ref 96* 102* 102 110* 122* 122 133* 133 142 143 nm parameter varying char(32) dcl 20 set ref 42 93* num parameter fixed bin(17,0) dcl 23 set ref 11 63* 142* substr builtin function dcl 30 ref 57 69 74 88 115 118 temp1 000111 automatic varying char(29) dcl 21 set ref 115* 116 119 temp2 000122 automatic varying char(29) dcl 21 set ref 118* 120 typ parameter fixed bin(17,0) dcl 23 set ref 42 65* 92* type 000145 automatic fixed bin(17,0) dcl 23 set ref 48* 51* 60 74 76* 76 82* 82 84* 84 88 92 98 106 114 userid based char(32) array level 2 dcl 27 ref 100 107 116 119 120 129 130 NAMES DECLARED BY EXPLICIT CONTEXT. check_t 000233 constant label dcl 88 ref 55 70 77 find_acl_names_ 000012 constant entry external dcl 11 find_type_ 000036 constant entry external dcl 42 set_all 000136 constant label dcl 61 ref 49 set_name 000077 constant label dcl 54 ref 52 85 start 000045 constant label dcl 48 ref 40 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 630 640 574 640 Length 1004 574 10 130 33 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME find_acl_names_ 110 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME find_acl_names_ 000100 name find_acl_names_ 000111 temp1 find_acl_names_ 000122 temp2 find_acl_names_ 000134 ap find_acl_names_ 000136 fp find_acl_names_ 000140 nfd find_acl_names_ 000141 i find_acl_names_ 000142 j find_acl_names_ 000143 m find_acl_names_ 000144 n find_acl_names_ 000145 type find_acl_names_ 000146 ft find_acl_names_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs return mod_fx1 shorten_stack ext_entry set_cs_eis index_cs_eis NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000004 35 000017 36 000023 37 000026 39 000027 40 000030 42 000031 43 000043 48 000045 49 000046 50 000056 51 000067 52 000073 53 000075 54 000077 55 000112 57 000113 58 000127 59 000131 60 000134 61 000136 62 000140 63 000142 64 000143 65 000144 66 000146 69 000147 70 000157 74 000160 75 000206 76 000217 77 000220 79 000221 82 000222 84 000230 85 000232 88 000233 91 000253 92 000255 93 000260 94 000266 96 000267 98 000270 100 000302 101 000313 102 000316 104 000317 106 000322 107 000324 107 000342 108 000344 109 000350 110 000352 112 000354 114 000355 115 000357 116 000367 116 000410 117 000412 118 000416 119 000441 120 000463 121 000472 122 000475 124 000476 126 000500 129 000501 129 000522 130 000524 132 000551 133 000554 134 000555 142 000557 143 000562 144 000570 ----------------------------------------------------------- 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