COMPILATION LISTING OF SEGMENT authenticate_device Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/18/86 1352.8 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 12 13 /****^ HISTORY COMMENTS: 14* 1) change(86-04-10,Fawcett), approve(86-04-10,MCR7383), 15* audit(86-05-15,Martinson), install(86-07-18,MR12.0-1098): 16* Add the error codes auth_incorrect and auth_unknown problem found when 17* implementing subvolumes. 18* END HISTORY COMMENTS */ 19 20 21 authenticate_device: 22 proc; 23 24 /* 25* This command is used by the operator to authenticate a tape or disk volume. 26* It takes two arguments: the device name of the drive on which the volume is 27* mounted, and for tapes, the three letter authenticaion code printed on the tape 28* label (note that "***" will authenticate any label), or for disks, one of the 29* codes "ss", "io", "urd", "urg", or "no" which must match the type of volume 30* in the authentication message (note that "no" denies authentication). 31* It then calls a gate in RCP to check the authenticaiton code against the user 32* specified volume. 33**/ 34 35 /* 36* Written by R.J.C. Kissel in September 1977. 37* Modified by R.J.C. Kissel 1/79 to handle disk authentication. 38* Modified by C. D. Tavares 04/24/79 for new authentication levels. 39**/ 40 41 dcl device_name char (8); /* Unique physical device name. */ 42 dcl authentication_code char (3); /* Authentication code for the volume. */ 43 dcl err_msg char (128) varying; /* Informative message for com_err_ call */ 44 dcl nargs fixed bin; /* Number of args this command was called with. */ 45 dcl dlen fixed bin; /* Length of the device_name. */ 46 dcl code fixed bin (35); /* Error code. */ 47 48 dcl arg char (arg_len) based (arg_ptr); 49 /* Overlay for the command arguments. */ 50 dcl arg_len fixed bin; 51 dcl arg_ptr ptr; 52 53 dcl rcp_sys_$authenticate_device entry (char (*), char (*), fixed bin (35)); 54 dcl cu_$arg_count entry (fixed bin); 55 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 56 dcl com_err_ entry options (variable); 57 58 dcl (error_table_$auth_incorrect, 59 error_table_$auth_unknown, 60 error_table_$noarg, 61 error_table_$too_many_args, 62 error_table_$improper_data_format, 63 error_table_$action_not_performed) external fixed bin (35); 64 65 dcl (substr, verify) builtin; 66 67 call cu_$arg_count (nargs); 68 69 if nargs > 2 70 then do; 71 call com_err_ (error_table_$too_many_args, "authenticate_device", 72 "Usage is: authenticate_device device_name authentication_code."); 73 return; 74 end; 75 76 if nargs <= 1 77 then do; 78 call com_err_ (error_table_$noarg, "authenticate_device", 79 "Usage is: authenticate_device device_name authentication_code."); 80 return; 81 end; 82 83 call cu_$arg_ptr (1, arg_ptr, arg_len, code); 84 85 if code ^= 0 86 then do; 87 call com_err_ (code, "authenticate_device"); 88 return; 89 end; 90 91 device_name = arg; 92 dlen = arg_len; 93 call cu_$arg_ptr (2, arg_ptr, arg_len, code); 94 95 if code ^= 0 96 then do; 97 call com_err_ (code, "authenticate_device"); 98 return; 99 end; 100 101 authentication_code = arg; 102 103 /* 104* Make a consistency check on the device name. 105**/ 106 107 if substr (device_name, dlen-2, 1) ^= "_" 108 | verify (substr (device_name, dlen-1, 2), "0123456789") ^= 0 109 | verify (substr (device_name, 1, dlen-3), "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") ^= 0 110 then do; 111 call com_err_ (0, "authenticate_device", "Invalid device name: ^a.", device_name); 112 return; 113 end; 114 115 /* 116* Make a consistency check on the authentication code. 117**/ 118 119 if verify (authentication_code, " abcdefghijklmnopqrstuvwxyz*") ^= 0 120 then do; 121 call com_err_ (0, "authenticate_device", "Invalid authentication code: ^a.", authentication_code); 122 return; 123 end; 124 125 /* 126* For disks make one more check of the authentication code. 127**/ 128 129 if substr (device_name, 1, 3) = "dsk" 130 then do; 131 if authentication_code ^= "ss" & authentication_code ^= "io" & authentication_code ^= "urd" 132 & authentication_code ^= "urg" & authentication_code ^= "no" 133 then do; 134 call com_err_ (0, "authenticate_device", "Unknown disk authentication code: ^a.", 135 authentication_code); 136 return; 137 end; 138 end; 139 140 /* 141* Everything looks good here. 142**/ 143 144 call rcp_sys_$authenticate_device (device_name, authentication_code, code); 145 146 if code ^= 0 147 then do; 148 149 if code = error_table_$action_not_performed then do; 150 code = 0; 151 err_msg = "Device ^a not requesting authentication."; 152 end; 153 else if code = error_table_$improper_data_format then do; 154 code = 0; 155 err_msg = "Authentication ""***"" not allowed for device ^a."; 156 end; 157 else if code = error_table_$auth_incorrect | 158 code = error_table_$auth_unknown then err_msg = "For device ^a"; 159 else err_msg = "Device ^a not found."; 160 161 call com_err_ (code, "authenticate_device", err_msg, device_name); 162 end; 163 164 return; 165 166 end authenticate_device; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/18/86 1235.1 authenticate_device.pl1 >spec>install>1098>authenticate_device.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. arg based char unaligned dcl 48 ref 91 101 arg_len 000147 automatic fixed bin(17,0) dcl 50 set ref 83* 91 92 93* 101 arg_ptr 000150 automatic pointer dcl 51 set ref 83* 91 93* 101 authentication_code 000102 automatic char(3) unaligned dcl 42 set ref 101* 119 121* 131 131 131 131 131 134* 144* code 000146 automatic fixed bin(35,0) dcl 46 set ref 83* 85 87* 93* 95 97* 144* 146 149 150* 153 154* 157 157 161* com_err_ 000016 constant entry external dcl 56 ref 71 78 87 97 111 121 134 161 cu_$arg_count 000012 constant entry external dcl 54 ref 67 cu_$arg_ptr 000014 constant entry external dcl 55 ref 83 93 device_name 000100 automatic char(8) unaligned dcl 41 set ref 91* 107 107 107 111* 129 144* 161* dlen 000145 automatic fixed bin(17,0) dcl 45 set ref 92* 107 107 107 err_msg 000103 automatic varying char(128) dcl 43 set ref 151* 155* 157* 159* 161* error_table_$action_not_performed 000032 external static fixed bin(35,0) dcl 58 ref 149 error_table_$auth_incorrect 000020 external static fixed bin(35,0) dcl 58 ref 157 error_table_$auth_unknown 000022 external static fixed bin(35,0) dcl 58 ref 157 error_table_$improper_data_format 000030 external static fixed bin(35,0) dcl 58 ref 153 error_table_$noarg 000024 external static fixed bin(35,0) dcl 58 set ref 78* error_table_$too_many_args 000026 external static fixed bin(35,0) dcl 58 set ref 71* nargs 000144 automatic fixed bin(17,0) dcl 44 set ref 67* 69 76 rcp_sys_$authenticate_device 000010 constant entry external dcl 53 ref 144 substr builtin function dcl 65 ref 107 107 107 129 verify builtin function dcl 65 ref 107 107 119 NAME DECLARED BY EXPLICIT CONTEXT. authenticate_device 000161 constant entry external dcl 21 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1716 1752 1557 1726 Length 2142 1557 34 153 136 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME authenticate_device 164 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME authenticate_device 000100 device_name authenticate_device 000102 authentication_code authenticate_device 000103 err_msg authenticate_device 000144 nargs authenticate_device 000145 dlen authenticate_device 000146 code authenticate_device 000147 arg_len authenticate_device 000150 arg_ptr authenticate_device THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr rcp_sys_$authenticate_device THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed error_table_$auth_incorrect error_table_$auth_unknown error_table_$improper_data_format error_table_$noarg error_table_$too_many_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 21 000160 67 000166 69 000174 71 000177 73 000226 76 000227 78 000231 80 000260 83 000261 85 000300 87 000302 88 000322 91 000323 92 000330 93 000332 95 000351 97 000353 98 000373 101 000374 107 000402 111 000435 112 000474 119 000475 121 000507 122 000543 129 000544 131 000550 134 000604 136 000640 144 000641 146 000662 149 000664 150 000667 151 000670 152 000675 153 000676 154 000700 155 000701 156 000706 157 000707 159 000721 161 000726 164 000755 ----------------------------------------------------------- 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