/* *********************************************************** * * * Copyright, (C) Honeywell Information Systems Inc., 1984 * * * *********************************************************** */ /* format: off */ convert_SAT_audit_flags: procedure (); db_name = "SAT"; ME = "convert_SAT_audit_flags"; call cu_$arg_list_ptr (alp); call convert_it; return; convert_PNT_audit_flags: entry (); db_name = "PNT"; ME = "convert_PNT_audit_flags"; call cu_$arg_list_ptr (alp); call convert_it; return; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* CONVERT_SAT_AUDIT_FLAGS, CONVERT_PNT_AUDIT_FLAGS */ /* */ /* Commands to convert the security access audit flags in each PNT person entry or SAT */ /* project entry. THIS IS FOR USE ONLY AT CISL AND SYSTEM-M DURING INSTALLATION OF THE */ /* NEW ACCESS AUDITING SOFTWARE!!! IT IS NOT TO BE INSTALLED AS PART OF THE SYSTEM. */ /* */ /* Usage: convert_XXX_audit_flags PATH {-revert} */ /* */ /* where: */ /* XXX is replaced by "SAT" or "PNT" */ /* PATH is the pathname of the SAT/PNT to convert */ /* -revert may be specified to convert back to the pre-MR11 format */ /* NOTE: converting from pre-MR11 flags to MR11 flags and back again will not */ /* yield to original values. If there is a chance of reverting from MR11 it is */ /* best to have a backup copy of the PNT(s) and SAT(s) available for use. */ /* */ /* Last Modified: */ /* 1984-12-09 EJ Sharpe - initial coding */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ %page; /* AUTOMATIC */ dcl ME char (32); /* self identification */ dcl alp pointer; /* arg list ptr */ dcl code fixed bin (35); /* system status code */ dcl db_dir char (168); /* dir portion of SAT/PNT path */ dcl db_ent char (32); /* entry portion of SAT_PNT path */ dcl db_name char (3); /* "SAT" or "PNT" */ dcl revert_sw bit (1) init ("0"b);/* convert to pre-MR11 format */ dcl satp pointer; /* pointer to SAT */ dcl satep pointer; /* pointer to SAT entry */ /* ENTRIES */ dcl com_err_ entry options (variable); dcl convert_MR10_2_audit_flags_ entry (bit (36) aligned); dcl revert_MR10_2_audit_flags_ entry (bit (36) aligned); dcl cu_$arg_count_rel entry (fixed bin, ptr, fixed bin(35)); dcl cu_$arg_list_ptr entry (pointer); dcl cu_$arg_ptr_rel entry (fixed bin, ptr, fixed bin(21), fixed bin(35), ptr); dcl expand_pathname_ entry (char(*), char(*), char(*), fixed bin(35)); dcl hcs_$initiate entry (char(*), char(*), char(*), fixed bin(1), fixed bin(2), ptr, fixed bin(35)); dcl hcs_$terminate_noname entry (ptr, fixed bin(35)); dcl pathname_ entry (char(*), char(*)) returns(char(168)); dcl pnt_manager_$get_abs_entry entry (fixed bin (35), pointer, fixed bin (35)); dcl pnt_manager_$update_entry entry (pointer, bit (1), bit (1), fixed bin (35)); /* MISC */ dcl error_table_$bad_index fixed bin (35) ext; dcl error_table_$checksum_failure fixed bin (35) ext; dcl error_table_$no_record fixed bin (35) ext; dcl error_table_$segknown fixed bin (35) ext; dcl error_table_$unimplemented_version fixed bin (35) ext; dcl clean_up condition; dcl addr builtin; dcl null builtin; %page; /* CONVERT_IT - MAIN INTERNAL PROCEDURE */ convert_it: procedure (); dcl done bit (1); /* indicates when we're finished with PNT */ dcl pnt_rec_no fixed bin (35); /* index for PNT entries */ dcl 1 pnte aligned like pnt_entry; /* auto copy */ dcl project_index fixed bin; /* index for SAT entries */ satp = null(); on clean_up begin; if db_name = "SAT" then call close_sat; end; call process_arguments; if db_name = "SAT" then do; call open_sat; do project_index = 1 to sat.current_size; satep = addr(sat.project(project_index)); if revert_sw then call revert_MR10_2_audit_flags_ (project.audit); else call convert_MR10_2_audit_flags_ (project.audit); end; call close_sat; end; else do; /* entry = "PNT" */ done = "0"b; do pnt_rec_no = 1 by 1 while (^done); call pnt_manager_$get_abs_entry (pnt_rec_no, addr(pnte), code); if code = 0 then do; if revert_sw then call revert_MR10_2_audit_flags_ (pnte.public.audit); else call convert_MR10_2_audit_flags_ (pnte.public.audit); call pnt_manager_$update_entry (addr(pnte), "0"b, "0"b, code); if code ^= 0 then do; call com_err_ (code, ME, "Updating PNT record #^d.", pnt_rec_no); goto ERROR_EXIT; end; end; else if code = error_table_$checksum_failure then call com_err_ (code, ME, "Checksum failure on record #^d.", pnt_rec_no); else if code = error_table_$no_record then /* nothing - go on to next entry */; else if code = error_table_$bad_index then done = "1"b; else do; /* any others indicate trouble... */ call com_err_ (code, ME, "Reading PNT record #^d.", pnt_rec_no); goto ERROR_EXIT; end; end; end; return; end convert_it; %page; /* OPEN_SAT - procedure to find and check specified SAT */ open_sat: procedure (); call hcs_$initiate (db_dir, db_ent, "", 0, 0, satp, code); if code ^= 0 & code ^= error_table_$segknown then do; call com_err_ (code, ME, "Unable to initiate ^a.", pathname_ (db_dir, db_ent)); goto ERROR_EXIT; end; else if sat.version ^= SAT_version then do; code = error_table_$unimplemented_version; call com_err_ (code, ME, pathname_ (db_dir, db_ent)); goto ERROR_EXIT; end; return; end open_sat; /* CLOSE_SAT - procedure to close the SAT once we're finished */ close_sat: procedure (); if satp ^= null() then call hcs_$terminate_noname (satp, code); return; end close_sat; %page; /* PROCESS_ARGUMENTS - procedure to process the command line arguments */ process_arguments: procedure (); dcl al fixed bin (21); /* arg length (see based "arg") */ dcl ap pointer; /* arg pointer (see based "arg") */ dcl n_args fixed bin; /* number of command line arguments */ dcl arg char (al) based (ap); /* command line argument */ call cu_$arg_count_rel (n_args, alp, code); if code ^= 0 then do; ARG_ERR: call com_err_ (code, ME); goto ERROR_EXIT; end; if n_args < 1 | n_args > 2 then do; USAGE: call com_err_ (0, ME, "Usage is: ^a PATH {-revert}.", ME); goto ERROR_EXIT; end; call cu_$arg_ptr_rel (1, ap, al, code, alp); if code ^= 0 then goto ARG_ERR; call expand_pathname_ (arg, db_dir, db_ent, code); if code ^= 0 then goto USAGE; if n_args = 2 then do; call cu_$arg_ptr_rel (2, ap, al, code, alp); if code ^= 0 then goto ARG_ERR; if arg = "-revert" then do; call com_err_ (0, ME, "WARNING: Flags produced will not be same as originals."); revert_sw = "1"b; end; else goto USAGE; end; return; end process_arguments; %page; %include sat; %include user_attributes; %include pnt_entry; ERROR_EXIT: if db_name = "SAT" then call close_sat; end convert_SAT_audit_flags; */ ----------------------------------------------------------- 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 */