COMPILATION LISTING OF SEGMENT gcos_daemon_init_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/19/82 1000.5 mst Fri 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 /* ****************************************************************************** 12* * * 13* * Written by P. Haber * 14* * Modified by R.H. Morrison March,1975 * 15* * * 16* ****************************************************************************** */ 17 18 19 gcos_daemon_init_: proc (fatal_error); 20 21 /* DECLARATIONS */ 22 /* ------------ */ 23 24 dcl ( 25 gcos_daemon$abs_overflow_handler ext /* bypass compiler problem */ 26 ) fixed; 27 28 29 30 /* fixed bin */ 31 /* ----- --- */ 32 33 dcl ( 34 mode /* access to directory */ 35 ) fixed bin (5) aligned; 36 37 dcl ( 38 rbs (3) init (5, 5, 5) /* ring brackets for append call */ 39 ) fixed bin (6) aligned; 40 41 dcl ( 42 gcos_daemon_stat_$anonymous_user_len ext, 43 gcos_daemon_stat_$default_home_dir_len ext, 44 gcos_daemon_stat_$input_dir_len ext, 45 gcos_daemon_stat_$max_priority ext, 46 gcos_daemon_stat_$pool_dir_len ext, 47 gcos_daemon_stat_$root_dir_len ext, 48 i /* loop index */ 49 ) fixed bin aligned; 50 51 dcl ( 52 code, /* error code */ 53 error_table_$namedup ext 54 ) fixed bin (35) aligned; 55 56 dcl ( 57 channel_name, /* name of created event channel */ 58 gcos_daemon_stat_$overflow_channel ext 59 ) fixed bin (71) aligned; 60 61 /* pointers */ 62 /* -------- */ 63 64 dcl ( 65 aclp, /* pointer to acl data */ 66 sp /* pointer to return status from ios_ calls */ 67 ) ptr aligned; 68 69 /* bit strings */ 70 /* --- ------- */ 71 72 dcl ( 73 fatal_error /* ON if fatal error encountered during initialization */ 74 ) bit (1) aligned; 75 76 dcl ( 77 gcos_daemon_stat_$process_id ext /* process id of gcos daemon */ 78 ) bit (36) aligned; 79 80 dcl ( 81 status_stuff /* returned status from ios_ calls */ 82 ) bit (72) aligned; 83 84 /* character strings */ 85 /* --------- ------- */ 86 87 dcl ( 88 gcos_daemon_stat_$snumb ext 89 ) char (6) aligned; 90 91 dcl ( 92 account, /* user's account */ 93 en, /* entry portion of dir name */ 94 gcos_daemon_stat_$anonymous_user ext, /* name of anonymous user */ 95 group_id, /* from get_group_id */ 96 name, /* user's name */ 97 project /* user's project */ 98 ) char (32) aligned; 99 100 101 dcl ( 102 dn, /* dir portion of directory */ 103 gcos_daemon_stat_$default_home_dir ext, 104 gcos_daemon_stat_$input_dir ext, 105 gcos_daemon_stat_$pool_dir ext, 106 gcos_daemon_stat_$root_dir ext, 107 dir_name 108 ) char (168) aligned; 109 110 /* masks */ 111 /* ----- */ 112 113 dcl 1 status aligned based (sp), /* mask for ios_ status */ 114 2 code fixed bin (35); /* code portion */ 115 116 /* structures */ 117 /* ---------- */ 118 119 dcl 1 dir_acl (2) aligned, /* for possible call to add_dir_acl */ 120 2 access_name char (32) aligned, 121 2 dir_modes bit (36) aligned, 122 2 a_code fixed bin (35) aligned; 123 124 125 /* built-in */ 126 /* -------- */ 127 128 dcl ( 129 addr, 130 null, 131 substr 132 ) builtin; 133 134 /* conditions */ 135 136 dcl ( 137 quit 138 ) condition; 139 140 141 /* external entries */ 142 /* -------- ------- */ 143 144 dcl change_wdir_ ext entry 145 (char (168) aligned, fixed bin (35) aligned); 146 147 dcl com_err_ ext entry 148 options (variable); 149 150 dcl expand_path_ ext entry 151 (ptr aligned, fixed bin aligned, ptr aligned, ptr aligned, fixed bin (35) aligned); 152 153 dcl gcos_daemon_init_$early_quit ext entry; 154 155 dcl get_group_id_$tag_star ext entry 156 returns (char (32) aligned); 157 158 dcl get_process_id_ ext entry 159 returns (bit (36) aligned); 160 161 dcl hcs_$add_dir_acl_entries ext entry 162 (char (*) aligned, char (*) aligned, ptr aligned, fixed bin aligned, fixed bin (35) aligned); 163 164 dcl hcs_$append_branchx ext entry 165 (char (*) aligned, char (*) aligned, fixed bin (5) aligned, (3) fixed bin (6) aligned, char (*) aligned, 166 fixed bin (1) aligned, fixed bin (1) aligned, fixed bin (24) aligned, fixed bin (35) aligned); 167 168 dcl hcs_$get_user_effmode ext entry 169 (char (*) aligned, char (*) aligned, char (*) aligned, fixed bin aligned, fixed bin (5) aligned, 170 fixed bin (35) aligned); 171 172 dcl ioa_ ext entry 173 options (variable); 174 175 dcl ios_$resetread ext entry 176 (char (*) aligned, bit (72) aligned); 177 178 dcl ios_$order ext entry 179 (char (*) aligned, char (*) aligned, ptr aligned, bit (72) aligned); 180 181 dcl ipc_$create_ev_chn ext entry 182 (fixed bin (71) aligned, fixed bin (35) aligned); 183 184 dcl ipc_$decl_ev_call_chn ext entry 185 (fixed bin (71) aligned, ptr aligned, ptr aligned, fixed bin aligned, fixed bin (35) aligned); 186 187 dcl user_info_ ext entry 188 (char (*) aligned, char (*) aligned, char (*) aligned); 189 190 /* */ 191 192 call user_info_ (name, project, account); /* determine callers' project */ 193 if name ^= "GCOS"| 194 project ^= "SysDaemon" /* not being called by init_admin_ */ 195 then do; /* caller should use test entry */ 196 call com_err_ (0, "gcos_daemon_init_", "Use test entry"); 197 fatal_error = "1"b; 198 return; 199 end; 200 201 gd_test: entry (fatal_error); /* entry for testing from user process */ 202 call init_pointers; 203 on condition (quit) 204 call gcos_daemon_init_$early_quit; 205 206 call ios_$order ("user_i/o", "quit_enable", null, status_stuff); 207 if status.code ^= 0 208 then do; 209 call com_err_ (status.code, "gcos_daemon_init_", "Order call to enable quits"); 210 fatal_error = "1"b; 211 return; 212 end; 213 214 fatal_error = "0"b; /* initialize argument */ 215 216 group_id = get_group_id_$tag_star (); /* get user name */ 217 218 dir_acl (1).access_name = group_id; /* fill in acl structure for calls */ 219 dir_acl (2).access_name = substr (gcos_daemon_stat_$anonymous_user, 1, gcos_daemon_stat_$anonymous_user_len); 220 do i = 1 to 2; 221 dir_acl (i).dir_modes = "111000000000000000000000000000000000"b; 222 end; 223 224 do dir_name = substr (gcos_daemon_stat_$root_dir, 1, gcos_daemon_stat_$root_dir_len), 225 substr (gcos_daemon_stat_$pool_dir, 1, gcos_daemon_stat_$pool_dir_len), 226 substr (gcos_daemon_stat_$default_home_dir, 1, gcos_daemon_stat_$default_home_dir_len), 227 substr (gcos_daemon_stat_$input_dir, 1, gcos_daemon_stat_$input_dir_len); 228 229 do i = 168 to 1 by -1 while (substr (dir_name, i, 1) = " "); 230 end; 231 232 call expand_path_ (addr (dir_name), i, addr (dn), addr (en), code); 233 if code ^= 0 234 then go to END_LOOP; 235 236 call hcs_$append_branchx (dn, en, 01011b, rbs, group_id, 1, 0, 0, code); 237 if code ^= 0 238 then if code ^= error_table_$namedup /* returned if dir already exists */ 239 then go to END_LOOP; 240 241 do i = 1 to 2; /* init return code */ 242 dir_acl (i).a_code = 0; 243 end; 244 245 call hcs_$add_dir_acl_entries (dn, en, aclp, 2, code); /* set minimum acl */ 246 if code ^= 0 /* error setting acl */ 247 then if code ^= error_table_$namedup /* returned if all names are on acl */ 248 then go to END_LOOP; 249 250 end; 251 252 END_LOOP: 253 254 if code = 0 /* access on dirs okay */ 255 then call change_wdir_ (dir_name, code); /* switch to input dir */ 256 257 if code ^= 0 /* an error occurred in checking or switching to dir */ 258 then do; 259 call com_err_ (code, "gcos_daemon_init_", dir_name); 260 fatal_error = "1"b; 261 end; 262 263 gcos_daemon_stat_$snumb = ""; /* initialize current snumb */ 264 265 call ipc_$create_ev_chn (channel_name, code); /* create channel to signal quota overflows */ 266 if code ^= 0 267 then do; 268 call com_err_ (code, "gcos_daemon_init_", "Error creating event channel"); 269 fatal_error = "1"b; 270 return; 271 end; 272 273 call ipc_$decl_ev_call_chn (channel_name, addr (gcos_daemon$abs_overflow_handler), null, 0, code); 274 if code ^= 0 275 then do; 276 call com_err_ (code, "gcos_daemon_init_", "Error converting event channel to call channel"); 277 fatal_error = "1"b; 278 return; 279 end; 280 281 gcos_daemon_stat_$overflow_channel = channel_name; 282 283 gcos_daemon_stat_$process_id = get_process_id_ (); 284 285 gcos_daemon_stat_$max_priority = 1; 286 287 return; 288 289 /* */ 290 291 early_quit: entry; 292 293 call init_pointers; 294 call ios_$resetread ("user_i/o", status_stuff); 295 code = status.code; 296 if code ^= 0 297 then do; 298 call com_err_ (code, "gcos_daemon_init_", "Error resetting user_i/o"); 299 fatal_error = "1"b; 300 return; 301 end; 302 303 call ioa_ ("QUIT^/START"); 304 return; 305 /* */ 306 /* INTERNAL PROCEDURES */ 307 308 init_pointers: proc; 309 aclp = addr (dir_acl (1).access_name); /* pointer to acl data */ 310 sp = addr (status_stuff); /* pointer to return status from ios_ calls */ 311 return; 312 end init_pointers; 313 314 end gcos_daemon_init_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/19/82 0929.5 gcos_daemon_init_.pl1 >spec>on>11/19/82>gcos_daemon_init_.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. a_code 11 000312 automatic fixed bin(35,0) array level 2 dcl 119 set ref 242* access_name 000312 automatic char(32) array level 2 dcl 119 set ref 218* 219* 309 account 000116 automatic char(32) dcl 91 set ref 192* aclp 000110 automatic pointer dcl 64 set ref 245* 309* addr builtin function dcl 128 ref 232 232 232 232 232 232 273 273 309 310 change_wdir_ 000050 constant entry external dcl 144 ref 252 channel_name 000106 automatic fixed bin(71,0) dcl 56 set ref 265* 273* 281 code based fixed bin(35,0) level 2 in structure "status" dcl 113 in procedure "gcos_daemon_init_" set ref 207 209* 295 code 000104 automatic fixed bin(35,0) dcl 51 in procedure "gcos_daemon_init_" set ref 232* 233 236* 237 237 245* 246 246 252 252* 257 259* 265* 266 268* 273* 274 276* 295* 296 298* com_err_ 000052 constant entry external dcl 147 ref 196 209 259 268 276 298 dir_acl 000312 automatic structure array level 1 dcl 119 dir_modes 10 000312 automatic bit(36) array level 2 dcl 119 set ref 221* dir_name 000240 automatic char(168) dcl 101 set ref 224* 229 232 232* 252* 259* dn 000166 automatic char(168) dcl 101 set ref 232 232 236* 245* en 000126 automatic char(32) dcl 91 set ref 232 232 236* 245* error_table_$namedup 000026 external static fixed bin(35,0) dcl 51 ref 237 246 expand_path_ 000054 constant entry external dcl 150 ref 232 fatal_error parameter bit(1) dcl 72 set ref 19 197* 201 210* 214* 260* 269* 277* 299* gcos_daemon$abs_overflow_handler 000010 external static fixed bin(17,0) dcl 24 set ref 273 273 gcos_daemon_init_$early_quit 000056 constant entry external dcl 153 ref 203 gcos_daemon_stat_$anonymous_user 000036 external static char(32) dcl 91 ref 219 gcos_daemon_stat_$anonymous_user_len 000012 external static fixed bin(17,0) dcl 41 ref 219 gcos_daemon_stat_$default_home_dir 000040 external static char(168) dcl 101 ref 224 gcos_daemon_stat_$default_home_dir_len 000014 external static fixed bin(17,0) dcl 41 ref 224 gcos_daemon_stat_$input_dir 000042 external static char(168) dcl 101 ref 224 gcos_daemon_stat_$input_dir_len 000016 external static fixed bin(17,0) dcl 41 ref 224 gcos_daemon_stat_$max_priority 000020 external static fixed bin(17,0) dcl 41 set ref 285* gcos_daemon_stat_$overflow_channel 000030 external static fixed bin(71,0) dcl 56 set ref 281* gcos_daemon_stat_$pool_dir 000044 external static char(168) dcl 101 ref 224 gcos_daemon_stat_$pool_dir_len 000022 external static fixed bin(17,0) dcl 41 ref 224 gcos_daemon_stat_$process_id 000032 external static bit(36) dcl 76 set ref 283* gcos_daemon_stat_$root_dir 000046 external static char(168) dcl 101 ref 224 gcos_daemon_stat_$root_dir_len 000024 external static fixed bin(17,0) dcl 41 ref 224 gcos_daemon_stat_$snumb 000034 external static char(6) dcl 87 set ref 263* get_group_id_$tag_star 000060 constant entry external dcl 155 ref 216 get_process_id_ 000062 constant entry external dcl 158 ref 283 group_id 000136 automatic char(32) dcl 91 set ref 216* 218 236* hcs_$add_dir_acl_entries 000064 constant entry external dcl 161 ref 245 hcs_$append_branchx 000066 constant entry external dcl 164 ref 236 i 000103 automatic fixed bin(17,0) dcl 41 set ref 220* 221* 229* 229* 232* 241* 242* ioa_ 000070 constant entry external dcl 172 ref 303 ios_$order 000074 constant entry external dcl 178 ref 206 ios_$resetread 000072 constant entry external dcl 175 ref 294 ipc_$create_ev_chn 000076 constant entry external dcl 181 ref 265 ipc_$decl_ev_call_chn 000100 constant entry external dcl 184 ref 273 name 000146 automatic char(32) dcl 91 set ref 192* 193 null builtin function dcl 128 ref 206 206 273 273 project 000156 automatic char(32) dcl 91 set ref 192* 193 quit 000336 stack reference condition dcl 136 ref 203 rbs 000100 automatic fixed bin(6,0) initial array dcl 37 set ref 37* 37* 37* 236* sp 000112 automatic pointer dcl 64 set ref 207 209 295 310* status based structure level 1 dcl 113 status_stuff 000114 automatic bit(72) dcl 80 set ref 206* 294* 310 substr builtin function dcl 128 ref 219 224 224 224 224 229 user_info_ 000102 constant entry external dcl 187 ref 192 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. hcs_$get_user_effmode 000000 constant entry external dcl 168 mode automatic fixed bin(5,0) dcl 33 NAMES DECLARED BY EXPLICIT CONTEXT. END_LOOP 000663 constant label dcl 252 ref 233 237 246 early_quit 001100 constant entry external dcl 291 gcos_daemon_init_ 000143 constant entry external dcl 19 gd_test 000242 constant entry external dcl 201 init_pointers 001205 constant entry internal dcl 308 ref 202 293 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1620 1724 1214 1630 Length 2154 1214 104 213 403 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME gcos_daemon_init_ 338 external procedure is an external procedure. on unit on line 203 64 on unit init_pointers internal procedure shares stack frame of external procedure gcos_daemon_init_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME gcos_daemon_init_ 000100 rbs gcos_daemon_init_ 000103 i gcos_daemon_init_ 000104 code gcos_daemon_init_ 000106 channel_name gcos_daemon_init_ 000110 aclp gcos_daemon_init_ 000112 sp gcos_daemon_init_ 000114 status_stuff gcos_daemon_init_ 000116 account gcos_daemon_init_ 000126 en gcos_daemon_init_ 000136 group_id gcos_daemon_init_ 000146 name gcos_daemon_init_ 000156 project gcos_daemon_init_ 000166 dn gcos_daemon_init_ 000240 dir_name gcos_daemon_init_ 000312 dir_acl gcos_daemon_init_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. change_wdir_ com_err_ expand_path_ gcos_daemon_init_$early_quit get_group_id_$tag_star get_process_id_ hcs_$add_dir_acl_entries hcs_$append_branchx ioa_ ios_$order ios_$resetread ipc_$create_ev_chn ipc_$decl_ev_call_chn user_info_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$namedup gcos_daemon$abs_overflow_handler gcos_daemon_stat_$anonymous_user gcos_daemon_stat_$anonymous_user_len gcos_daemon_stat_$default_home_dir gcos_daemon_stat_$default_home_dir_len gcos_daemon_stat_$input_dir gcos_daemon_stat_$input_dir_len gcos_daemon_stat_$max_priority gcos_daemon_stat_$overflow_channel gcos_daemon_stat_$pool_dir gcos_daemon_stat_$pool_dir_len gcos_daemon_stat_$process_id gcos_daemon_stat_$root_dir gcos_daemon_stat_$root_dir_len gcos_daemon_stat_$snumb LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 37 000123 19 000140 192 000151 193 000170 196 000200 197 000233 198 000236 201 000237 202 000250 203 000251 206 000272 207 000330 209 000332 210 000361 211 000364 214 000365 216 000367 218 000376 219 000401 220 000407 221 000414 222 000417 224 000421 229 000431 230 000442 232 000445 233 000472 236 000474 237 000551 241 000556 242 000563 243 000565 245 000567 246 000622 250 000627 252 000663 257 000676 259 000700 260 000724 263 000727 265 000734 266 000744 268 000746 269 000775 270 001000 273 001001 274 001025 276 001027 277 001056 278 001061 281 001062 283 001065 285 001073 287 001076 291 001077 293 001106 294 001107 295 001126 296 001130 298 001131 299 001163 300 001166 303 001167 304 001204 308 001205 309 001206 310 001210 311 001212 ----------------------------------------------------------- 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