COMPILATION LISTING OF SEGMENT mu_get_relation_acl Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1045.4 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 mu_get_relation_acl: get_relation_acl: procedure (database_path, model_relation_name, 10 DBA, read_acl, write_acl, error_code); 11 12 /* DESCRIPTION: 13* 14* given an absoulte database path, and the model name of a relation, 15* plus whether the user is a database administrator, 16* this routine will return the Multics acl's the user 17* has to the relation data multi-segment file (vfile_). 18* 19**/ 20 21 /* PARAMERERS: 22* 23* database_path - - (input) char(*), the absolute pathname of the database 24* with suffix (as can be obtained from rm_db_info.db_path) 25* 26* model_relation_name - - (input) char(*), the name of the relation as it 27* appears in the model, not a submodel name 28* 29* DBA - - (input) bit(1), if this bit is on, it indicates the user 30* is a database administrator, and that if he does not 31* have "rw" acl to the relation, he should get it. 32* 33* read_acl - - (output) bit(1), this bit is on if the user 34* had read ("r") acl on the given relation data 35* 36* write_acl - - (output) bit(1), this bit is on if the user 37* has write ("w") acl on the given relation data 38* 39* error_code - - (output) fixed bin(35), the error status encoding. 40* 41**/ 42 43 /* HISTORY: 44* 45* Originally written by Jim Gray - - March 1981 46* 47* 83-05-31 Davids: Modified to use object_type_$get_user_access_modes so that 48* ring 2 dms files can be handled ok. 49* 50* 83-07-05 Mike Kubicar : Still problems with object_type. I had to make 51* a distinction between vfile msfs and dmfile msfs. 52* 53* 83-09-30 Mike Kubicar : Upgraded to use the again new versions of 54* fs_util_ (object_type_). Hopefully the distinction between vfile msfs 55* and dmfiles has gone away. 56* 57**/ 58 59 /* initialize */ 60 61 error_code = 0; 62 need_to_set_acls = "0"b; 63 mode = "0"b; 64 65 call fs_util_$get_user_access_modes (database_path, 66 model_relation_name, (""), (-1), mode, unused, error_code); 67 if error_code = 0 then do; 68 if DBA & /* check for a DBA without rw acl */ 69 addr (mode) -> access_string ^= "101"b 70 then need_to_set_acls = "1"b; 71 else need_to_set_acls = "0"b; 72 end; 73 else if error_code = error_table_$incorrect_access | /* null on msf, "s" or greator on db dir */ 74 error_code = error_table_$no_info then do; /* null on both db dir and msf */ 75 if DBA then 76 need_to_set_acls = "1"b; 77 else do; /* user not a DBA, and not sufficient access */ 78 79 /* assume that we failed because there was not access of "s" 80* on the msf "dir", and no access on component 0, 81* thus the user has "n" access to the msf */ 82 83 mode = "0"b; /* set null access */ 84 error_code = 0; 85 need_to_set_acls = "0"b; 86 87 end; 88 89 end; 90 91 if need_to_set_acls then do; 92 93 call mrds_dm_authorization$set_needed_access 94 (database_path, error_code); /* fails if user not dba */ 95 if error_code = 0 then 96 mode = "101"b; /* set rw access */ 97 end; 98 99 /* set the users acl bits for returning */ 100 101 read_acl = addr (mode) -> access.read; 102 write_acl = addr (mode) -> access.write; 103 104 return; 105 106 dcl addr builtin; 107 dcl mode bit (36) aligned; 108 dcl unused bit (36) aligned; 109 dcl access_string based bit (3) unal; 110 dcl 1 access based unal, /* overlay for getting access bits */ 111 2 read bit (1) unal, 112 2 exec bit (1) unal, 113 2 write bit (1) unal; 114 dcl DBA bit (1); /* on =. user is a database administorator */ 115 dcl database_path char (*); /* absolute pathname of the database dir */ 116 dcl error_code fixed bin (35); /* error status encoding */ 117 dcl error_table_$incorrect_access fixed bin (35) ext; /* null on msf, "s" or more on db dir */ 118 dcl error_table_$no_info fixed bin (35) ext;/* null on both msf and db dir */ 119 dcl fs_util_$get_user_access_modes entry (char (*), char (*), char (*), fixed bin, bit (36) aligned, 120 bit (36) aligned, fixed bin (35)); 121 dcl model_relation_name char (*); /* name of the relation data msf in the model */ 122 dcl mrds_dm_authorization$set_needed_access entry (char (*), fixed bin (35)); /* gives DBA all acls he needs */ 123 dcl need_to_set_acls bit (1); /* on => set rw acls for a DBA */ 124 dcl read_acl bit (1); /* on => user has "r" acl to relation data */ 125 dcl write_acl bit (1); /* on => user has "w" acl to relation data */ 126 127 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0908.3 mu_get_relation_acl.pl1 >special_ldd>online>mrds.pbf-04/18/85>mu_get_relation_acl.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. DBA parameter bit(1) unaligned dcl 114 ref 9 9 68 75 access based structure level 1 packed unaligned dcl 110 access_string based bit(3) unaligned dcl 109 ref 68 addr builtin function dcl 106 ref 68 101 102 database_path parameter char unaligned dcl 115 set ref 9 9 65* 93* error_code parameter fixed bin(35,0) dcl 116 set ref 9 9 61* 65* 67 73 73 84* 93* 95 error_table_$incorrect_access 000010 external static fixed bin(35,0) dcl 117 ref 73 error_table_$no_info 000012 external static fixed bin(35,0) dcl 118 ref 73 fs_util_$get_user_access_modes 000014 constant entry external dcl 119 ref 65 mode 000100 automatic bit(36) dcl 107 set ref 63* 65* 68 83* 95* 101 102 model_relation_name parameter char unaligned dcl 121 set ref 9 9 65* mrds_dm_authorization$set_needed_access 000016 constant entry external dcl 122 ref 93 need_to_set_acls 000102 automatic bit(1) unaligned dcl 123 set ref 62* 68* 71* 75* 85* 91 read based bit(1) level 2 packed unaligned dcl 110 ref 101 read_acl parameter bit(1) unaligned dcl 124 set ref 9 9 101* unused 000101 automatic bit(36) dcl 108 set ref 65* write 0(02) based bit(1) level 2 packed unaligned dcl 110 ref 102 write_acl parameter bit(1) unaligned dcl 125 set ref 9 9 102* NAMES DECLARED BY EXPLICIT CONTEXT. get_relation_acl 000014 constant entry external dcl 9 mu_get_relation_acl 000037 constant entry external dcl 9 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 334 354 223 344 Length 536 223 20 145 111 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_relation_acl 102 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_relation_acl 000100 mode get_relation_acl 000101 unused get_relation_acl 000102 need_to_set_acls get_relation_acl THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. fs_util_$get_user_access_modes mrds_dm_authorization$set_needed_access THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$incorrect_access error_table_$no_info LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000006 61 000057 62 000061 63 000062 65 000063 67 000124 68 000127 71 000143 72 000144 73 000145 75 000152 83 000162 84 000163 85 000164 91 000165 93 000167 95 000205 101 000212 102 000216 104 000222 ----------------------------------------------------------- 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