COMPILATION LISTING OF SEGMENT rcp_detach_lv_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 0949.9 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(85-07-10,EJSharpe), approve(86-02-20,MCR7304), 17* audit(86-03-27,CLJones), install(86-04-23,MR12.0-1044): 18* added security auditing 19* END HISTORY COMMENTS */ 20 21 22 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 23 rcp_detach_lv_: 24 procedure (arg_rcp_id, arg_ecode); 25 26 /* This procedure implements the rcp_$detach_lv entry point. 27* * Created on 04/08/76 by Bill Silver. 28* * Modified for lv_request_ 09/16/76 by B. Greenberg. 29* * Modified for B2 security cleanup, December 1984 by Chris Jones. 30**/ 31 32 /* 33* * This program is called to detach one logical volume. 34* * We will check to see if this lv is already attached for this process. 35* * If so, we will detach it. Then we will remove it from the 36* * per-process list of attached logical volumes. 37**/ 38 39 dcl arg_rcp_id bit (36) aligned; /* (I) ID of this attachment. */ 40 dcl arg_ecode fixed bin (35); /* (O) error_table_ code. */ 41 42 dcl 1 auto_event_flags aligned like audit_event_flags; 43 dcl caller_level fixed bin; /* Validation level of caller. */ 44 dcl ecode fixed bin (35); /* error_table_code. */ 45 dcl ignore_mode bit (36) aligned; 46 dcl ignore_pubbit bit (1) aligned; 47 dcl lv_access_range (2) bit (72) aligned; /* range of access to LV */ 48 dcl lvid bit (36) aligned; /* ID of logical volume. */ 49 dcl rcp_id bit (36) aligned; /* RCP ID of this attach. */ 50 dcl volume_name_str char (64); /* passed to access_audit_ */ 51 52 dcl access_audit_r1_$log_obj_class_range 53 entry options (variable); 54 dcl admin_gate_$detach_lv entry (bit (36) aligned, fixed bin (35)); 55 dcl cu_$level_get entry entry (fixed bin); 56 dcl cu_$level_set entry (fixed bin); 57 dcl get_ring_ entry () returns (fixed bin (3)); 58 dcl rcp_lv_$check entry (bit (36) aligned, bit (36) aligned, fixed bin, fixed bin (35)); 59 dcl rcp_lv_$del_lv entry (bit (36) aligned, fixed bin (35)); 60 dcl volume_registration_mgr_$get_access_for_attach 61 entry (char (*), fixed bin (3), bit (36) aligned, bit (1) aligned, (2) bit (72) aligned, 62 fixed bin (35)); 63 dcl volume_registration_mgr_$find_lvname 64 entry (bit (36), char (*), fixed bin (35)); 65 66 dcl access_operations_$detach_lv 67 bit (36) aligned external; 68 dcl error_table_$logical_volume_not_connected 69 fixed bin (35) external; 70 dcl sys_info$access_class_ceiling 71 bit (72) aligned external; 72 73 dcl cleanup condition; 74 75 dcl null builtin; 76 dcl string builtin; 77 78 /* Begin rcp_detach_lv_. 79**/ 80 81 call cu_$level_get (caller_level); /* Save caller's validation level. */ 82 83 on cleanup call cu_$level_set (caller_level); 84 85 call cu_$level_set (get_ring_ ()); /* Set validation level to RCP level. */ 86 87 rcp_id = arg_rcp_id; /* Copy argument. */ 88 89 call rcp_lv_$check (rcp_id, lvid, (0), ecode); 90 if ecode ^= 0 then 91 goto RETURN; /* LV not attached for this process. */ 92 93 call admin_gate_$detach_lv (lvid, ecode); 94 if ecode ^= 0 then 95 if ecode = error_table_$logical_volume_not_connected then 96 ecode = 0; 97 else go to RETURN; /* Unable to detach in ring 0. */ 98 99 /*** get information so we can audit the detachment. This should all 100* be moved to a "lv_access_kernel_" module */ 101 call volume_registration_mgr_$find_lvname ((lvid), volume_name_str, ecode); 102 if ecode ^= 0 then do; 103 volume_name_str = "logical volume UNKNOWN"; 104 lv_access_range = sys_info$access_class_ceiling; 105 end; 106 else do; 107 call volume_registration_mgr_$get_access_for_attach (volume_name_str, (caller_level), ignore_mode, 108 ignore_pubbit, lv_access_range, (0)); 109 volume_name_str = "logical volume " || volume_name_str; 110 end; 111 112 string (auto_event_flags) = ""b; 113 auto_event_flags.grant = "1"b; 114 call access_audit_r1_$log_obj_class_range ("rcp_detach_lv_", caller_level, string (auto_event_flags), 115 access_operations_$detach_lv, lv_access_range, volume_name_str, (0), null (), (0)); 116 117 /*** and finally detach it */ 118 call rcp_lv_$del_lv (rcp_id, ecode); /* Delete lv from process list. */ 119 120 RETURN: 121 arg_ecode = ecode; 122 call cu_$level_set (caller_level); /* Reset validation level. */ 123 124 1 1 /* begin include file - access_audit_eventflags.incl.pl1 */ 1 2 /* NOTE: This include file has an ALM counterpart made with cif. 1 3*Keep it up to date. */ 1 4 1 5 dcl 1 audit_event_flags based aligned, 1 6 2 special_op bit (1) unal, /* special sys operation */ 1 7 2 grant bit (1) unal, /* operation was successful */ 1 8 2 admin_op bit (1) unal, /* administrative operation */ 1 9 2 priv_op bit (1) unal, /* privileged operation */ 1 10 2 cc_1_10 bit (1) unal, /* small covert channel */ 1 11 2 cc_10_100 bit (1) unal, /* moderate covert channel */ 1 12 2 receiver bit (1) unal, /* on receiving end of channel */ 1 13 2 pad bit (29) unal; 1 14 1 15 /* end include file - access_audit_eventflags.incl.pl1 */ 125 126 127 end rcp_detach_lv_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0806.7 rcp_detach_lv_.pl1 >spec>install>1111>rcp_detach_lv_.pl1 125 1 01/30/85 1523.9 access_audit_eventflags.incl.pl1 >ldd>include>access_audit_eventflags.incl.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. access_audit_r1_$log_obj_class_range 000010 constant entry external dcl 52 ref 114 access_operations_$detach_lv 000032 external static bit(36) dcl 66 set ref 114* admin_gate_$detach_lv 000012 constant entry external dcl 54 ref 93 arg_ecode parameter fixed bin(35,0) dcl 40 set ref 23 120* arg_rcp_id parameter bit(36) dcl 39 ref 23 87 audit_event_flags based structure level 1 dcl 1-5 auto_event_flags 000100 automatic structure level 1 dcl 42 set ref 112* 114 114 caller_level 000101 automatic fixed bin(17,0) dcl 43 set ref 81* 83* 107 114* 122* cleanup 000134 stack reference condition dcl 73 ref 83 cu_$level_get 000014 constant entry external dcl 55 ref 81 cu_$level_set 000016 constant entry external dcl 56 ref 83 85 122 ecode 000102 automatic fixed bin(35,0) dcl 44 set ref 89* 90 93* 94 94 94* 101* 102 118* 120 error_table_$logical_volume_not_connected 000034 external static fixed bin(35,0) dcl 68 ref 94 get_ring_ 000020 constant entry external dcl 57 ref 85 85 grant 0(01) 000100 automatic bit(1) level 2 packed packed unaligned dcl 42 set ref 113* ignore_mode 000103 automatic bit(36) dcl 45 set ref 107* ignore_pubbit 000104 automatic bit(1) dcl 46 set ref 107* lv_access_range 000105 automatic bit(72) array dcl 47 set ref 104* 107* 114* lvid 000111 automatic bit(36) dcl 48 set ref 89* 93* 101 null builtin function dcl 75 ref 114 114 rcp_id 000112 automatic bit(36) dcl 49 set ref 87* 89* 118* rcp_lv_$check 000022 constant entry external dcl 58 ref 89 rcp_lv_$del_lv 000024 constant entry external dcl 59 ref 118 string builtin function dcl 76 set ref 112* 114 114 sys_info$access_class_ceiling 000036 external static bit(72) dcl 70 ref 104 volume_name_str 000113 automatic char(64) packed unaligned dcl 50 set ref 101* 103* 107* 109* 109 114* volume_registration_mgr_$find_lvname 000030 constant entry external dcl 63 ref 101 volume_registration_mgr_$get_access_for_attach 000026 constant entry external dcl 60 ref 107 NAMES DECLARED BY EXPLICIT CONTEXT. RETURN 000407 constant label dcl 120 set ref 90 94 rcp_detach_lv_ 000044 constant entry external dcl 23 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 634 674 422 644 Length 1104 422 40 173 211 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rcp_detach_lv_ 196 external procedure is an external procedure. on unit on line 83 68 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rcp_detach_lv_ 000100 auto_event_flags rcp_detach_lv_ 000101 caller_level rcp_detach_lv_ 000102 ecode rcp_detach_lv_ 000103 ignore_mode rcp_detach_lv_ 000104 ignore_pubbit rcp_detach_lv_ 000105 lv_access_range rcp_detach_lv_ 000111 lvid rcp_detach_lv_ 000112 rcp_id rcp_detach_lv_ 000113 volume_name_str rcp_detach_lv_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out return_mac enable_op shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. access_audit_r1_$log_obj_class_range admin_gate_$detach_lv cu_$level_get cu_$level_set get_ring_ rcp_lv_$check rcp_lv_$del_lv volume_registration_mgr_$find_lvname volume_registration_mgr_$get_access_for_attach THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. access_operations_$detach_lv error_table_$logical_volume_not_connected sys_info$access_class_ceiling LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 23 000040 81 000051 83 000057 85 000103 87 000123 89 000126 90 000144 93 000146 94 000157 101 000165 102 000210 103 000212 104 000215 105 000235 107 000236 109 000276 110 000311 112 000312 113 000313 114 000315 118 000376 120 000407 122 000412 127 000421 ----------------------------------------------------------- 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