/* *********************************************************** * * * Copyright, (C) Honeywell Information Systems Inc., 1982 * * * * Copyright (c) 1972 by Massachusetts Institute of * * Technology and Honeywell Information Systems, Inc. * * * *********************************************************** */ perprocess_static_sw_on: proc; /* This command sets the perprocess_static bit in an object map */ /* coded 5/77 by Melanie Weaver */ /* modified 10/79 by Melanie Weaver to make argument handling more standard */ dcl (i, j, alng, lng, arg_count) fixed bin; dcl wordcount fixed bin (18); dcl type fixed bin (2); dcl code fixed bin (35); dcl bitcnt fixed bin (24); dcl (mapp, segptr, argptr, lastword, aclptr) ptr; dcl arg_found bit (1) aligned; dcl new_value bit (1) aligned; dcl delete_sw bit (1) aligned; dcl saved_mode bit (36) aligned; dcl arg char (alng) based (argptr); dcl dirname char (168); dcl ename char (32); dcl me char (24); dcl (addr, addrel, bin, divide, index, null) builtin; dcl 1 segment_acl (1) aligned, 2 access_name char (32), 2 mode bit (36), 2 pad bit (36), 2 status_code fixed bin (35); dcl error_table_$badopt fixed bin (35) external; dcl cu_$arg_count entry () returns (fixed bin); dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); dcl com_err_ entry options (variable); dcl com_err_$suppress_name entry () options (variable); dcl cv_ptr_ entry (char (*), fixed bin (35)) returns (ptr); dcl get_group_id_ entry () returns (char (32) aligned); dcl hcs_$status_mins entry (ptr, fixed bin (2), fixed bin (24), fixed bin (35)); dcl hcs_$fs_get_path_name entry (ptr, char (*), fixed bin, char (*), fixed bin (35)); dcl hcs_$list_acl entry (char (*), char (*), ptr, ptr, ptr, fixed bin, fixed bin (35)); dcl hcs_$add_acl_entries entry (char (*), char (*), ptr, fixed bin, fixed bin (35)); dcl hcs_$delete_acl_entries entry (char (*), char (*), ptr, fixed bin, fixed bin (35)); %include object_map; new_value = "1"b; me = "perprocess_static_sw_on"; join: arg_count = cu_$arg_count (); if arg_count = 0 then do; usage: call com_err_$suppress_name (0, me, "Usage: ^a pathname", me); return; end; arg_found = "0"b; do j = 1 to arg_count; call cu_$arg_ptr (j, argptr, alng, code); if code ^= 0 then do; call com_err_ (code, me, "Argument ^d", j); return; end; if index (arg, "-") = 1 then do; call com_err_ (error_table_$badopt, me, "^a", arg); end; else do; arg_found = "1"b; call process_arg; end; end; if ^arg_found then go to usage; return; perprocess_static_sw_off: entry; new_value = "0"b; me = "perprocess_static_sw_off"; goto join; process_arg: proc; segptr = cv_ptr_ (arg, code); if code ^= 0 then do; err2: call com_err_ (code, me, "^a", arg); return; end; call hcs_$status_mins (segptr, type, bitcnt, code); if code ^= 0 then goto err2; wordcount = divide (bitcnt + 35, 36, 18, 0); lastword = addrel (segptr, wordcount - 1); i = bin (lastword -> map_ptr, 18); if (i <= 0) | (i >= wordcount) then do; err3: call com_err_ (0, me, "Obsolete or non object segment ^a", arg); return; end; mapp = addrel (segptr, lastword -> map_ptr); if mapp -> object_map.identifier ^= "obj_map " then goto err3; if mapp -> object_map.decl_vers ^= 2 then goto err3; /* be sure we have write access to segment so we can change it */ aclptr = addr (segment_acl); segment_acl (1).access_name = get_group_id_ (); call hcs_$fs_get_path_name (segptr, dirname, lng, ename, code); if code ^= 0 then do; err4: call com_err_ (code, me, "Cannot set access on ^a", arg); return; end; call hcs_$list_acl (dirname, ename, null, lastword, aclptr, 1, code); if code ^= 0 then goto err4; if segment_acl (1).status_code ^= 0 then delete_sw = "1"b; /* no previous acl entry for us */ else do; delete_sw = "0"b; saved_mode = segment_acl (1).mode; end; segment_acl (1).mode = "101"b; /* set our access to rw */ call hcs_$add_acl_entries (dirname, ename, aclptr, 1, code); if code ^= 0 then goto err4; mapp -> object_map.format.perprocess_static = new_value; /* now restore acl */ if delete_sw then call hcs_$delete_acl_entries (dirname, ename, aclptr, 1, code); else do; segment_acl (1).mode = saved_mode; call hcs_$add_acl_entries (dirname, ename, aclptr, 1, code); end; return; end; /* of process_arg */ end; */ ----------------------------------------------------------- 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 */