COMPILATION LISTING OF SEGMENT set_system_priv Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-17_1928.14_Mon_mdt 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 /* format: style4 */ 11 set_system_priv: proc; 12 13 14 /* initially coded by J. Whitmore - 10/15/74 */ 15 /* modified at some point by C.T. Tavares for rcp priv. */ 16 /* modified for better usage message, 1/81 by M.R. Jordan */ 17 /* modified for comm privilege, 5/83 by E. N. Kittlitz */ 18 19 /* This command allows the user with access to the system_privilege_ gate 20* to turn on and off the individual system privilege bits for his process */ 21 22 23 dcl ME char (15) static options (constant) init ("set_system_priv"); 24 25 dcl aptr ptr, 26 alen fixed bin, 27 arg char (alen) based (aptr); 28 29 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)), 30 cu_$arg_count entry (fixed bin, fixed bin (35)), 31 (ioa_, com_err_) entry options (variable), 32 (system_privilege_$ipc_priv_on, 33 system_privilege_$ipc_priv_off, 34 system_privilege_$dir_priv_on, 35 system_privilege_$dir_priv_off, 36 system_privilege_$seg_priv_on, 37 system_privilege_$seg_priv_off, 38 system_privilege_$ring1_priv_on, 39 system_privilege_$ring1_priv_off, 40 system_privilege_$soos_priv_on, 41 system_privilege_$soos_priv_off, 42 system_privilege_$rcp_priv_on, 43 system_privilege_$rcp_priv_off, 44 system_privilege_$comm_priv_on, 45 system_privilege_$comm_priv_off) entry (fixed bin (35)); 46 47 dcl ec fixed bin (35), 48 action fixed bin (35), 49 nargs fixed bin, 50 ind fixed bin; 51 52 dcl error_table_$badopt ext fixed bin (35); 53 dcl error_table_$noarg fixed bin (35) ext; 54 55 dcl linkage_error condition; 56 57 call cu_$arg_count (nargs, ec); 58 if ec ^= 0 59 then do; 60 call com_err_ (ec, ME); 61 return; 62 end; 63 64 if nargs = 0 65 then do; 66 call com_err_ (error_table_$noarg, ME, 67 "^/Usage: set_system_priv privnames^/^7xwhere a privname can be: ipc, dir, seg, soos, ring1, rcp, or comm.^/^7xEach may be preceeded by ""^"" for negation."); 68 return; 69 end; 70 71 on linkage_error go to abort; /* do something intelligent if user doesn't have access */ 72 73 do ind = 1 to nargs; 74 75 call cu_$arg_ptr (ind, aptr, alen, ec); 76 if ec ^= 0 then do; 77 78 call com_err_ (ec, ME, "^/Accessing argument ^d.", ind); 79 return; 80 81 end; 82 83 if arg = "ipc" then call system_privilege_$ipc_priv_on (action); 84 else if arg = "^ipc" then call system_privilege_$ipc_priv_off (action); 85 else if arg = "dir" then call system_privilege_$dir_priv_on (action); 86 else if arg = "^dir" then call system_privilege_$dir_priv_off (action); 87 else if arg = "seg" then call system_privilege_$seg_priv_on (action); 88 else if arg = "^seg" then call system_privilege_$seg_priv_off (action); 89 else if arg = "soos" then call system_privilege_$soos_priv_on (action); 90 else if arg = "^soos" then call system_privilege_$soos_priv_off (action); 91 else if arg = "ring1" then call system_privilege_$ring1_priv_on (action); 92 else if arg = "^ring1" then call system_privilege_$ring1_priv_off (action); 93 else if arg = "rcp" then call system_privilege_$rcp_priv_on (action); 94 else if arg = "^rcp" then call system_privilege_$rcp_priv_off (action); 95 else if arg = "communications" | arg = "comm" then call system_privilege_$comm_priv_on (action); 96 else if arg = "^communications" | arg = "^comm" then call system_privilege_$comm_priv_off (action); 97 else do; 98 action = 0; 99 ec = error_table_$badopt; 100 call com_err_ (ec, ME, "^a", arg); 101 end; 102 if action ^= 0 then call ioa_ ("Privilege already in state requested: ^a", arg); 103 104 end; 105 106 107 return; 108 109 abort: call com_err_ (0, ME, 110 "This command requires privileged access not given to this user."); 111 /* don't worry about the state of the privileges, because */ 112 /* we got here do to insufficient access to the gate */ 113 return; 114 115 end set_system_priv; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/17/00 1928.1 set_system_priv.pl1 >udd>sm>ds>w>ml>set_system_priv.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. ME 000000 constant char(15) initial packed unaligned dcl 23 set ref 60* 66* 78* 100* 109* action 000104 automatic fixed bin(35,0) dcl 47 set ref 83* 84* 85* 86* 87* 88* 89* 90* 91* 92* 93* 94* 95* 96* 98* 102 alen 000102 automatic fixed bin(17,0) dcl 25 set ref 75* 83 84 85 86 87 88 89 90 91 92 93 94 95 95 96 96 100 100 102 102 aptr 000100 automatic pointer dcl 25 set ref 75* 83 84 85 86 87 88 89 90 91 92 93 94 95 95 96 96 100 102 arg based char packed unaligned dcl 25 set ref 83 84 85 86 87 88 89 90 91 92 93 94 95 95 96 96 100* 102* com_err_ 000016 constant entry external dcl 29 ref 60 66 78 100 109 cu_$arg_count 000012 constant entry external dcl 29 ref 57 cu_$arg_ptr 000010 constant entry external dcl 29 ref 75 ec 000103 automatic fixed bin(35,0) dcl 47 set ref 57* 58 60* 75* 76 78* 99* 100* error_table_$badopt 000054 external static fixed bin(35,0) dcl 52 ref 99 error_table_$noarg 000056 external static fixed bin(35,0) dcl 53 set ref 66* ind 000106 automatic fixed bin(17,0) dcl 47 set ref 73* 75* 78* ioa_ 000014 constant entry external dcl 29 ref 102 linkage_error 000110 stack reference condition dcl 55 ref 71 nargs 000105 automatic fixed bin(17,0) dcl 47 set ref 57* 64 73 system_privilege_$comm_priv_off 000052 constant entry external dcl 29 ref 96 system_privilege_$comm_priv_on 000050 constant entry external dcl 29 ref 95 system_privilege_$dir_priv_off 000026 constant entry external dcl 29 ref 86 system_privilege_$dir_priv_on 000024 constant entry external dcl 29 ref 85 system_privilege_$ipc_priv_off 000022 constant entry external dcl 29 ref 84 system_privilege_$ipc_priv_on 000020 constant entry external dcl 29 ref 83 system_privilege_$rcp_priv_off 000046 constant entry external dcl 29 ref 94 system_privilege_$rcp_priv_on 000044 constant entry external dcl 29 ref 93 system_privilege_$ring1_priv_off 000036 constant entry external dcl 29 ref 92 system_privilege_$ring1_priv_on 000034 constant entry external dcl 29 ref 91 system_privilege_$seg_priv_off 000032 constant entry external dcl 29 ref 88 system_privilege_$seg_priv_on 000030 constant entry external dcl 29 ref 87 system_privilege_$soos_priv_off 000042 constant entry external dcl 29 ref 90 system_privilege_$soos_priv_on 000040 constant entry external dcl 29 ref 89 NAMES DECLARED BY EXPLICIT CONTEXT. abort 000717 constant label dcl 109 ref 71 set_system_priv 000163 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1212 1272 745 1222 Length 1476 745 60 167 244 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME set_system_priv 149 external procedure is an external procedure. on unit on line 71 64 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME set_system_priv 000100 aptr set_system_priv 000102 alen set_system_priv 000103 ec set_system_priv 000104 action set_system_priv 000105 nargs set_system_priv 000106 ind set_system_priv THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac tra_ext_1 enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr ioa_ system_privilege_$comm_priv_off system_privilege_$comm_priv_on system_privilege_$dir_priv_off system_privilege_$dir_priv_on system_privilege_$ipc_priv_off system_privilege_$ipc_priv_on system_privilege_$rcp_priv_off system_privilege_$rcp_priv_on system_privilege_$ring1_priv_off system_privilege_$ring1_priv_on system_privilege_$seg_priv_off system_privilege_$seg_priv_on system_privilege_$soos_priv_off system_privilege_$soos_priv_on THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000162 57 000170 58 000200 60 000202 61 000217 64 000220 66 000222 68 000246 71 000247 73 000266 75 000275 76 000312 78 000314 79 000347 83 000350 84 000366 85 000402 86 000416 87 000432 88 000446 89 000462 90 000476 91 000512 92 000526 93 000542 94 000556 95 000572 96 000612 98 000632 99 000633 100 000636 102 000667 104 000714 107 000716 109 000717 113 000744 ----------------------------------------------------------- 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