COMPILATION LISTING OF SEGMENT mrds_dm_secured_submodel Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1017.9 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* HISTORY: 19* 20* Originally written by Jim Gray - - February 1981 21* 22**/ 23 24 mrds_dm_secured_submodel: procedure (db_dir, sm_dir, sm_name) returns (bit (1)); 25 26 /* DESCRIPTION: 27* 28* This routine determines whether a given submodel resides under the 29* secure.submodels directory in the database. 30* It requires the path to the database, the submodel containing dir, 31* and the submodel name, returning either true or false. 32* This routine was written because it is common code used in several places, 33* and the same algorithm was desired. 34* It is not meant to be used externally to mrds, so absolute 35* pathnames are requried. 36* 37**/ 38 39 /* PARAMETERS: 40* 41* db_dir - - (input) char(*), the absolute path of the database 42* 43* sm_dir - - (input) char(*), the absolute path of the containing dir 44* for the submodel in question. 45* 46* sm_name - - (input) char(*), the entryname of the submodel in question 47* 48* returned - - (output) bit(1), on => secured submodel in secure.submodels directory 49* underneath the database dir 50* 51**/ 52 53 /* check for the submodel being properly under the db */ 54 55 real_sm_dir = rtrim (db_dir) || ">" || mrds_data_$submodel_dir_name; 56 if get_uid (sm_dir, sm_name, chase_links) = /* get uids, submodel + where should be */ 57 get_uid (real_sm_dir, sm_name, dont_chase_links) then 58 answer = "1"b; /* secured submodel */ 59 else answer = "0"b; /* not a secure submodel */ 60 61 return (answer); 62 63 get_uid: procedure (dir, entry, chase_sw) returns (bit (36)); 64 65 /* routine to get the unique identifier of an entry, 66* chasing links or not as chase_sw is set */ 67 68 allocate status_branch set (status_ptr) in (work_area); /* this area init only for submodels */ 69 70 call hcs_$status_long (dir, entry, chase_sw, status_ptr, addr (work_area), temp_code); 71 72 if temp_code ^= 0 & temp_code ^= error_table_$no_s_permission then 73 entry_uid = bit (chase_sw); /* return junk if we cant get uid */ 74 else if chase_sw = dont_chase_links & status_ptr -> status_branch.short.type = Link then 75 entry_uid = bit (chase_sw); 76 else entry_uid = status_ptr -> status_branch.long.uid; 77 78 return (entry_uid); 79 80 81 82 declare entry_uid bit (36); /* returned unique id of entry */ 83 declare temp_code fixed bin (35); /* unused err code, only effects of error reported */ 84 declare dir char (*); /* directory of entry */ 85 declare entry char (*); /* entry portion */ 86 declare chase_sw fixed bin (1); /* 0 => dont, 1 => do chase links */ 87 88 end; 89 90 declare addr builtin; 91 declare bit builtin; 92 declare empty builtin; 93 declare rtrim builtin; 94 declare answer bit (1); /* returned answer, on => secured submodel */ 95 declare hcs_$status_long entry (char (*), char (*), fixed bin (1), ptr, ptr, fixed bin (35)); /* gets all info about entry */ 96 declare chase_links fixed bin (1) init (1); /* 1 => do chase links */ 97 declare dont_chase_links fixed bin (1) init (0); /* 0 => dont chase links */ 98 declare real_sm_dir char (168); /* actual path to submodel dir from db */ 99 declare error_table_$no_s_permission fixed bin (35) ext; /* null access on dir */ 100 declare work_area area (2048); /* space for status long info */ 101 declare db_dir char (*); /* abs path to db */ 102 declare sm_dir char (*); /* abs path to sm containing dir */ 103 declare sm_name char (*); /* entryname of submodel */ 104 declare mrds_data_$submodel_dir_name char (16) char (16) ext; /* name of submodel directory */ 105 1 1 /* --------------- BEGIN include file status_structures.incl.pl1 --------------- */ 1 2 1 3 /* Revised from existing include files 09/26/78 by C. D. Tavares */ 1 4 1 5 /* This include file contains branch and link structures returned by 1 6* hcs_$status_ and hcs_$status_long. */ 1 7 1 8 dcl 1 status_branch aligned based (status_ptr), 1 9 2 short aligned, 1 10 3 type fixed bin (2) unaligned unsigned, /* seg, dir, or link */ 1 11 3 nnames fixed bin (16) unaligned unsigned, /* number of names */ 1 12 3 names_relp bit (18) unaligned, /* see entry_names dcl */ 1 13 3 dtcm bit (36) unaligned, /* date/time contents last modified */ 1 14 3 dtu bit (36) unaligned, /* date/time last used */ 1 15 3 mode bit (5) unaligned, /* caller's effective access */ 1 16 3 raw_mode bit (5) unaligned, /* caller's raw "rew" modes */ 1 17 3 pad1 bit (8) unaligned, 1 18 3 records_used fixed bin (18) unaligned unsigned, /* number of NONZERO pages used */ 1 19 1 20 /* Limit of information returned by hcs_$status_ */ 1 21 1 22 2 long aligned, 1 23 3 dtd bit (36) unaligned, /* date/time last dumped */ 1 24 3 dtem bit (36) unaligned, /* date/time branch last modified */ 1 25 3 lvid bit (36) unaligned, /* logical volume ID */ 1 26 3 current_length fixed bin (12) unaligned unsigned, /* number of last page used */ 1 27 3 bit_count fixed bin (24) unaligned unsigned, /* reported length in bits */ 1 28 3 pad2 bit (8) unaligned, 1 29 3 copy_switch bit (1) unaligned, /* copy switch */ 1 30 3 tpd_switch bit (1) unaligned, /* transparent to paging device switch */ 1 31 3 mdir_switch bit (1) unaligned, /* is a master dir */ 1 32 3 damaged_switch bit (1) unaligned, /* salvager warned of possible damage */ 1 33 3 synchronized_switch bit (1) unaligned, /* DM synchronized file */ 1 34 3 pad3 bit (5) unaligned, 1 35 3 ring_brackets (0:2) fixed bin (6) unaligned unsigned, 1 36 3 uid bit (36) unaligned; /* unique ID */ 1 37 1 38 dcl 1 status_link aligned based (status_ptr), 1 39 2 type fixed bin (2) unaligned unsigned, /* as above */ 1 40 2 nnames fixed bin (16) unaligned unsigned, 1 41 2 names_relp bit (18) unaligned, 1 42 2 dtem bit (36) unaligned, 1 43 2 dtd bit (36) unaligned, 1 44 2 pathname_length fixed bin (17) unaligned, /* see pathname */ 1 45 2 pathname_relp bit (18) unaligned; /* see pathname */ 1 46 1 47 dcl status_entry_names (status_branch.nnames) character (32) aligned 1 48 based (pointer (status_area_ptr, status_branch.names_relp)), 1 49 /* array of names returned */ 1 50 status_pathname character (status_link.pathname_length) aligned 1 51 based (pointer (status_area_ptr, status_link.pathname_relp)), 1 52 /* link target path */ 1 53 status_area_ptr pointer, 1 54 status_ptr pointer; 1 55 1 56 dcl (Link initial (0), 1 57 Segment initial (1), 1 58 Directory initial (2)) fixed bin internal static options (constant); 1 59 /* values for type fields declared above */ 1 60 1 61 /* ---------------- END include file status_structures.incl.pl1 ---------------- */ 106 107 108 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0906.6 mrds_dm_secured_submodel.pl1 >special_ldd>online>mrds.pbf-04/18/85>mrds_dm_secured_submodel.pl1 106 1 11/22/82 0955.7 status_structures.incl.pl1 >ldd>include>status_structures.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. Link constant fixed bin(17,0) initial dcl 1-56 ref 74 addr builtin function dcl 90 ref 70 70 answer 000100 automatic bit(1) unaligned dcl 94 set ref 56* 59* 61 bit builtin function dcl 91 ref 72 74 chase_links 000101 automatic fixed bin(1,0) initial dcl 96 set ref 56* 96* chase_sw parameter fixed bin(1,0) dcl 86 set ref 63 70* 72 74 74 db_dir parameter char unaligned dcl 101 ref 24 55 dir parameter char unaligned dcl 84 set ref 63 70* dont_chase_links 000102 automatic fixed bin(1,0) initial dcl 97 set ref 56* 74 97* empty builtin function dcl 92 ref 100 entry parameter char unaligned dcl 85 set ref 63 70* entry_uid 004166 automatic bit(36) unaligned dcl 82 set ref 72* 74* 76* 78 error_table_$no_s_permission 000012 external static fixed bin(35,0) dcl 99 ref 72 hcs_$status_long 000010 constant entry external dcl 95 ref 70 long 4 based structure level 2 dcl 1-8 mrds_data_$submodel_dir_name 000014 external static char(16) unaligned dcl 104 ref 55 real_sm_dir 000103 automatic char(168) unaligned dcl 98 set ref 55* 56* rtrim builtin function dcl 93 ref 55 short based structure level 2 dcl 1-8 sm_dir parameter char unaligned dcl 102 set ref 24 56* sm_name parameter char unaligned dcl 103 set ref 24 56* 56* status_branch based structure level 1 dcl 1-8 ref 68 status_ptr 004156 automatic pointer dcl 1-47 set ref 68* 70* 74 76 temp_code 004167 automatic fixed bin(35,0) dcl 83 set ref 70* 72 72 type based fixed bin(2,0) level 3 packed unsigned unaligned dcl 1-8 ref 74 uid 11 based bit(36) level 3 packed unaligned dcl 1-8 ref 76 work_area 000156 automatic area(2048) dcl 100 set ref 68 70 70 100* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Directory internal static fixed bin(17,0) initial dcl 1-56 Segment internal static fixed bin(17,0) initial dcl 1-56 status_area_ptr automatic pointer dcl 1-47 status_entry_names based char(32) array dcl 1-47 status_link based structure level 1 dcl 1-38 status_pathname based char dcl 1-47 NAMES DECLARED BY EXPLICIT CONTEXT. get_uid 000204 constant entry internal dcl 63 ref 56 56 mrds_dm_secured_submodel 000014 constant entry external dcl 24 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 420 436 331 430 Length 634 331 16 162 66 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mrds_dm_secured_submodel 2224 external procedure is an external procedure. get_uid internal procedure shares stack frame of external procedure mrds_dm_secured_submodel. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mrds_dm_secured_submodel 000100 answer mrds_dm_secured_submodel 000101 chase_links mrds_dm_secured_submodel 000102 dont_chase_links mrds_dm_secured_submodel 000103 real_sm_dir mrds_dm_secured_submodel 000156 work_area mrds_dm_secured_submodel 004156 status_ptr mrds_dm_secured_submodel 004166 entry_uid get_uid 004167 temp_code get_uid THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc return shorten_stack ext_entry_desc alloc_based empty THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$status_long THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$no_s_permission mrds_data_$submodel_dir_name LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 24 000007 96 000041 97 000043 100 000044 55 000047 56 000113 59 000175 61 000176 63 000204 68 000222 70 000227 72 000267 74 000303 76 000320 78 000323 ----------------------------------------------------------- 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