COMPILATION LISTING OF SEGMENT access_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/06/88 1102.7 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* *********************************************************** */ 8 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(88-07-05,TLNguyen), approve(88-06-13,MCR7919), 14* audit(88-07-26,RBarstad), install(88-08-08,MR12.2-1078): 15* fix bug which fails to set the desired access mode on MSFs. 16* END HISTORY COMMENTS */ 17 18 19 access_: proc; 20 return; 21 22 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 23 /* */ 24 /* Name: access_ */ 25 /* */ 26 /* This subroutine can be called by subsystems to temporarily set the ACL of a */ 27 /* particular segment, directory or MSF, and then to restore the ACL to its original */ 28 /* state. Only ACLs are affected. AIM classification and ring brackets are not changed. */ 29 /* */ 30 /* Status: */ 31 /* 0) Created by: G. C. Dixon, May, 1982 */ 32 /* */ 33 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 34 35 36 37 dcl dir char(*), /* dir part of path whose access sb set. (In) */ 38 ent char(*), /* entry part of path whose access sb set. (In) */ 39 type fixed bin(2), /* type of entry: (In) */ 40 /* 1 = SEGMENT */ 41 /* 2 = DIRECTORY */ 42 /* 3 = MSF or SEGMENT */ 43 mode bit(*), /* mode to be set. Must be a file mode or a */ 44 /* directory mode, depending upon type. (In) */ 45 Paccess ptr, /* ptr to access_$reset info. (Out) */ 46 code fixed bin(35); /* status code from setting/reseting (Out) */ 47 48 dcl Pfcb ptr, 49 1 acle aligned, 50 2 access_name char(32), 51 2 mode bit(36), 52 2 xmode bit(36), 53 2 code fixed bin(35), 54 1 delete_acle aligned, 55 2 access_name char(32), 56 2 code fixed bin(35), 57 1 dir_acle aligned, 58 2 access_name char(32), 59 2 mode bit(36), 60 2 code fixed bin(35); 61 62 dcl 1 access aligned based (Paccess), 63 2 version char(8) init("access_1"), 64 2 set fixed bin init(0), /* has access been set: */ 65 /* 0 = NO */ 66 /* 1 = ACL_ADDED */ 67 /* 2 = ACL_REPLACED */ 68 2 type fixed bin(2), /* entry type (SEGMENT, DIRECTORY or MSF) */ 69 2 old_mode bit(36), /* mode to be reset when ACL_REPLACED. */ 70 2 dir char(168) unal, /* dir/ent of path whose access was changed. */ 71 2 ent char(32) unal, 72 area area based(Parea); 73 74 dcl (addr, null) builtin; 75 76 dcl cleanup condition; 77 78 dcl get_group_id_ entry() returns(char(32)), 79 get_system_free_area_ entry() returns(ptr), 80 hcs_$add_acl_entries entry (char(*), char(*), ptr, fixed bin, fixed bin(35)), 81 hcs_$add_dir_acl_entries entry (char(*), char(*), ptr, fixed bin, fixed bin(35)), 82 hcs_$delete_acl_entries entry (char(*), char(*), ptr, fixed bin, fixed bin(35)), 83 hcs_$delete_dir_acl_entries entry (char(*), char(*), ptr, fixed bin, fixed bin(35)), 84 hcs_$list_acl entry (char(*), char(*), ptr, ptr, ptr, fixed bin, fixed bin(35)), 85 hcs_$list_dir_acl entry (char(*), char(*), ptr, ptr, ptr, fixed bin, fixed bin(35)), 86 msf_manager_$acl_add entry (ptr, ptr, fixed bin, fixed bin(35)), 87 msf_manager_$acl_delete entry (ptr, ptr, fixed bin, fixed bin(35)), 88 msf_manager_$acl_list entry (ptr, ptr, ptr, ptr, fixed bin, fixed bin(35)), 89 msf_manager_$close entry (ptr), 90 msf_manager_$open entry (char(*), char(*), ptr, fixed bin(35)); 91 92 dcl Parea ptr int static init(null), 93 (NO init(0), /* access.set values */ 94 ACL_ADDED init(1), 95 ACL_REPLACED init(2), 96 SEGMENT init(1), /* access.type values */ 97 MSF init(3)) fixed bin int static options(constant), 98 access_name char(32) int static init(""), 99 (error_table_$out_of_bounds, 100 error_table_$unimplemented_version, 101 error_table_$user_not_found) fixed bin(35) ext static; 102 103 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 104 105 106 set_temporarily: 107 entry (dir, ent, type, mode, Paccess, code); 108 109 Paccess = null; 110 if Parea = null then do; 111 Parea = get_system_free_area_(); 112 access_name = get_group_id_(); 113 end; 114 115 if type < SEGMENT | type > MSF then do; 116 code = error_table_$out_of_bounds; 117 go to EXIT; 118 end; 119 120 allocate access in (area); 121 access.dir = dir; 122 access.ent = ent; 123 access.type = type; 124 go to SET(access.type); 125 126 SET(1): acle.access_name = access_name; /* Handle segment ACL. */ 127 acle.mode = ""b; 128 acle.xmode = ""b; 129 call hcs_$list_acl (dir, ent, null, null, addr(acle), 1, code); 130 if code ^= 0 then go to EXIT; 131 if acle.code = error_table_$user_not_found then do; 132 access.old_mode = ""b; 133 access.set = ACL_ADDED; 134 end; 135 else if acle.mode = mode then go to EXIT; 136 else do; 137 access.old_mode = acle.mode; 138 access.set = ACL_REPLACED; 139 end; 140 acle.mode = mode; 141 call hcs_$add_acl_entries (dir, ent, addr(acle), 1, code); 142 if code ^= 0 then go to EXIT; 143 return; 144 145 SET(2): dir_acle.access_name = access_name; 146 dir_acle.mode = ""b; 147 call hcs_$list_dir_acl (dir, ent, null, null, addr(dir_acle), 1, code); 148 if code ^= 0 then go to EXIT; 149 if dir_acle.code = error_table_$user_not_found then do; 150 access.old_mode = ""b; 151 access.set = ACL_ADDED; 152 end; 153 else if dir_acle.mode = mode then go to EXIT; 154 else do; 155 access.old_mode = dir_acle.mode; 156 access.set = ACL_REPLACED; 157 end; 158 dir_acle.mode = mode; 159 call hcs_$add_dir_acl_entries (dir, ent, addr(dir_acle), 1, code); 160 if code ^= 0 then go to EXIT; 161 return; 162 163 SET(3): Pfcb = null; 164 on cleanup begin; 165 call msf_manager_$close (Pfcb); 166 end; 167 call msf_manager_$open (dir, ent, Pfcb, code); 168 if code ^= 0 then go to EXIT; 169 acle.access_name = access_name; 170 acle.mode = ""b; 171 acle.xmode = ""b; 172 call msf_manager_$acl_list (Pfcb, null, null, addr(acle), 1, code); 173 if code ^= 0 then go to MSF_EXIT; 174 if acle.code = error_table_$user_not_found then do; 175 access.old_mode = ""b; 176 access.set = ACL_ADDED; 177 end; 178 else if acle.mode = mode then go to MSF_EXIT; 179 else do; 180 access.old_mode = acle.mode; 181 access.set = ACL_REPLACED; 182 end; 183 acle.mode = mode; /* fill in the desired mode */ 184 call msf_manager_$acl_add (Pfcb, addr(acle), 1, code); 185 if code ^= 0 then go to MSF_EXIT; 186 call msf_manager_$close (Pfcb); 187 return; 188 189 MSF_EXIT: call msf_manager_$close(Pfcb); 190 Pfcb = null; 191 192 EXIT: if Paccess ^= null then do; 193 free access in (area); 194 Paccess = null; 195 end; 196 return; 197 198 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 199 200 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 201 202 203 reset: entry (Paccess, code); 204 205 code = 0; 206 if Paccess = null then return; 207 if access.version ^= "access_1" then do; 208 code = error_table_$unimplemented_version; 209 go to EXIT; 210 end; 211 if access.set = NO then go to EXIT; 212 go to RESET(access.type); 213 214 RESET(1): go to SEG_RESET(access.set); /* Reset segment ACL. */ 215 216 SEG_RESET(1): /* Delete ACL entry previously added. */ 217 delete_acle.access_name = access_name; 218 call hcs_$delete_acl_entries (access.dir, access.ent, addr(delete_acle), 1, code); 219 go to EXIT; 220 221 SEG_RESET(2): /* Replace ACL entry with previous mode value. */ 222 acle.access_name = access_name; 223 acle.mode = access.old_mode; 224 acle.xmode = ""b; 225 call hcs_$add_acl_entries (access.dir, access.ent, addr(acle), 1, code); 226 go to EXIT; 227 228 229 RESET(2): go to DIR_RESET(access.set); 230 231 DIR_RESET(1): 232 delete_acle.access_name = access_name; 233 call hcs_$delete_dir_acl_entries (access.dir, access.ent, addr(delete_acle), 1, code); 234 go to EXIT; 235 236 DIR_RESET(2): 237 dir_acle.access_name = access_name; 238 dir_acle.mode = access.old_mode; 239 call hcs_$add_dir_acl_entries (access.dir, access.ent, addr(dir_acle), 1, code); 240 go to EXIT; 241 242 RESET(3): Pfcb = null; 243 on cleanup begin; 244 call msf_manager_$close (Pfcb); 245 end; 246 call msf_manager_$open (access.dir, access.ent, Pfcb, code); 247 if code ^= 0 then go to EXIT; 248 go to MSF_RESET(access.set); 249 250 MSF_RESET(1): 251 delete_acle.access_name = access_name; 252 call msf_manager_$acl_delete (Pfcb, addr(delete_acle), 1, code); 253 go to MSF_EXIT; 254 255 MSF_RESET(2): 256 acle.access_name = access_name; 257 acle.mode = access.old_mode; 258 acle.xmode = ""b; 259 call msf_manager_$acl_add (Pfcb, addr(acle), 1, code); 260 go to MSF_EXIT; 261 262 end access_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/06/88 1102.8 access_.pl1 >spec>install>1137>access_.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_ADDED constant fixed bin(17,0) initial dcl 92 ref 133 151 176 ACL_REPLACED constant fixed bin(17,0) initial dcl 92 ref 138 156 181 MSF constant fixed bin(17,0) initial dcl 92 ref 115 NO constant fixed bin(17,0) initial dcl 92 ref 211 Paccess parameter pointer dcl 37 set ref 106 109* 120* 121 122 123 124 132 133 137 138 150 151 155 156 175 176 180 181 192 193 194* 203 206 207 211 212 214 218 218 223 225 225 229 233 233 238 239 239 246 246 248 257 Parea 000010 internal static pointer initial dcl 92 set ref 110 111* 120 193 Pfcb 000100 automatic pointer dcl 48 set ref 163* 165* 167* 172* 184* 186* 189* 190* 242* 244* 246* 252* 259* SEGMENT constant fixed bin(17,0) initial dcl 92 ref 115 access based structure level 1 dcl 62 set ref 120 193 access_name 000012 internal static char(32) initial packed unaligned dcl 92 in procedure "access_" set ref 112* 126 145 169 216 221 231 236 250 255 access_name 000102 automatic char(32) level 2 in structure "acle" dcl 48 in procedure "access_" set ref 126* 169* 221* 255* access_name 000126 automatic char(32) level 2 in structure "dir_acle" dcl 48 in procedure "access_" set ref 145* 236* access_name 000115 automatic char(32) level 2 in structure "delete_acle" dcl 48 in procedure "access_" set ref 216* 231* 250* acle 000102 automatic structure level 1 dcl 48 set ref 129 129 141 141 172 172 184 184 225 225 259 259 addr builtin function dcl 74 ref 129 129 141 141 147 147 159 159 172 172 184 184 218 218 225 225 233 233 239 239 252 252 259 259 area based area(1024) dcl 62 ref 120 193 cleanup 000140 stack reference condition dcl 76 ref 164 243 code parameter fixed bin(35,0) dcl 37 in procedure "access_" set ref 106 116* 129* 130 141* 142 147* 148 159* 160 167* 168 172* 173 184* 185 203 205* 208* 218* 225* 233* 239* 246* 247 252* 259* code 12 000102 automatic fixed bin(35,0) level 2 in structure "acle" dcl 48 in procedure "access_" set ref 131 174 code 11 000126 automatic fixed bin(35,0) level 2 in structure "dir_acle" dcl 48 in procedure "access_" set ref 149 delete_acle 000115 automatic structure level 1 dcl 48 set ref 218 218 233 233 252 252 dir parameter char packed unaligned dcl 37 in procedure "access_" set ref 106 121 129* 141* 147* 159* 167* dir 5 based char(168) level 2 in structure "access" packed packed unaligned dcl 62 in procedure "access_" set ref 121* 218* 225* 233* 239* 246* dir_acle 000126 automatic structure level 1 dcl 48 set ref 147 147 159 159 239 239 ent 57 based char(32) level 2 in structure "access" packed packed unaligned dcl 62 in procedure "access_" set ref 122* 218* 225* 233* 239* 246* ent parameter char packed unaligned dcl 37 in procedure "access_" set ref 106 122 129* 141* 147* 159* 167* error_table_$out_of_bounds 000054 external static fixed bin(35,0) dcl 92 ref 116 error_table_$unimplemented_version 000056 external static fixed bin(35,0) dcl 92 ref 208 error_table_$user_not_found 000060 external static fixed bin(35,0) dcl 92 ref 131 149 174 get_group_id_ 000022 constant entry external dcl 78 ref 112 get_system_free_area_ 000024 constant entry external dcl 78 ref 111 hcs_$add_acl_entries 000026 constant entry external dcl 78 ref 141 225 hcs_$add_dir_acl_entries 000030 constant entry external dcl 78 ref 159 239 hcs_$delete_acl_entries 000032 constant entry external dcl 78 ref 218 hcs_$delete_dir_acl_entries 000034 constant entry external dcl 78 ref 233 hcs_$list_acl 000036 constant entry external dcl 78 ref 129 hcs_$list_dir_acl 000040 constant entry external dcl 78 ref 147 mode 10 000102 automatic bit(36) level 2 in structure "acle" dcl 48 in procedure "access_" set ref 127* 135 137 140* 170* 178 180 183* 223* 257* mode 10 000126 automatic bit(36) level 2 in structure "dir_acle" dcl 48 in procedure "access_" set ref 146* 153 155 158* 238* mode parameter bit packed unaligned dcl 37 in procedure "access_" ref 106 135 140 153 158 178 183 msf_manager_$acl_add 000042 constant entry external dcl 78 ref 184 259 msf_manager_$acl_delete 000044 constant entry external dcl 78 ref 252 msf_manager_$acl_list 000046 constant entry external dcl 78 ref 172 msf_manager_$close 000050 constant entry external dcl 78 ref 165 186 189 244 msf_manager_$open 000052 constant entry external dcl 78 ref 167 246 null builtin function dcl 74 ref 109 110 129 129 129 129 147 147 147 147 163 172 172 172 172 190 192 194 206 242 old_mode 4 based bit(36) level 2 dcl 62 set ref 132* 137* 150* 155* 175* 180* 223 238 257 set 2 based fixed bin(17,0) initial level 2 dcl 62 set ref 120* 133* 138* 151* 156* 176* 181* 211 214 229 248 type parameter fixed bin(2,0) dcl 37 in procedure "access_" ref 106 115 115 123 type 3 based fixed bin(2,0) level 2 in structure "access" dcl 62 in procedure "access_" set ref 123* 124 212 version based char(8) initial level 2 dcl 62 set ref 120* 207 xmode 11 000102 automatic bit(36) level 2 dcl 48 set ref 128* 171* 224* 258* NAMES DECLARED BY EXPLICIT CONTEXT. DIR_RESET 000010 constant label array(2) dcl 231 ref 229 EXIT 000731 constant label dcl 192 ref 117 130 135 142 148 153 160 168 209 211 219 226 234 240 247 MSF_EXIT 000720 constant label dcl 189 ref 173 178 185 253 260 MSF_RESET 000012 constant label array(2) dcl 250 ref 248 RESET 000003 constant label array(3) dcl 214 ref 212 SEG_RESET 000006 constant label array(2) dcl 216 ref 214 SET 000000 constant label array(3) dcl 126 ref 124 access_ 000033 constant entry external dcl 19 reset 000746 constant entry external dcl 203 set_temporarily 000047 constant entry external dcl 106 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1622 1704 1356 1632 Length 2116 1356 62 175 244 12 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME access_ 150 external procedure is an external procedure. on unit on line 164 68 on unit on unit on line 243 68 on unit STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 Parea access_ 000012 access_name access_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME access_ 000100 Pfcb access_ 000102 acle access_ 000115 delete_acle access_ 000126 dir_acle access_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac enable_op ext_entry ext_entry_desc int_entry op_alloc_ op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_group_id_ get_system_free_area_ hcs_$add_acl_entries hcs_$add_dir_acl_entries hcs_$delete_acl_entries hcs_$delete_dir_acl_entries hcs_$list_acl hcs_$list_dir_acl msf_manager_$acl_add msf_manager_$acl_delete msf_manager_$acl_list msf_manager_$close msf_manager_$open THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$out_of_bounds error_table_$unimplemented_version error_table_$user_not_found LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000032 20 000040 106 000041 109 000101 110 000103 111 000107 112 000115 115 000124 116 000132 117 000135 120 000136 121 000150 122 000156 123 000163 124 000165 126 000166 127 000172 128 000173 129 000174 130 000242 131 000244 132 000250 133 000253 134 000255 135 000256 137 000265 138 000271 140 000273 141 000301 142 000336 143 000340 145 000341 146 000345 147 000346 148 000414 149 000416 150 000422 151 000425 152 000427 153 000430 155 000437 156 000443 158 000445 159 000453 160 000510 161 000512 163 000513 164 000515 165 000531 166 000540 167 000541 168 000570 169 000572 170 000576 171 000577 172 000600 173 000627 174 000631 175 000635 176 000640 177 000642 178 000643 180 000652 181 000656 183 000660 184 000666 185 000706 186 000710 187 000717 189 000720 190 000727 192 000731 193 000735 194 000737 196 000741 203 000742 205 000760 206 000761 207 000765 208 000773 209 000776 211 000777 212 001001 214 001003 216 001004 218 001010 219 001044 221 001045 223 001051 224 001053 225 001054 226 001110 229 001111 231 001112 233 001116 234 001152 236 001153 238 001157 239 001161 240 001215 242 001216 243 001220 244 001234 245 001243 246 001244 247 001273 248 001275 250 001301 252 001305 253 001325 255 001326 257 001332 258 001334 259 001335 260 001355 ----------------------------------------------------------- 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