COMPILATION LISTING OF SEGMENT detach_audit Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 12/09/83 1007.7 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* format: style2,ind3 */ 7 detach_audit: 8 dta: 9 proc; 10 11 /* This module turns off auditing for the calling process. The single parameter 12* is the switchname of the switch attached via the audit_ module that is to be detached. 13* 14*Modified: 15*11/12/81 by Lindsey Spratt: changed the variable "whoami" to "MYNAME", making 16* it an internal constant as well. 17*10/13/82 by Lindsey Spratt: Changed to destroy the new_iocb, which is no 18* longer needed after the move_attach. Also, removed the 19* set_safety_sw, as this is done by iox_$close. Changed to 20* use error_table_$badopt when too many args are given, rather than 21* a 0 error code. 22**/ 23 24 /* Automatic */ 25 26 dcl nargs fixed bin; 27 dcl tc fixed bin; 28 dcl tp ptr; 29 dcl blkptr ptr; 30 dcl old_iocb ptr; 31 dcl new_iocb ptr; 32 dcl code fixed bin (35); 33 34 /* Based */ 35 36 dcl targ char (tc) based (tp); 37 38 /* Constant */ 39 40 dcl MYNAME char (12) init ("detach_audit") internal static options (constant); 41 42 /* Entries */ 43 44 dcl audit_$audit_close entry; 45 dcl cu_$arg_count entry (fixed bin); 46 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 47 dcl ioa_$ioa_switch entry options (variable); 48 dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); 49 dcl iox_$move_attach entry (ptr, ptr, fixed bin (35)); 50 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 51 dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); 52 dcl iox_$close entry (ptr, fixed bin (35)); 53 dcl com_err_ entry options (variable); 54 55 /* External */ 56 57 dcl error_table_$badopt fixed bin (35) ext; 58 59 call cu_$arg_count (nargs); 60 if nargs > 1 61 then 62 do; 63 call com_err_ (error_table_$badopt, MYNAME, "Too many arguments.^/Usage: detach_audit {switchname}"); 64 return; 65 end; 66 else if nargs = 1 67 then call cu_$arg_ptr (1, tp, tc, code); 68 else 69 do; 70 tc = 8; 71 alloc targ; 72 targ = "user_i/o"; 73 end; 74 call iox_$look_iocb ((targ), old_iocb, code); 75 if code ^= 0 76 then 77 do; 78 call com_err_ (code, MYNAME, "while looking for ^a", targ); 79 return; 80 end; 81 82 if old_iocb -> iocb.close ^= audit_$audit_close 83 then 84 do; 85 call com_err_ (0, MYNAME, "^a not attached via audit_", targ); 86 return; 87 end; 88 89 blkptr = old_iocb -> iocb.attach_data_ptr; 90 new_iocb = blkptr -> blk.auditing_iocb; 91 92 call iox_$close (old_iocb, code); 93 if code ^= 0 94 then 95 do; 96 call com_err_ (code, MYNAME, "while closing ^a switch", targ); 97 return; 98 end; 99 100 call iox_$detach_iocb (old_iocb, code); 101 if code ^= 0 102 then 103 do; 104 call ioa_$ioa_switch (new_iocb, "Couldn't detach ^a", targ); 105 return; 106 end; 107 108 109 call iox_$move_attach (new_iocb, old_iocb, code); 110 if code ^= 0 111 then 112 do; 113 call com_err_ (code, MYNAME, "while moving attachment from ^a to ^a", new_iocb -> iocb.name, targ); 114 return; 115 end; 116 117 call iox_$destroy_iocb (new_iocb, code); 118 if code ^= 0 119 then 120 do; 121 call com_err_ (code, MYNAME, "Unable to destroy the auditing iocb. Auditing was successfully 122 detached for switch ""^a"", however.", targ); 123 end; 124 125 return; 126 127 /* Include */ 128 1 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 1 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 1 3* version number to IOX2. */ 1 4 /* format: style2 */ 1 5 1 6 dcl 1 iocb aligned based, /* I/O control block. */ 1 7 2 version character (4) aligned, /* IOX2 */ 1 8 2 name char (32), /* I/O name of this block. */ 1 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 14 2 reserved bit (72), /* Reserved for future use. */ 1 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 17 /* open(p,mode,not_used,s) */ 1 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 20 /* get_line(p,bufptr,buflen,actlen,s) */ 1 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 24 /* put_chars(p,bufptr,buflen,s) */ 1 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 26 /* modes(p,newmode,oldmode,s) */ 1 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 28 /* position(p,u1,u2,s) */ 1 29 2 control entry (ptr, char (*), ptr, fixed (35)), 1 30 /* control(p,order,infptr,s) */ 1 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 32 /* read_record(p,bufptr,buflen,actlen,s) */ 1 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 34 /* write_record(p,bufptr,buflen,s) */ 1 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 36 /* rewrite_record(p,bufptr,buflen,s) */ 1 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 39 /* seek_key(p,key,len,s) */ 1 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 41 /* read_key(p,key,len,s) */ 1 42 2 read_length entry (ptr, fixed (21), fixed (35)), 1 43 /* read_length(p,len,s) */ 1 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 1 45 /* open_file(p,mode,desc,not_used,s) */ 1 46 2 close_file entry (ptr, char (*), fixed bin (35)), 1 47 /* close_file(p,desc,s) */ 1 48 2 detach entry (ptr, char (*), fixed bin (35)); 1 49 /* detach(p,desc,s) */ 1 50 1 51 declare iox_$iocb_version_sentinel 1 52 character (4) aligned external static; 1 53 1 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 129 2 1 /* BEGIN INCLUDE FILE audit_block.incl.pl1 */ 2 2 2 3 /* 2 4* 12/08/78 Written by Lindsey L. Spratt 2 5* Modified: 2 6* 11/26/79 by Lindsey L. Spratt to add editor prompting info, 2 7* use_editor_prompt, 2 8* editor_prompt_string, and 2 9* editor_prompt_terminator. 2 10* 03/20/81 by Lindsey L. Spratt to remove editor_prompt_terminator. 2 11**/ 2 12 2 13 2 14 /* format: style2 */ 2 15 dcl 1 blk based (blkptr) aligned, 2 16 2 auditing_iocb ptr, /* Points to iocb of dummy switch. */ 2 17 2 attach char (128) var, /* For the attach description. */ 2 18 2 suspend bit (1), /* Indicates suspension of auditing. */ 2 19 2 current_flags, /* These switches indicate the modes for audit_. */ 2 20 3 read_audit bit (1) unaligned, /* Set by audit_input. */ 2 21 3 file_limit bit (1) unaligned, /* Set by audit_file_size=n. */ 2 22 3 write_audit bit (1) unaligned, /* Set by write_audit. */ 2 23 3 edit bit (1) unaligned, /* Set by audit_edit. */ 2 24 3 trace bit (1) unaligned, /* Set by audit_trace. */ 2 25 3 meter bit (1) unaligned, /* Set by audit_meter. */ 2 26 3 use_editor_prompt 2 27 bit (1) unaligned, /* Indicates whether to prompt in the audit editor. */ 2 28 3 unused bit (29) unaligned, 2 29 2 saved_flags like blk.current_flags, /* Copy of old current_flags, prior to suspension. */ 2 30 2 dirname char (168) unal, /* Directory of audit_file. */ 2 31 2 ename char (32) unal, /* Entryname of audit_file. */ 2 32 2 paging fixed bin (35), /* Total page faults in process since attachment. */ 2 33 2 pad bit (36), 2 34 2 virtual_time fixed bin (71), /* Total virtual cpu time since attachment. */ 2 35 2 audit_fcb ptr, /* File control block pointer for the audit_file. */ 2 36 2 audit_ptr ptr, /* Points to current segment in audit_file. */ 2 37 2 begin_ptr ptr, 2 38 2 audit_file_header_ptr 2 39 ptr, /* Points to audit_file_header (in audit_file) */ 2 40 2 trigger char (1), /* Character used to indicate an audit_ request. */ 2 41 2 editor_prompt_string 2 42 char (32) varying, /* This an ioa_ control string taking 2 43* two arguments, 1) bit(1) indicating level > 1; 2 44* 2) level. 2 45* */ 2 46 2 default_iocb ptr, /* Points to the iocb to be used for input and output. */ 2 47 2 temp_seg_ptr ptr, /* Points to the temp seg used as a buffer for input. */ 2 48 2 work_space ptr, /* Points to the beginning of buffer for get_line. */ 2 49 2 work_space_len fixed bin (24); /* Length of string in work_space buffer. */ 2 50 2 51 2 52 /* END INCLUDE FILE audit_block.incl.pl1 */ 130 131 132 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 12/09/83 0951.9 detach_audit.pl1 >spec>on>pnotice>detach_audit.pl1 129 1 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 130 2 05/18/81 1556.5 audit_block.incl.pl1 >ldd>include>audit_block.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. MYNAME 000000 constant char(12) initial unaligned dcl 40 set ref 63* 78* 85* 96* 113* 121* attach_data_ptr 16 based pointer level 2 dcl 1-6 ref 89 audit_$audit_close 000010 constant entry external dcl 44 ref 82 auditing_iocb based pointer level 2 dcl 2-15 ref 90 blk based structure level 1 dcl 2-15 blkptr 000104 automatic pointer dcl 29 set ref 89* 90 close 36 based entry variable level 2 dcl 1-6 ref 82 code 000112 automatic fixed bin(35,0) dcl 32 set ref 66* 74* 75 78* 92* 93 96* 100* 101 109* 110 113* 117* 118 121* com_err_ 000032 constant entry external dcl 53 ref 63 78 85 96 113 121 cu_$arg_count 000012 constant entry external dcl 45 ref 59 cu_$arg_ptr 000014 constant entry external dcl 46 ref 66 current_flags 44 based structure level 2 dcl 2-15 error_table_$badopt 000034 external static fixed bin(35,0) dcl 57 set ref 63* ioa_$ioa_switch 000016 constant entry external dcl 47 ref 104 iocb based structure level 1 dcl 1-6 iox_$close 000030 constant entry external dcl 52 ref 92 iox_$destroy_iocb 000026 constant entry external dcl 51 ref 117 iox_$detach_iocb 000024 constant entry external dcl 50 ref 100 iox_$look_iocb 000020 constant entry external dcl 48 ref 74 iox_$move_attach 000022 constant entry external dcl 49 ref 109 name 1 based char(32) level 2 dcl 1-6 set ref 113* nargs 000100 automatic fixed bin(17,0) dcl 26 set ref 59* 60 66 new_iocb 000110 automatic pointer dcl 31 set ref 90* 104* 109* 113 117* old_iocb 000106 automatic pointer dcl 30 set ref 74* 82 89 92* 100* 109* targ based char unaligned dcl 36 set ref 71 72* 74 78* 85* 96* 104* 113* 121* tc 000101 automatic fixed bin(17,0) dcl 27 set ref 66* 70* 71 71 72 74 78 78 85 85 96 96 104 104 113 113 121 121 tp 000102 automatic pointer dcl 28 set ref 66* 71* 72 74 78 85 96 104 113 121 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$iocb_version_sentinel external static char(4) dcl 1-51 NAMES DECLARED BY EXPLICIT CONTEXT. detach_audit 000144 constant entry external dcl 7 dta 000135 constant entry external dcl 7 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1024 1062 660 1034 Length 1276 660 36 200 144 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dta 177 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dta 000100 nargs dta 000101 tc dta 000102 tp dta 000104 blkptr dta 000106 old_iocb dta 000110 new_iocb dta 000112 code dta THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry alloc_based_storage THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. audit_$audit_close com_err_ cu_$arg_count cu_$arg_ptr ioa_$ioa_switch iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$look_iocb iox_$move_attach THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 7 000134 59 000151 60 000157 63 000162 64 000206 66 000207 70 000230 71 000232 72 000240 74 000244 75 000275 78 000300 79 000333 82 000334 85 000352 86 000405 89 000406 90 000410 92 000412 93 000422 96 000424 97 000462 100 000463 101 000474 104 000476 105 000530 109 000531 110 000544 113 000546 114 000606 117 000607 118 000620 121 000622 125 000655 ----------------------------------------------------------- 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