COMPILATION LISTING OF SEGMENT check_path_name_ 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.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 check_path_name_: proc(pp,plen,cacl,whoami,dirp,entp,npp,ecount,eptr,nptr,retc); 12 13 /* This procedure is used by the access commands to expand given path names, to check them for stars, 14* and to call hcs_$star_ if appropriate. */ 15 16 /* initially coded by M. Weaver 21 March 1970 */ 17 /* last modified by M. Weaver 8 October 1970 */ 18 19 dcl arg char(plen) unaligned based(pathp); 20 dcl (dirname based(dirp), pathname) char(168) aligned; 21 dcl dname char(168) var int static; 22 dcl entname char(32) aligned based(entp); 23 dcl ename char(32) aligned based(q); 24 dcl gt char(1) var int static; /* contains ">" or " " */ 25 dcl whoami char(16) aligned; 26 dcl new_path char(168) aligned based(npp); /* for full path name for identification */ 27 dcl (pathp, dirp, entp, pp, npp, areap, q, eptr, nptr, (ep, np, mp) int static) ptr; 28 dcl (cacl, csw int static) bit(1) aligned; 29 dcl (plen, scode, code, retc, ecount, lng, j int static) fixed bin(17); 30 dcl 1 entries(0:99) aligned based(eptr), /* structure returned by hcs_$star_ */ 31 2 type bit(2) unaligned, 32 2 nname bit(16) unaligned, 33 2 nindex bit(18) unaligned; 34 dcl names(0:499) char(32) based(nptr) aligned; 35 36 dcl (ioa_$rsnnl, com_err_) entry options(variable); 37 dcl hcs_$star_ entry(char(*) aligned, char(*) aligned, fixed bin, ptr, fixed bin, ptr, ptr, fixed bin), 38 get_wdir_ entry(char(168) aligned); 39 dcl (addr, fixed, index, null, substr) builtin; 40 dcl expand_path_ ext entry(ptr, fixed bin(17), ptr, ptr, fixed bin(17)); 41 dcl check_star_ ext entry(ptr, fixed bin(17), fixed bin(17)); 42 dcl freen_ ext entry(ptr); 43 dcl get_system_free_area_ ext entry returns(ptr); 44 45 /* * * * * * * * * * * * * * * * * * * * * * */ 46 47 retc = 2; /* assume error until finish */ 48 49 /* check for working directory */ 50 if pp->arg = "-wd" then go to wdr; 51 else if pp->arg = "-wdir" then do; 52 wdr: pathp = addr(pathname); 53 call get_wdir_(pathname); 54 plen = index(pathname, " ") - 1; 55 if plen < 0 then plen = 168; 56 end; 57 else pathp = pp; 58 59 /* get dirname and entname */ 60 call expand_path_(pathp, plen, dirp, entp, code); 61 if code ^= 0 then do; 62 err1: call com_err_(code,whoami,arg); 63 return; 64 end; 65 66 if substr(dirname, 1, 4) = "> " /* Check to see if pathname */ 67 then if substr(entname, 1, 4) = " " /* is the root, AFTER expansion */ 68 then do; 69 if cacl then do; 70 new_path = ">"; 71 go to rset; 72 end; 73 else do; 74 call com_err_(0, whoami, "There is no ACL on the root."); 75 return; 76 end; 77 end; 78 79 call check_star_(entp, 32, scode); /* see if there are stars in the name */ 80 81 if dirname = "> " then gt = ""; /* don't want ">>" to appear in a pathname */ 82 else gt = ">"; 83 84 if scode = 0 then do; /* no stars */ 85 call ioa_$rsnnl("^a^a^a",new_path,lng,dirname,gt,entname); 86 rset: retc = 0; 87 if cacl then dirname = new_path; 88 ecount = 1; 89 end; 90 91 else if scode < 3 then do; /* have stars */ 92 eptr, nptr = null; 93 areap = get_system_free_area_(); 94 call hcs_$star_(dirname,entname,2,areap,ecount,eptr,nptr,code); 95 if code ^= 0 then do; 96 call com_err_(code,whoami,arg); 97 if eptr ^= null then call freen_(eptr); 98 if nptr ^= null then call freen_(nptr); 99 return; /* can't get pathnames to use */ 100 end; 101 if cacl then do; 102 csw = "1"b; /* set internal static cacl switch */ 103 if substr(dirname,167,1) ^= " " then do; 104 call com_err_(0, whoami, "Directory name too long to use with star convention. ^a", 105 dirname); 106 return; 107 end; 108 end; 109 else csw = "0"b; /* no cacl */ 110 dname = substr(dirname,1,index(dirname, " ")-1); /* dname is var and is used several times */ 111 mp = npp; /* store the pointer to the path name for messages */ 112 ep = eptr; /* store pointers from hcs_$star_ */ 113 np = nptr; 114 j = 0; 115 retc = 1; 116 end; 117 118 else do; /* scode > 2 */ 119 120 code = scode; /* Print message for check_star_ error ($badstar) */ 121 go to err1; 122 123 end; 124 125 if cacl then entname = " "; 126 return; 127 128 129 indiv: entry(dpr,epr,ssw); 130 131 /* In this entry, mp->new_path will always be set; for CACLs, dirname will be set equal to mp->new_path; 132* for ACLs, epr will be set to point to the appropriate entry name. */ 133 134 dcl (dpr, epr) ptr; /* these correspand to dirp and entp but can't have same names */ 135 dcl ssw bit(1) aligned; 136 137 if ep->entries(j).type ^= "10"b then do; /* not a directory */ 138 ssw = "1"b; 139 if csw then go to ret; /* want only directories for cacl commands */ 140 end; 141 else ssw = "0"b; /* have a directory */ 142 143 q = addr(np->names(fixed(ep->entries(j).nindex,18)-1)); /* get address of entry name */ 144 mp->new_path = dname || gt || ename; 145 if csw then 146 dpr->dirname = mp->new_path; 147 else 148 epr = q; 149 ret: j = j + 1; /* update entry count */ 150 151 return; 152 end check_path_name_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1624.3 check_path_name_.pl1 >dumps>old>recomp>check_path_name_.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. addr builtin function dcl 39 ref 52 143 areap 000154 automatic pointer dcl 27 set ref 93* 94* arg based char unaligned dcl 19 set ref 50 51 62* 96* cacl parameter bit(1) dcl 28 ref 11 69 87 101 125 check_star_ 000110 constant entry external dcl 41 ref 79 code 000161 automatic fixed bin(17,0) dcl 29 set ref 60* 61 62* 94* 95 96* 120* com_err_ 000100 constant entry external dcl 36 ref 62 74 96 104 csw 000074 internal static bit(1) dcl 28 set ref 102* 109* 139 145 dirname based char(168) dcl 20 set ref 66 81 85* 87* 94* 103 104* 110 110 145* dirp parameter pointer dcl 27 set ref 11 60* 66 81 85 87 94 103 104 110 110 dname 000010 internal static varying char(168) dcl 21 set ref 110* 144 dpr parameter pointer dcl 134 ref 129 145 ecount parameter fixed bin(17,0) dcl 29 set ref 11 88* 94* ename based char(32) dcl 23 ref 144 entname based char(32) dcl 22 set ref 66 85* 94* 125* entp parameter pointer dcl 27 set ref 11 60* 66 79* 85 94 125 entries based structure array level 1 dcl 30 ep 000066 internal static pointer dcl 27 set ref 112* 137 143 epr parameter pointer dcl 134 set ref 129 147* eptr parameter pointer dcl 27 set ref 11 92* 94* 97 97* 112 expand_path_ 000106 constant entry external dcl 40 ref 60 fixed builtin function dcl 39 ref 143 freen_ 000112 constant entry external dcl 42 ref 97 98 get_system_free_area_ 000114 constant entry external dcl 43 ref 93 get_wdir_ 000104 constant entry external dcl 37 ref 53 gt 000064 internal static varying char(1) dcl 24 set ref 81* 82* 85* 144 hcs_$star_ 000102 constant entry external dcl 37 ref 94 index builtin function dcl 39 ref 54 110 ioa_$rsnnl 000076 constant entry external dcl 36 ref 85 j 000075 internal static fixed bin(17,0) dcl 29 set ref 114* 137 143 149* 149 lng 000162 automatic fixed bin(17,0) dcl 29 set ref 85* mp 000072 internal static pointer dcl 27 set ref 111* 144 145 names based char(32) array dcl 34 set ref 143 new_path based char(168) dcl 26 set ref 70* 85* 87 144* 145 nindex 0(18) based bit(18) array level 2 packed unaligned dcl 30 ref 143 np 000070 internal static pointer dcl 27 set ref 113* 143 npp parameter pointer dcl 27 ref 11 70 85 87 111 nptr parameter pointer dcl 27 set ref 11 92* 94* 98 98* 113 null builtin function dcl 39 ref 92 97 98 pathname 000100 automatic char(168) dcl 20 set ref 52 53* 54 pathp 000152 automatic pointer dcl 27 set ref 52* 57* 60* 62 96 plen parameter fixed bin(17,0) dcl 29 set ref 11 50 51 54* 55 55* 60* 62 62 96 96 pp parameter pointer dcl 27 ref 11 50 51 57 q 000156 automatic pointer dcl 27 set ref 143* 144 147 retc parameter fixed bin(17,0) dcl 29 set ref 11 47* 86* 115* scode 000160 automatic fixed bin(17,0) dcl 29 set ref 79* 84 91 120 ssw parameter bit(1) dcl 135 set ref 129 138* 141* substr builtin function dcl 39 ref 66 66 103 110 type based bit(2) array level 2 packed unaligned dcl 30 ref 137 whoami parameter char(16) dcl 25 set ref 11 62* 74* 96* 104* NAMES DECLARED BY EXPLICIT CONTEXT. check_path_name_ 000063 constant entry external dcl 11 err1 000155 constant label dcl 62 ref 121 indiv 000660 constant entry external dcl 129 ret 000756 constant label dcl 149 ref 139 rset 000350 constant label dcl 86 ref 71 wdr 000106 constant label dcl 52 ref 50 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1102 1220 762 1112 Length 1416 762 116 161 120 66 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME check_path_name_ 209 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 dname check_path_name_ 000064 gt check_path_name_ 000066 ep check_path_name_ 000070 np check_path_name_ 000072 mp check_path_name_ 000074 csw check_path_name_ 000075 j check_path_name_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME check_path_name_ 000100 pathname check_path_name_ 000152 pathp check_path_name_ 000154 areap check_path_name_ 000156 q check_path_name_ 000160 scode check_path_name_ 000161 code check_path_name_ 000162 lng check_path_name_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. check_star_ com_err_ expand_path_ freen_ get_system_free_area_ get_wdir_ hcs_$star_ ioa_$rsnnl NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000053 47 000070 50 000073 51 000102 52 000106 53 000110 54 000116 55 000127 56 000132 57 000133 60 000134 61 000153 62 000155 63 000202 66 000203 69 000214 70 000217 71 000224 74 000225 75 000252 79 000253 81 000270 82 000302 84 000307 85 000311 86 000350 87 000352 88 000364 89 000366 91 000367 92 000371 93 000374 94 000402 95 000450 96 000452 97 000477 98 000513 99 000527 101 000530 102 000534 103 000537 104 000546 106 000576 108 000577 109 000600 110 000602 111 000624 112 000627 113 000632 114 000635 115 000636 116 000640 120 000641 121 000642 125 000643 126 000653 129 000654 137 000665 138 000673 139 000676 140 000700 141 000701 143 000703 144 000711 145 000743 147 000755 149 000756 151 000757 ----------------------------------------------------------- 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