COMPILATION LISTING OF SEGMENT bjm_attribute_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0847.0 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* This is the target module for most of the calls done by the extended 10* objects software for before journals. We simply set the validation level 11* to the DM ring, forward the call to file_manager_, and reset the 12* validation level. The one operation not here is delentry_file which 13* suffix_bj_ directly transfers to before_journal_manager_. 14* 15* The following are the operations in this module: 16* 17* $add_acl_entries $get_user_access_modes $replace_acl 18* $chname_file $list_acl $validate 19* $delete_acl_entries 20* 21* NOTES: 22* 23* 1) In all the entrypoints except $validate, we simply pass the parameters 24* on to file_manager_ without using them; in $validate we actually use the 25* input parameters so must copy them and pass the copies to file_manager_. 26* 27* 2) We do not currently prevent a user from deleting the Data_Management 28* Daemon's access to a before journal, nor prevent the setting of write 29* only access to any user. If this becomes a problem, then it may can be 30* changed; but probably should be done in conjunction with a change to 31* file_manager_ to protect against users deleting Daemon access from 32* protected files (which will probably require setting off the per-process 33* init first-reference trap). 34**/ 35 36 /* HISTORY: 37* 38*Written by Lee A. Newcomb, 12/13/84. 39*Modified: 40**/ 41 42 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo */ 43 /* format: ^inddcls,dclind5,idind35,linecom */ 44 45 bjm_attribute_$add_acl_entries: 46 proc (p_directory_name, p_entry_name, p_acl_ptr, p_code); 47 48 49 /* START OF DECLARATIONS */ 50 51 /* Parameter */ 52 dcl ( 53 p_acl_ptr ptr, 54 p_code fixed bin (35), 55 p_directory_name char (*), 56 p_entry_name char (*), 57 p_exmodes bit (36) aligned, 58 p_modes bit (36) aligned, 59 p_new_name char (*), 60 p_no_sysdaemon bit (1), 61 p_old_name char (*), 62 p_ring fixed bin, 63 p_user_area_ptr ptr, 64 p_user_name char (*), 65 p_version_wanted char (*) 66 ) parameter; 67 68 /* Automatic */ 69 dcl ( 70 callers_validation_level fixed bin init (-1),/* init -1 for RETURN */ 71 code fixed bin (35) init (0), 72 dirname char (168) init (""), 73 ename char (32) init (""), 74 new_name char (32) init (""), 75 old_name char (32) init (""), 76 dm_ring fixed bin init (-1), 77 ring_brackets dim (2) fixed bin (3) init (-1, -1) 78 ) automatic; 79 80 /* Based */ 81 /* Builtin */ 82 dcl (length, reverse, rtrim, substr) builtin; 83 84 /* Condition */ 85 dcl cleanup condition; 86 87 /* Constant */ 88 /* Entry */ 89 dcl ( 90 cu_$level_get entry (fixed bin), 91 cu_$level_set entry (fixed bin), 92 file_manager_$add_acl_entries entry (char (*), char (*), ptr, 93 fixed bin (35)), 94 file_manager_$chname_file entry (char (*), char (*), char (*), 95 char (*), fixed bin (35)), 96 file_manager_$delete_acl_entries entry (char (*), char (*), ptr, 97 fixed bin (35)), 98 file_manager_$get_ring_brackets entry (char (*), char (*), 99 dim (2) fixed bin (3), fixed bin (35)), 100 file_manager_$get_user_access_modes 101 entry (char (*), char (*), char (*), 102 fixed bin, bit (36) aligned, 103 bit (36) aligned, fixed bin (35)), 104 file_manager_$list_acl entry (char (*), char (*), char (*), 105 ptr, ptr, fixed bin (35)), 106 file_manager_$replace_acl entry (char (*), char (*), ptr, bit, 107 fixed bin (35)), 108 file_manager_$validate entry (char (*), char (*), 109 fixed bin (35)), 110 get_ring_ entry () returns (fixed bin (3)) 111 ) external; 112 113 /* External */ 114 dcl ( 115 dm_error_$bj_invalid_name fixed bin (35), 116 error_table_$not_seg_type fixed bin (35), 117 error_table_$unsupported_operation fixed bin (35) 118 ) external static; 119 120 /* END OF DECLARATIONS */ 121 122 /* repeat main procedure statement for reader's convenience: */ 123 /* */ 124 /* bjm_attribute_$add_acl_entries: */ 125 /* proc (p_directory_name, p_entry_name, p_acl_ptr, p_code); */ 126 127 call cu_$level_get (callers_validation_level); 128 on cleanup call cu_$level_set (callers_validation_level); 129 call cu_$level_set (get_ring_ ()); 130 131 call file_manager_$add_acl_entries (p_directory_name, p_entry_name, 132 p_acl_ptr, code); 133 134 call RETURN (code); 135 136 /* end bjm_attribute_$add_acl_entries; */ 137 138 139 140 141 bjm_attribute_$chname_file: 142 entry (p_directory_name, p_entry_name, p_old_name, p_new_name, p_code); 143 144 /* must copy old and new name parameters as we read >1 times. */ 145 old_name = p_old_name; 146 new_name = p_new_name; 147 148 /* currently we do not allow name deletion; this requires */ 149 /* synchronizing the BJ_PST. */ 150 if old_name ^= "" then 151 call RETURN (error_table_$unsupported_operation); 152 153 /* make sure the .bj suffix is on the new entryname */ 154 if length (rtrim (new_name)) = 0 then /* can't delete a name */ 155 call RETURN (error_table_$unsupported_operation); 156 if length (rtrim (new_name)) <= 3 then /* prevent string range cond. */ 157 call RETURN (dm_error_$bj_invalid_name); 158 if substr (reverse (rtrim (new_name)), 1, 3) ^= "jb." then 159 call RETURN (dm_error_$bj_invalid_name); 160 161 call cu_$level_get (callers_validation_level); 162 on cleanup call cu_$level_set (callers_validation_level); 163 call cu_$level_set (get_ring_ ()); 164 165 call file_manager_$chname_file (p_directory_name, p_entry_name, old_name, 166 new_name, code); 167 168 call RETURN (code); 169 170 /* end bjm_attribute_$chname_file; */ 171 172 173 174 175 bjm_attribute_$delete_acl_entries: 176 entry (p_directory_name, p_entry_name, p_acl_ptr, p_code); 177 178 call cu_$level_get (callers_validation_level); 179 on cleanup call cu_$level_set (callers_validation_level); 180 call cu_$level_set (get_ring_ ()); 181 182 call file_manager_$delete_acl_entries (p_directory_name, p_entry_name, 183 p_acl_ptr, code); 184 185 call RETURN (code); 186 187 /* end bjm_attribute_$delete_acl_entries; */ 188 189 bjm_attribute_$get_user_access_modes: 190 entry (p_directory_name, p_entry_name, p_user_name, p_ring, p_modes, 191 p_exmodes, p_code); 192 193 /* note we ignore the given p_ring and use the current */ 194 /* ring of execution (the process' DM ring, normally */ 195 /* sys_info$data_management_ringno unless testing). */ 196 /* This is because before journals are DM files with RB's */ 197 /* of 2,2 and we have no other RB's on BJ's. */ 198 199 call cu_$level_get (callers_validation_level); 200 on cleanup call cu_$level_set (callers_validation_level); 201 call cu_$level_set (get_ring_ ()); 202 203 call file_manager_$get_user_access_modes (p_directory_name, p_entry_name, 204 p_user_name, get_ring_ (), p_modes, p_exmodes, code); 205 206 call RETURN (code); 207 208 /* end bjm_attribute_$get_user_access_modes */ 209 210 211 212 213 bjm_attribute_$list_acl: 214 entry (p_directory_name, p_entry_name, p_version_wanted, p_user_area_ptr, 215 p_acl_ptr, p_code); 216 217 218 call cu_$level_get (callers_validation_level); 219 on cleanup call cu_$level_set (callers_validation_level); 220 call cu_$level_set (get_ring_ ()); 221 222 call file_manager_$list_acl (p_directory_name, p_entry_name, 223 p_version_wanted, p_user_area_ptr, p_acl_ptr, code); 224 225 call RETURN (code); 226 227 /* end bjm_attribute_$list_acl */ 228 229 230 231 232 bjm_attribute_$replace_acl: 233 entry (p_directory_name, p_entry_name, p_acl_ptr, p_no_sysdaemon, p_code); 234 235 236 call cu_$level_get (callers_validation_level); 237 on cleanup call cu_$level_set (callers_validation_level); 238 call cu_$level_set (get_ring_ ()); 239 240 call file_manager_$replace_acl (p_directory_name, p_entry_name, p_acl_ptr, 241 p_no_sysdaemon, code); 242 243 call RETURN (code); 244 245 /* end bjm_attribute_$replace_acl; */ 246 247 bjm_attribute_$validate: 248 entry (p_directory_name, p_entry_name, p_code); 249 250 /* Note: we first call file_manager_$validate as before journals are */ 251 /* unprotected DM files. If file_manager_ returns an error, we */ 252 /* simply return its returned code. If not, we then check the ring */ 253 /* brackets of the file to make sure they are {DM ring, DM ring}, if */ 254 /* not, we return error_table_$not_seg_type since this is the code */ 255 /* the extended object software expects if the file is not a BJ. */ 256 257 /* must copy parameters as we will use them >1 times */ 258 dirname = p_directory_name; 259 ename = p_entry_name; 260 261 call cu_$level_get (callers_validation_level); 262 on cleanup call cu_$level_set (callers_validation_level); 263 dm_ring = get_ring_ (); 264 call cu_$level_set (dm_ring); 265 266 call file_manager_$validate (dirname, ename, code); 267 if code ^= 0 then 268 call RETURN (code); /* just pass code back, fm_ has set it properly */ 269 270 call file_manager_$get_ring_brackets (dirname, ename, ring_brackets, code); 271 if code ^= 0 then 272 call RETURN (error_table_$not_seg_type); 273 274 if ring_brackets (1) ^= dm_ring | ring_brackets (2) ^= dm_ring then 275 call RETURN (error_table_$not_seg_type); 276 277 call RETURN (0); /* must be a BJ */ 278 279 /* end bjm_attribute_$validate; */ 280 281 MAIN_RETURN: 282 return; 283 284 285 RETURN: 286 proc (r_p_code); 287 288 /* proc to centralize returning to caller for all external entries */ 289 /* and to reset the validation level to that of the caller. */ 290 291 dcl r_p_code fixed bin (35); 292 293 if callers_validation_level > 0 then 294 call cu_$level_set (callers_validation_level); 295 296 p_code = r_p_code; /* tell caller if all is well */ 297 298 go to MAIN_RETURN; 299 300 end RETURN; 301 302 303 end bjm_attribute_$add_acl_entries; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0755.8 bjm_attribute_.pl1 >spec>on>7138.pbf>bjm_attribute_.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. callers_validation_level 000100 automatic fixed bin(17,0) initial dcl 69 set ref 69* 127* 128* 161* 162* 178* 179* 199* 200* 218* 219* 236* 237* 261* 262* 293 293* cleanup 000210 stack reference condition dcl 85 ref 128 162 179 200 219 237 262 code 000101 automatic fixed bin(35,0) initial dcl 69 set ref 69* 131* 134* 165* 168* 182* 185* 203* 206* 222* 225* 240* 243* 266* 267 267* 270* 271 cu_$level_get 000010 constant entry external dcl 89 ref 127 161 178 199 218 236 261 cu_$level_set 000012 constant entry external dcl 89 ref 128 129 162 163 179 180 200 201 219 220 237 238 262 264 293 dirname 000102 automatic char(168) initial unaligned dcl 69 set ref 69* 258* 266* 270* dm_error_$bj_invalid_name 000036 external static fixed bin(35,0) dcl 114 set ref 156* 158* dm_ring 000204 automatic fixed bin(17,0) initial dcl 69 set ref 69* 263* 264* 274 274 ename 000154 automatic char(32) initial unaligned dcl 69 set ref 69* 259* 266* 270* error_table_$not_seg_type 000040 external static fixed bin(35,0) dcl 114 set ref 271* 274* error_table_$unsupported_operation 000042 external static fixed bin(35,0) dcl 114 set ref 150* 154* file_manager_$add_acl_entries 000014 constant entry external dcl 89 ref 131 file_manager_$chname_file 000016 constant entry external dcl 89 ref 165 file_manager_$delete_acl_entries 000020 constant entry external dcl 89 ref 182 file_manager_$get_ring_brackets 000022 constant entry external dcl 89 ref 270 file_manager_$get_user_access_modes 000024 constant entry external dcl 89 ref 203 file_manager_$list_acl 000026 constant entry external dcl 89 ref 222 file_manager_$replace_acl 000030 constant entry external dcl 89 ref 240 file_manager_$validate 000032 constant entry external dcl 89 ref 266 get_ring_ 000034 constant entry external dcl 89 ref 129 129 163 163 180 180 201 201 203 203 220 220 238 238 263 length builtin function dcl 82 ref 154 156 new_name 000164 automatic char(32) initial unaligned dcl 69 set ref 69* 146* 154 156 158 165* old_name 000174 automatic char(32) initial unaligned dcl 69 set ref 69* 145* 150 165* p_acl_ptr parameter pointer dcl 52 set ref 45 131* 175 182* 213 222* 232 240* p_code parameter fixed bin(35,0) dcl 52 set ref 45 141 175 189 213 232 247 296* p_directory_name parameter char unaligned dcl 52 set ref 45 131* 141 165* 175 182* 189 203* 213 222* 232 240* 247 258 p_entry_name parameter char unaligned dcl 52 set ref 45 131* 141 165* 175 182* 189 203* 213 222* 232 240* 247 259 p_exmodes parameter bit(36) dcl 52 set ref 189 203* p_modes parameter bit(36) dcl 52 set ref 189 203* p_new_name parameter char unaligned dcl 52 ref 141 146 p_no_sysdaemon parameter bit(1) unaligned dcl 52 set ref 232 240* p_old_name parameter char unaligned dcl 52 ref 141 145 p_ring parameter fixed bin(17,0) dcl 52 ref 189 p_user_area_ptr parameter pointer dcl 52 set ref 213 222* p_user_name parameter char unaligned dcl 52 set ref 189 203* p_version_wanted parameter char unaligned dcl 52 set ref 213 222* r_p_code parameter fixed bin(35,0) dcl 291 ref 285 296 reverse builtin function dcl 82 ref 158 ring_brackets 000206 automatic fixed bin(3,0) initial array dcl 69 set ref 69* 69* 270* 274 274 rtrim builtin function dcl 82 ref 154 156 158 substr builtin function dcl 82 ref 158 NAMES DECLARED BY EXPLICIT CONTEXT. MAIN_RETURN 001601 constant label dcl 281 ref 298 RETURN 001602 constant entry internal dcl 285 ref 134 150 154 156 158 168 185 206 225 243 267 271 274 277 bjm_attribute_$add_acl_entries 000060 constant entry external dcl 45 bjm_attribute_$chname_file 000220 constant entry external dcl 141 bjm_attribute_$delete_acl_entries 000514 constant entry external dcl 175 bjm_attribute_$get_user_access_modes 000655 constant entry external dcl 189 bjm_attribute_$list_acl 001045 constant entry external dcl 213 bjm_attribute_$replace_acl 001221 constant entry external dcl 232 bjm_attribute_$validate 001364 constant entry external dcl 247 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2242 2306 1632 2252 Length 2554 1632 44 231 410 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bjm_attribute_$add_acl_entries 242 external procedure is an external procedure. on unit on line 128 68 on unit on unit on line 162 68 on unit on unit on line 179 68 on unit on unit on line 200 68 on unit on unit on line 219 68 on unit on unit on line 237 68 on unit on unit on line 262 68 on unit RETURN internal procedure shares stack frame of external procedure bjm_attribute_$add_acl_entrie STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bjm_attribute_$add_acl_entries 000100 callers_validation_level bjm_attribute_$add_acl_entries 000101 code bjm_attribute_$add_acl_entries 000102 dirname bjm_attribute_$add_acl_entries 000154 ename bjm_attribute_$add_acl_entries 000164 new_name bjm_attribute_$add_acl_entries 000174 old_name bjm_attribute_$add_acl_entries 000204 dm_ring bjm_attribute_$add_acl_entries 000206 ring_brackets bjm_attribute_$add_acl_entries THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return enable shorten_stack ext_entry_desc int_entry reverse_cs set_cs_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$level_get cu_$level_set file_manager_$add_acl_entries file_manager_$chname_file file_manager_$delete_acl_entries file_manager_$get_ring_brackets file_manager_$get_user_access_modes file_manager_$list_acl file_manager_$replace_acl file_manager_$validate get_ring_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$bj_invalid_name error_table_$not_seg_type error_table_$unsupported_operation LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 69 000021 45 000053 127 000106 128 000115 129 000141 131 000161 134 000210 141 000212 145 000256 146 000264 150 000271 154 000304 156 000325 158 000347 161 000401 162 000411 163 000435 165 000455 168 000507 175 000511 178 000542 179 000551 180 000575 182 000615 185 000644 189 000646 199 000706 200 000715 201 000741 203 000761 206 001034 213 001036 218 001100 219 001107 220 001133 222 001153 225 001211 232 001213 236 001247 237 001256 238 001302 240 001322 243 001355 247 001357 258 001410 259 001416 261 001423 262 001432 263 001456 264 001467 266 001476 267 001517 270 001523 271 001550 274 001561 277 001576 281 001601 285 001602 293 001604 296 001615 298 001620 ----------------------------------------------------------- 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