Commit | Line | Data |
---|---|---|
f2a0d81d C |
1 | .RP |
2 | .TM 78-1273-5 39199 39199-11 | |
3 | .ND October 31, 1978 | |
4 | .if \n(TN>0 .FS | |
5 | .if \n(TN>0 * On internship from Department 9444. | |
6 | .if \n(TN>0 .FE | |
7 | .TL | |
8 | Uucp Implementation Description | |
9 | .AU "MH 2C-572" 3126 | |
10 | .ie \n(TN>0 D. A. Nowitz\s-2\u*\d\s+2 | |
11 | .el D. A. Nowitz | |
12 | .AB | |
13 | .PP | |
14 | Uucp is a series of programs designed to permit communication | |
15 | between | |
16 | UNIX | |
17 | systems using either dial-up or hardwired communication | |
18 | lines. | |
19 | This document gives a detailed implementation | |
20 | description of the current (second) | |
21 | implementation of uucp. | |
22 | .PP | |
23 | This document is | |
24 | for use by an administrator/installer of the system. | |
25 | It is not meant as a user's guide. | |
26 | .AE | |
27 | .CS 12 5 15 | |
28 | .SH | |
29 | Introduction | |
30 | .LP | |
31 | Uucp is a series of programs designed to permit communication between | |
32 | .UX | |
33 | systems using either dial-up or | |
34 | hardwired communication lines. | |
35 | It is used for file transfers and remote command execution. | |
36 | The first version of the system was designed and implemented | |
37 | by M. E. Lesk.\s-2\u1\d\s+2 | |
38 | .FS | |
39 | 1 M. E. Lesk and A. S. Cohen, | |
40 | .UX | |
41 | Software Distribution by Communication Link, | |
42 | .ie \n(TN>0 TM-77-1274-3, TM-77-8234-5. | |
43 | .el private communication. | |
44 | .FE | |
45 | This paper describes the current (second) implementation | |
46 | of the system. | |
47 | .LP | |
48 | Uucp is a batch type operation. | |
49 | Files are created in a spool directory for processing | |
50 | by the uucp demons. | |
51 | There are three types of files used for the execution | |
52 | of work. | |
53 | .I Data\ files | |
54 | contain data for transfer to remote systems. | |
55 | .I Work\ files | |
56 | contain directions for file transfers between systems. | |
57 | .I Execution\ files | |
58 | are directions for | |
59 | .UX | |
60 | command executions which | |
61 | involve the resources of one or more systems. | |
62 | .LP | |
63 | The uucp system consists of four primary and two | |
64 | secondary programs. | |
65 | The primary programs are: | |
66 | .RS | |
67 | .IP uucp 10 | |
68 | This program creates work and gathers data files in the spool directory | |
69 | for the transmission of files. | |
70 | .IP uux | |
71 | This program creates work files, execute files and gathers data files for the remote execution of | |
72 | .UX | |
73 | commands. | |
74 | .IP uucico | |
75 | This program executes the work files for data transmission. | |
76 | .IP uuxqt | |
77 | This program executes the execution files for | |
78 | .UX | |
79 | command execution. | |
80 | .RE | |
81 | .ne 10 | |
82 | .LP | |
83 | The secondary programs are: | |
84 | .RS | |
85 | .IP uulog 10 | |
86 | This program updates the log file with new entries | |
87 | and reports on the status of uucp requests. | |
88 | .IP uuclean | |
89 | This program removes old files from the spool directory. | |
90 | .LP | |
91 | .RE | |
92 | The remainder of this paper will describe the operation | |
93 | of each program, the installation of the system, | |
94 | the security aspects of the system, | |
95 | the files required for execution, | |
96 | and the administration of the system. | |
97 | .NH | |
98 | Uucp - UNIX to UNIX File Copy | |
99 | .LP | |
100 | The | |
101 | .I uucp | |
102 | command is the user's primary interface with the system. | |
103 | The | |
104 | .I uucp | |
105 | command was designed to look like | |
106 | .I cp | |
107 | to the user. | |
108 | The syntax is | |
109 | .IP | |
110 | .I uucp\ \ | |
111 | .B [ | |
112 | option | |
113 | .B ] | |
114 | \ ...\ \ source\ ...\ \ destination | |
115 | .LP | |
116 | where the source and destination | |
117 | may contain the prefix | |
118 | .I system-name! | |
119 | which indicates the system on which the file | |
120 | or files reside | |
121 | or where they will be copied. | |
122 | .LP | |
123 | The options interpreted by | |
124 | .I uucp | |
125 | are: | |
126 | .RS | |
127 | .IP \-d 10 | |
128 | Make directories when necessary for copying the file. | |
129 | .IP \-c | |
130 | Don't copy source files to the spool directory, | |
131 | but use the specified source when the actual | |
132 | transfer takes place. | |
133 | .IP \-g\fIletter\fR | |
134 | Put | |
135 | .I letter | |
136 | in as the grade in the name of the work file. | |
137 | (This can be used to change the order of work for a particular | |
138 | machine.) | |
139 | .IP \-m | |
140 | Send mail on completion of the work. | |
141 | .LP | |
142 | The following options are used primarily for debugging: | |
143 | .IP \-r 10 | |
144 | Queue the job but do not start | |
145 | .I uucico | |
146 | program. | |
147 | .IP \-s\fIdir\fR | |
148 | Use directory | |
149 | .I dir | |
150 | for the spool directory. | |
151 | .IP \-x\fInum\fR | |
152 | .I Num | |
153 | is the level of debugging output desired. | |
154 | .RE | |
155 | .LP | |
156 | The destination may be a directory name, | |
157 | in which case the file name is taken from the last part of the | |
158 | source's name. | |
159 | The source | |
160 | name may contain special shell characters | |
161 | such as ``\fI?*[]\fR''. | |
162 | If a source argument has a | |
163 | .I system-name! | |
164 | prefix for a remote system, | |
165 | the file name expansion will be done on the remote system. | |
166 | .LP | |
167 | The command | |
168 | .IP "" 12 | |
169 | uucp\ \ *.c\ \ usg!/usr/dan | |
170 | .LP | |
171 | will set up the transfer of all files whose names end with ``.c'' | |
172 | to the ``/usr/dan'' directory on the``usg'' machine. | |
173 | .LP | |
174 | The source and/or destination names may also contain a | |
175 | .I ~user | |
176 | prefix. | |
177 | This translates to the login directory on | |
178 | the specified system. | |
179 | For names with partial path-names, | |
180 | the current directory is prepended to the file name. | |
181 | File names with | |
182 | .I ../ | |
183 | are not permitted. | |
184 | .LP | |
185 | The command | |
186 | .IP "" 12 | |
187 | uucp\ \ usg!~dan/*.h\ \ ~dan | |
188 | .LP | |
189 | will set up the transfer of files whose names end with ``.h'' | |
190 | in dan's login | |
191 | directory on system ``usg'' to dan's local | |
192 | login directory. | |
193 | .LP | |
194 | For each source file, | |
195 | the program will check the source and destination | |
196 | file-names | |
197 | and the system-part of each to | |
198 | classify the work into one of five types: | |
199 | .RS | |
200 | .IP [1] | |
201 | Copy source to destination on local system. | |
202 | .IP [2] | |
203 | Receive files from other systems. | |
204 | .IP [3] | |
205 | Send files to a remote systems. | |
206 | .IP [4] | |
207 | Send files from remote systems | |
208 | to another remote system. | |
209 | .IP [5] | |
210 | Receive files from remote systems when the source | |
211 | contains special shell characters as | |
212 | mentioned above. | |
213 | .RE | |
214 | .LP | |
215 | After the work has been set up in the spool directory, | |
216 | the | |
217 | .I uucico | |
218 | program is started to try to contact the other | |
219 | machine to execute the work (unless the \-r option | |
220 | was specified). | |
221 | .SH | |
222 | Type 1 | |
223 | .LP | |
224 | A | |
225 | .I cp | |
226 | command is used to do the work. | |
227 | The | |
228 | .I \-d | |
229 | and the | |
230 | .I \-m | |
231 | options are not honored in this case. | |
232 | .SH | |
233 | Type 2 | |
234 | .LP | |
235 | A one line | |
236 | .I "work file" | |
237 | is created for each file requested and put in the spool directory | |
238 | with the following fields, each separated by a blank. | |
239 | (All | |
240 | .I "work files" | |
241 | and | |
242 | .I "execute files" | |
243 | use a blank as the field separator.) | |
244 | .RS | |
245 | .IP [1] | |
246 | R | |
247 | .IP [2] | |
248 | The full path-name of the source or a ~user/path-name. | |
249 | The | |
250 | .I ~user | |
251 | part will be expanded on the remote system. | |
252 | .IP [3] | |
253 | The full path-name of the destination file. | |
254 | If the | |
255 | .I ~user | |
256 | notation is used, it will be immediately | |
257 | expanded to be the login directory for the user. | |
258 | .IP [4] | |
259 | The user's login name. | |
260 | .IP [5] | |
261 | A ``\-'' followed by an option list. | |
262 | (Only the \-m and \-d options will appear in this list.) | |
263 | .RE | |
264 | .KS | |
265 | .SH | |
266 | Type 3 | |
267 | .LP | |
268 | For each source file, a | |
269 | .I "work file" | |
270 | is created and the source file is copied into a | |
271 | .I "data file" | |
272 | in the spool directory. | |
273 | (A ``\-c'' option on the | |
274 | .I uucp | |
275 | command will prevent the | |
276 | .I "data file" | |
277 | from being made.) | |
278 | In this case, the file will be transmitted from | |
279 | the indicated source.) | |
280 | The fields of each entry are given below. | |
281 | .RS | |
282 | .IP [1] | |
283 | S | |
284 | .IP [2] | |
285 | The full-path name of the source file. | |
286 | .IP [3] | |
287 | The full-path name of the destination or | |
288 | ~user/file-name. | |
289 | .IP [4] | |
290 | The user's login name. | |
291 | .IP [5] | |
292 | A ``\-'' followed by an option list. | |
293 | .IP [6] | |
294 | The name of the | |
295 | .I "data file" | |
296 | in the spool directory. | |
297 | .IP [7] | |
298 | The file mode bits of the source file | |
299 | in octal print format | |
300 | (e.g. 0666). | |
301 | .RE | |
302 | .KE | |
303 | .SH | |
304 | Type 4 and Type 5 | |
305 | .LP | |
306 | .I Uucp | |
307 | generates a | |
308 | .I uucp | |
309 | command and sends it to the remote machine; | |
310 | the remote | |
311 | .I uucico | |
312 | executes the | |
313 | .I uucp | |
314 | command. | |
315 | .NH | |
316 | Uux - UNIX To UNIX Execution | |
317 | .LP | |
318 | The | |
319 | .I uux | |
320 | command is used to set up the execution of a | |
321 | .UX | |
322 | command | |
323 | where the execution machine and/or some of the | |
324 | files are remote. | |
325 | The syntax of the uux command is | |
326 | .IP | |
327 | .I uux\ \ | |
328 | .B [ | |
329 | \- | |
330 | .B "] [" | |
331 | option | |
332 | .B ] | |
333 | \ ...\ \ command-string | |
334 | .LP | |
335 | where the command-string is made up of one or more arguments. | |
336 | All special shell characters such as ``<>|^'' must be quoted | |
337 | either by quoting the entire command-string | |
338 | or quoting the character as a separate argument. | |
339 | Within the command-string, the command and file names may | |
340 | contain a | |
341 | .I system-name! | |
342 | prefix. | |
343 | All arguments which do not contain a ``!'' will not | |
344 | be treated as files. | |
345 | (They will not be copied to the execution machine.) | |
346 | The ``\-'' is used to indicate that the standard input | |
347 | for | |
348 | .I command-string | |
349 | should be inherited from the standard input | |
350 | of the | |
351 | .I uux | |
352 | command. | |
353 | The options, essentially for debugging, are: | |
354 | .RS | |
355 | .IP \-r 10 | |
356 | Don't start | |
357 | .I uucico | |
358 | or | |
359 | .I uuxqt | |
360 | after queuing the job; | |
361 | .IP \-x\fInum\fR | |
362 | Num is the level of debugging output desired. | |
363 | .RE | |
364 | .LP | |
365 | The command | |
366 | .IP "" 12 | |
367 | pr\ \ abc\ \ |\ \ uux\ \ \-\ \ usg!lpr | |
368 | .LP | |
369 | will set up the output of ``pr abc'' | |
370 | as standard input to an lpr command | |
371 | to be executed on system ``usg''. | |
372 | .LP | |
373 | .I Uux | |
374 | generates an | |
375 | .I "execute file" | |
376 | which contains the | |
377 | names of the files required | |
378 | for execution (including standard input), | |
379 | the user's login name, the destination | |
380 | of the standard output, and the command to be executed. | |
381 | This file is either put in the spool directory | |
382 | for local execution or sent to the remote system using | |
383 | a generated send command (type 3 above). | |
384 | .LP | |
385 | For required files which are not on the execution machine, | |
386 | .I uux | |
387 | will generate receive command files (type 2 above). | |
388 | These command-files will be put on the execution machine and | |
389 | executed by the | |
390 | .I uucico | |
391 | program. | |
392 | (This will work only if the local system has permission | |
393 | to put files in the remote spool directory as controlled | |
394 | by the remote | |
395 | .I USERFILE . | |
396 | ) | |
397 | .LP | |
398 | The | |
399 | .I "execute file" | |
400 | will be processed | |
401 | by the | |
402 | .I uuxqt | |
403 | program on the execution machine. | |
404 | It is made up of several lines, | |
405 | each of which contains an identification character | |
406 | and one or more arguments. | |
407 | The order of the lines in the file is not relevant | |
408 | and some of the lines may not be present. | |
409 | Each line is described below. | |
410 | .RS | |
411 | .SH | |
412 | User Line | |
413 | .IP | |
414 | U\ \ user\ \ system | |
415 | .LP | |
416 | where the | |
417 | .I user | |
418 | and | |
419 | .I system | |
420 | are the requester's login name and system. | |
421 | .SH | |
422 | Required File Line | |
423 | .IP | |
424 | F file-name real-name | |
425 | .LP | |
426 | where the | |
427 | .I file-name | |
428 | is the generated name of a file for the execute machine | |
429 | and | |
430 | .I real-name | |
431 | is the last part of the actual file name (contains no | |
432 | path information). | |
433 | Zero or more of these lines may be present in the | |
434 | .I "execute file" . | |
435 | The | |
436 | .I uuxqt | |
437 | program will check for the existence of all required | |
438 | files before the command is executed. | |
439 | .SH | |
440 | Standard Input Line | |
441 | .IP | |
442 | I\ \ file-name | |
443 | .LP | |
444 | The standard input is either specified by a ``<'' in the | |
445 | command-string or inherited from the standard input of the | |
446 | .I uux | |
447 | command if the ``\-'' option is used. | |
448 | If a standard input is not specified, | |
449 | ``/dev/null'' is used. | |
450 | .SH | |
451 | Standard Output Line | |
452 | .IP | |
453 | O\ \ file-name\ \ system-name | |
454 | .LP | |
455 | The standard output is specified by a ``>'' within the | |
456 | command-string. | |
457 | If a standard output is not specified, | |
458 | ``/dev/null'' is used. | |
459 | (Note \- the use of ``>>'' is not implemented.) | |
460 | .SH | |
461 | Command Line | |
462 | .IP | |
463 | C\ \ command\ \ | |
464 | .B [ | |
465 | arguments | |
466 | .B ] | |
467 | \ ... | |
468 | .LP | |
469 | The arguments are those specified in the command-string. | |
470 | The standard input and standard output will not appear on this | |
471 | line. | |
472 | All | |
473 | .I "required files" | |
474 | will be moved to the execution directory (a subdirectory | |
475 | of the spool directory) | |
476 | and the | |
477 | .UX | |
478 | command is executed using the Shell specified in the | |
479 | .I uucp.h | |
480 | header file. | |
481 | In addition, a shell ``PATH'' statement is prepended | |
482 | to the command line as specified in the | |
483 | .I uuxqt | |
484 | program. | |
485 | .LP | |
486 | After execution, the standard output is copied or set up to be | |
487 | sent to the proper place. | |
488 | .RE | |
489 | .NH | |
490 | Uucico - Copy In, Copy Out | |
491 | .LP | |
492 | The | |
493 | .I uucico | |
494 | program will perform the following major functions: | |
495 | .RS | |
496 | .IP -\ \ 3 | |
497 | Scan the spool directory for work. | |
498 | .IP -\ \ | |
499 | Place a call to a remote system. | |
500 | .IP -\ \ | |
501 | Negotiate a line protocol to be used. | |
502 | .IP -\ \ | |
503 | Execute all requests from both systems. | |
504 | .IP -\ \ | |
505 | Log work requests and work completions. | |
506 | .RE | |
507 | .LP | |
508 | .I Uucico | |
509 | may be started in several ways; | |
510 | .RS | |
511 | .IP a) 5 | |
512 | by a system daemon, | |
513 | .IP b) | |
514 | by one of the | |
515 | .I | |
516 | uucp, uux, uuxqt | |
517 | .R | |
518 | or | |
519 | .I uucico | |
520 | programs, | |
521 | .IP c) | |
522 | directly by the user (this is usually for testing), | |
523 | .IP d) | |
524 | by a remote system. | |
525 | (The uucico program should be specified as the ``shell'' | |
526 | field in the ``/etc/passwd'' file for the ``uucp'' logins.) | |
527 | .RE | |
528 | .LP | |
529 | When started by method a, b or c, the program is considered to | |
530 | be in | |
531 | .I MASTER | |
532 | mode. | |
533 | In this mode, a connection will be made to a remote system. | |
534 | If started by a remote system (method d), | |
535 | the program is considered to be in | |
536 | .I SLAVE | |
537 | mode. | |
538 | .LP | |
539 | The | |
540 | .I MASTER | |
541 | mode will operate in one of two ways. | |
542 | If no system name is specified | |
543 | (\-s option not specified) | |
544 | the program will scan the spool directory for | |
545 | systems to call. | |
546 | If a system name is specified, that system will be called, | |
547 | and work will only be done for that system. | |
548 | .LP | |
549 | The | |
550 | .I uucico | |
551 | program is generally started by another program. | |
552 | There are several options used for execution: | |
553 | .RS | |
554 | .IP \-r1 10 | |
555 | Start the program in | |
556 | .I MASTER | |
557 | mode. | |
558 | This is used when | |
559 | .I uucico | |
560 | is started by a program or ``cron'' shell. | |
561 | .IP \-s\fIsys\fR | |
562 | Do work only for system | |
563 | .I sys. | |
564 | If | |
565 | .I \-s | |
566 | is specified, | |
567 | a call to the specified system | |
568 | will be made even if there is no work for system | |
569 | .I sys | |
570 | in the spool directory. | |
571 | This is useful for polling systems which do not have | |
572 | the hardware to initiate a connection. | |
573 | .LP | |
574 | The following options are used primarily for debugging: | |
575 | .IP \-d\fIdir\fR | |
576 | Use directory | |
577 | .I dir | |
578 | for the spool directory. | |
579 | .IP \-x\fInum\fR | |
580 | .I Num | |
581 | is the level of debugging output desired. | |
582 | .RE | |
583 | .LP | |
584 | The next part of this section will describe the major steps within | |
585 | the | |
586 | .I uucico | |
587 | program. | |
588 | .SH | |
589 | Scan For Work | |
590 | .LP | |
591 | The names of the work related files in the spool directory have format | |
592 | .IP | |
593 | type . system-name grade number | |
594 | .LP | |
595 | where: | |
596 | .IP | |
597 | .I Type | |
598 | is an upper case letter, | |
599 | ( | |
600 | .I C | |
601 | -\ copy command file, | |
602 | .I D | |
603 | -\ data file, | |
604 | .I X | |
605 | -\ execute file); | |
606 | .IP | |
607 | .I System-name | |
608 | is the remote system; | |
609 | .IP | |
610 | .I Grade | |
611 | is a character; | |
612 | .IP | |
613 | .I Number | |
614 | is a four digit, padded sequence number. | |
615 | .LP | |
616 | The file | |
617 | .IP "" 12 | |
618 | C.res45n0031 | |
619 | .LP | |
620 | would be a | |
621 | .I "work file" | |
622 | for a file transfer between the local | |
623 | machine and the ``res45'' machine. | |
624 | .LP | |
625 | The scan for work is done by looking through the | |
626 | spool directory for | |
627 | .I "work files" | |
628 | (files with prefix ``C.''). | |
629 | A list is made of all systems to be called. | |
630 | .I Uucico | |
631 | will then call each system and process all | |
632 | .I "work files" . | |
633 | .SH | |
634 | Call Remote System | |
635 | .LP | |
636 | The call is made using information from several | |
637 | files which reside in the uucp program directory. | |
638 | At the start of the call process, a lock is | |
639 | set to forbid multiple conversations | |
640 | between the same two systems. | |
641 | .LP | |
642 | The system name is found in the | |
643 | .I L.sys | |
644 | file. | |
645 | The information contained for each system is; | |
646 | .RS | |
647 | .IP [1] | |
648 | system name, | |
649 | .IP [2] | |
650 | times to call the system | |
651 | (days-of-week and times-of-day), | |
652 | .IP [3] | |
653 | device or device type to be used for call, | |
654 | .IP [4] | |
655 | line speed, | |
656 | .IP [5] | |
657 | phone number if field [3] is | |
658 | .I ACU | |
659 | or the device name (same as field [3]) | |
660 | if not | |
661 | .I ACU, | |
662 | .IP [6] | |
663 | login information (multiple fields), | |
664 | .RE | |
665 | .LP | |
666 | The time field is checked against the present time to see | |
667 | if the call should be made. | |
668 | .LP | |
669 | The | |
670 | .I | |
671 | phone number | |
672 | .R | |
673 | may contain abbreviations (e.g. mh, py, boston) which get translated into dial | |
674 | sequences using the | |
675 | .I L-dialcodes | |
676 | file. | |
677 | .LP | |
678 | The | |
679 | .I L-devices | |
680 | file is scanned using fields [3] and [4] from the | |
681 | .I L.sys | |
682 | file to find an available device for the call. | |
683 | The program will try all devices which satisfy | |
684 | [3] and [4] until the call is made, or no more | |
685 | devices can be tried. | |
686 | If a device is successfully opened, a lock file | |
687 | is created so that another copy of | |
688 | .I uucico | |
689 | will not try to use it. | |
690 | If the call is complete, the | |
691 | .I | |
692 | login information | |
693 | .R | |
694 | (field [6] of | |
695 | .I L.sys ) | |
696 | is used to login. | |
697 | .LP | |
698 | The conversation between the two | |
699 | .I uucico | |
700 | programs begins with a handshake started by the called, | |
701 | .I SLAVE , | |
702 | system. | |
703 | The | |
704 | .I SLAVE | |
705 | sends a message to let the | |
706 | .I MASTER | |
707 | know it is ready to receive the system | |
708 | identification and conversation sequence number. | |
709 | The response from the | |
710 | .I MASTER | |
711 | is | |
712 | verified by the | |
713 | .I SLAVE | |
714 | and if acceptable, protocol selection begins. | |
715 | The | |
716 | .I SLAVE | |
717 | can also reply with a ``call-back required'' | |
718 | message in which case, the current conversation | |
719 | is terminated. | |
720 | .SH | |
721 | Line Protocol Selection | |
722 | .LP | |
723 | The remote system sends a message | |
724 | .IP "" 12 | |
725 | P\fIproto-list\fR | |
726 | .LP | |
727 | where proto-list is a string of characters, each | |
728 | representing a line protocol. | |
729 | .LP | |
730 | The calling program checks the proto-list | |
731 | for a letter corresponding to an available line | |
732 | protocol and returns a | |
733 | .I use-protocol | |
734 | message. | |
735 | The | |
736 | .I use-protocol | |
737 | message is | |
738 | .IP "" 12 | |
739 | U\fIcode\fR | |
740 | .LP | |
741 | where code is either a one character | |
742 | protocol letter or | |
743 | .I N | |
744 | which means there is no common protocol. | |
745 | .SH | |
746 | Work Processing | |
747 | .LP | |
748 | The initial roles ( | |
749 | .I MASTER | |
750 | or | |
751 | .I SLAVE | |
752 | ) for the work processing are | |
753 | the mode in which each program starts. | |
754 | (The | |
755 | .I MASTER | |
756 | has been specified by the ``\-r1'' uucico option.) | |
757 | The | |
758 | .I MASTER | |
759 | program does a work search similar to the | |
760 | one used in the ``Scan For Work'' section. | |
761 | .LP | |
762 | There are five messages used during the | |
763 | work processing, each specified by the first | |
764 | character of the message. | |
765 | They are; | |
766 | .IP "" 12 | |
767 | .RS | |
768 | .IP S 3 | |
769 | send a file, | |
770 | .IP R | |
771 | receive a file, | |
772 | .IP C | |
773 | copy complete, | |
774 | .IP X | |
775 | execute a | |
776 | .I uucp | |
777 | command, | |
778 | .IP H | |
779 | hangup. | |
780 | .RE | |
781 | .LP | |
782 | The | |
783 | .I MASTER | |
784 | will send | |
785 | .I R , | |
786 | .I S | |
787 | or | |
788 | .I X | |
789 | messages until all work from the spool directory is | |
790 | complete, at which point an | |
791 | .I H | |
792 | message will be sent. | |
793 | The | |
794 | .I SLAVE | |
795 | will reply with | |
796 | \fISY\fR, \fISN\fR, \fIRY\fR, \fIRN\fR, \fIHY\fR, \fIHN\fR, | |
797 | \fIXY\fR, \fIXN\fr, | |
798 | corresponding to | |
799 | .I yes | |
800 | or | |
801 | .I no | |
802 | for each request. | |
803 | .LP | |
804 | The send and receive replies are | |
805 | based on permission to access the | |
806 | requested file/directory using the | |
807 | .I USERFILE | |
808 | and read/write permissions of the file/directory. | |
809 | After each file is copied into the spool directory | |
810 | of the receiving system, | |
811 | a copy-complete message is sent by the receiver of the file. | |
812 | The message | |
813 | .I CY | |
814 | will be sent if the | |
815 | file has successfully been moved from the | |
816 | temporary spool file to the actual destination. | |
817 | Otherwise, a | |
818 | .I CN | |
819 | message is sent. | |
820 | (In the case of | |
821 | .I CN , | |
822 | the transferred file will be in the spool | |
823 | directory with a name beginning with ``TM'.) | |
824 | The requests and results are logged on both systems. | |
825 | .LP | |
826 | The hangup response is determined by the | |
827 | .I SLAVE | |
828 | program by a work scan of the spool directory. | |
829 | If work for the remote system exists in the | |
830 | .I SLAVE's | |
831 | spool directory, an | |
832 | .I HN | |
833 | message is sent and the programs switch roles. | |
834 | If no work exists, an | |
835 | .I HY | |
836 | response is sent. | |
837 | .SH | |
838 | Conversation Termination | |
839 | .LP | |
840 | When a | |
841 | .I HY | |
842 | message is received by the | |
843 | .I MASTER | |
844 | it is echoed back to the | |
845 | .I SLAVE | |
846 | and the protocols are turned off. | |
847 | Each program sends a final ``OO'' message to the | |
848 | other. | |
849 | The original | |
850 | .I SLAVE | |
851 | program will clean up and terminate. | |
852 | The | |
853 | .I MASTER | |
854 | will proceed to call other systems | |
855 | and process work as long as possible | |
856 | or terminate if a | |
857 | .I \-s | |
858 | option was specified. | |
859 | .LP | |
860 | .NH | |
861 | Uuxqt - Uucp Command Execution | |
862 | .LP | |
863 | The | |
864 | .I uuxqt | |
865 | program is used to execute | |
866 | .I | |
867 | execute files | |
868 | .R | |
869 | generated by | |
870 | .I uux. | |
871 | The | |
872 | .I uuxqt | |
873 | program may be started by either the | |
874 | .I uucico | |
875 | or | |
876 | .I uux | |
877 | programs. | |
878 | The program scans the spool directory for | |
879 | .I | |
880 | execute files | |
881 | .R | |
882 | (prefix ``X.''). | |
883 | Each one is checked to see if all the required files are available and | |
884 | if so, the command line or send line is executed. | |
885 | .LP | |
886 | The | |
887 | .I | |
888 | execute file | |
889 | .R | |
890 | is described in the ``Uux'' | |
891 | section above. | |
892 | .SH | |
893 | Command Execution | |
894 | .LP | |
895 | The execution is accomplished by executing a | |
896 | .I | |
897 | sh \-c | |
898 | .R | |
899 | of the command line after appropriate | |
900 | standard input and standard output have been opened. | |
901 | If a standard output is specified, the program | |
902 | will create a send command or copy the output | |
903 | file as appropriate. | |
904 | .NH | |
905 | Uulog - Uucp Log Inquiry | |
906 | .LP | |
907 | The | |
908 | .I uucp | |
909 | programs create individual | |
910 | log files for each program invocation. | |
911 | Periodically, | |
912 | .I uulog | |
913 | may be executed to prepend these files to the | |
914 | system logfile. | |
915 | This method of logging was chosen to minimize file | |
916 | locking of the logfile during program execution. | |
917 | .LP | |
918 | The | |
919 | .I uulog | |
920 | program merges the individual | |
921 | log files and outputs specified log entries. | |
922 | The output request is specified by the use of the | |
923 | following options: | |
924 | .RS | |
925 | .IP \-s\fIsys\fR 9 | |
926 | Print entries where | |
927 | .I sys | |
928 | is the remote system name; | |
929 | .IP \-u\fIuser\fR | |
930 | Print entries for user | |
931 | .I user. | |
932 | .RE | |
933 | .LP | |
934 | The intersection of lines satisfying the two options is output. | |
935 | A null | |
936 | .I sys | |
937 | or | |
938 | .I user | |
939 | means all system names or users respectively. | |
940 | .NH | |
941 | Uuclean - Uucp Spool Directory Cleanup | |
942 | .LP | |
943 | This program is typically started by the daemon, once a day. | |
944 | Its function is to remove files from the spool directory which | |
945 | are more than 3 days old. | |
946 | These are usually files for work which can not be completed. | |
947 | .LP | |
948 | .LP | |
949 | The options available are: | |
950 | .RS | |
951 | .IP \-d\fIdir\fR 10 | |
952 | The directory to be scanned is | |
953 | .I dir . | |
954 | .IP \-m | |
955 | Send mail to the owner of each file being removed. | |
956 | (Note that most files put into the spool directory | |
957 | will be owned by the owner of the | |
958 | uucp programs since the setuid bit will be set on these | |
959 | programs. | |
960 | The mail will therefore most often go to the owner | |
961 | of the uucp programs.) | |
962 | .IP \-n\fIhours\fR | |
963 | Change the aging time from 72 hours to | |
964 | .I hours | |
965 | hours. | |
966 | .IP \-p\fIpre\fR | |
967 | Examine files with prefix | |
968 | .I pre | |
969 | for deletion. | |
970 | (Up to 10 file prefixes may be specified.) | |
971 | .IP \-x\fInum\fR | |
972 | This is the level of debugging output desired. | |
973 | .RE | |
974 | .NH | |
975 | Security | |
976 | .LP | |
977 | .LG | |
978 | \fB | |
979 | The uucp system, left unrestricted, | |
980 | will let any outside user execute any commands | |
981 | and copy in/out any file which is readable/writable | |
982 | by the uucp login user. | |
983 | It is up to the individual sites to be aware of this and | |
984 | apply the protections that they feel are necessary. | |
985 | \fR | |
986 | .NL | |
987 | .LP | |
988 | There are several security features available aside from the | |
989 | normal file mode protections. | |
990 | These must be set up by the installer of the | |
991 | .I uucp | |
992 | system. | |
993 | .IP - 3 | |
994 | The login for uucp does not get a standard shell. | |
995 | Instead, the | |
996 | .I uucico | |
997 | program is started. | |
998 | Therefore, the only work that can be done is through | |
999 | .I uucico . | |
1000 | .IP - | |
1001 | A path check is done on file names that are to be sent | |
1002 | or received. | |
1003 | The | |
1004 | .I USERFILE | |
1005 | supplies the information for these checks. | |
1006 | The | |
1007 | .I USERFILE | |
1008 | can also be set up to require call-back | |
1009 | for certain login-ids. | |
1010 | (See the ``Files required for execution'' section | |
1011 | for the file description.) | |
1012 | .IP - | |
1013 | A conversation sequence count can be set up so | |
1014 | that the called system | |
1015 | can be more confident that the caller | |
1016 | is who he says he is. | |
1017 | .IP - | |
1018 | The | |
1019 | .I uuxqt | |
1020 | program comes with a list of commands that it | |
1021 | will execute. | |
1022 | A ``PATH'' shell statement is prepended to the command | |
1023 | line as specifed in the | |
1024 | .I uuxqt | |
1025 | program. | |
1026 | The installer may modify the list or remove the | |
1027 | restrictions as desired. | |
1028 | .IP - | |
1029 | The | |
1030 | .I L.sys | |
1031 | file should be owned by uucp and have mode 0400 | |
1032 | to protect the phone numbers and login information | |
1033 | for remote sites. | |
1034 | (Programs uucp, uucico, uux, uuxqt should be also | |
1035 | owned by uucp and have the setuid bit set.) | |
1036 | .NH | |
1037 | Uucp Installation | |
1038 | .LP | |
1039 | There are several source modifications that may be required | |
1040 | before the system programs are compiled. | |
1041 | These relate to the directories used during compilation, | |
1042 | the directories used during execution, | |
1043 | and the local | |
1044 | .I | |
1045 | uucp system-name. | |
1046 | .R | |
1047 | .LP | |
1048 | The four directories are: | |
1049 | .RS | |
1050 | .IP lib 12 | |
1051 | (/usr/src/cmd/uucp) | |
1052 | This directory contains the source files for generating the | |
1053 | .I uucp | |
1054 | system. | |
1055 | .IP program | |
1056 | (/usr/lib/uucp) | |
1057 | This is the directory used for the executable system programs and | |
1058 | the system files. | |
1059 | .IP spool | |
1060 | (/usr/spool/uucp) | |
1061 | This is the spool directory used during | |
1062 | .I uucp | |
1063 | execution. | |
1064 | .IP xqtdir | |
1065 | (/usr/spool/uucp/.XQTDIR) | |
1066 | This directory is used during execution of | |
1067 | .I "execute files" . | |
1068 | .RE | |
1069 | .LP | |
1070 | The names given in parentheses above are the default values | |
1071 | for the directories. | |
1072 | The italicized named | |
1073 | .I | |
1074 | lib, program, xqtdir, | |
1075 | .R | |
1076 | and | |
1077 | .I spool | |
1078 | will be used in the following text to represent the | |
1079 | appropriate directory names. | |
1080 | .LP | |
1081 | There are two files which may require modification, | |
1082 | the | |
1083 | .I makefile | |
1084 | file and the | |
1085 | .I uucp.h | |
1086 | file. | |
1087 | The following paragraphs describe the modifications. | |
1088 | The modes of | |
1089 | .I spool | |
1090 | and | |
1091 | .I xqtdir | |
1092 | should be made ``0777''. | |
1093 | .SH | |
1094 | Uucp.h modification | |
1095 | .LP | |
1096 | Change the | |
1097 | .I program | |
1098 | and the | |
1099 | .I spool | |
1100 | names from the default values to the directory | |
1101 | names to be used on the local system using | |
1102 | global edit commands. | |
1103 | .LP | |
1104 | Change the | |
1105 | .I define | |
1106 | value for | |
1107 | .I MYNAME | |
1108 | to be the local | |
1109 | .I uucp | |
1110 | system-name. | |
1111 | .SH | |
1112 | makefile modification | |
1113 | .LP | |
1114 | There are several | |
1115 | .I make | |
1116 | variable definitions which may need modification. | |
1117 | .RS | |
1118 | .IP INSDIR 10 | |
1119 | This is the | |
1120 | .I program | |
1121 | directory | |
1122 | (e.g. INSDIR=/usr/lib/uucp). | |
1123 | This parameter is used if ``make cp'' is | |
1124 | used after the programs are compiled. | |
1125 | .IP IOCTL | |
1126 | This is required to be set if an appropriate | |
1127 | .I ioctl | |
1128 | interface subroutine does not exist in the standard | |
1129 | ``C'' library; | |
1130 | the statement | |
1131 | ``IOCTL=ioctl.o'' is required in this case. | |
1132 | .IP PKON | |
1133 | The statement ``PKON=pkon.o'' is required if the | |
1134 | packet driver is not in the kernel. | |
1135 | .RE | |
1136 | .SH | |
1137 | Compile the system | |
1138 | The command | |
1139 | .IP "" 12 | |
1140 | make | |
1141 | .LP | |
1142 | will compile the entire system. | |
1143 | The command | |
1144 | .IP "" 12 | |
1145 | make cp | |
1146 | .LP | |
1147 | will copy the commands to the | |
1148 | to the appropriate directories. | |
1149 | .LP | |
1150 | The programs | |
1151 | .I uucp , | |
1152 | .I uux , | |
1153 | and | |
1154 | .I uulog | |
1155 | should be put in ``/usr/bin''. | |
1156 | The programs | |
1157 | .I uuxqt , | |
1158 | .I uucico , | |
1159 | and | |
1160 | .I uuclean | |
1161 | should be put in the | |
1162 | .I program | |
1163 | directory. | |
1164 | .SH | |
1165 | Files required for execution | |
1166 | .LP | |
1167 | There are four files which are required for execution, | |
1168 | all of which should reside in the | |
1169 | .I program | |
1170 | directory. | |
1171 | The field separator for all files is a space unless otherwise | |
1172 | specified. | |
1173 | .SH | |
1174 | L-devices | |
1175 | .LP | |
1176 | This file contains entries for the call-unit devices and | |
1177 | hardwired connections which are to be used by | |
1178 | .I uucp. | |
1179 | The special device files are assumed to be in the | |
1180 | .I /dev | |
1181 | directory. | |
1182 | The format for each entry is | |
1183 | .IP "" 12 | |
1184 | line\ \ call-unit\ \ speed | |
1185 | .LP | |
1186 | where; | |
1187 | .RS | |
1188 | .IP line 12 | |
1189 | is the device for the line (e.g. cul0), | |
1190 | .IP call-unit | |
1191 | is the automatic call unit associated with | |
1192 | .I line | |
1193 | (e.g. cua0), | |
1194 | (Hardwired lines have a number ``0'' in this field.), | |
1195 | .IP speed | |
1196 | is the line speed. | |
1197 | .RE | |
1198 | .LP | |
1199 | The line | |
1200 | .IP "" 12 | |
1201 | cul0\ \ cua0\ \ 300 | |
1202 | .LP | |
1203 | would be set up for a system which | |
1204 | had device cul0 wired to a call-unit | |
1205 | cua0 for use at 300 baud. | |
1206 | .SH | |
1207 | L-dialcodes | |
1208 | .LP | |
1209 | This file contains entries with location abbreviations used | |
1210 | in the | |
1211 | .I L.sys | |
1212 | file (e.g. py, mh, boston). | |
1213 | The entry format is | |
1214 | .IP "" 12 | |
1215 | abb\ \ dial-seq | |
1216 | .LP | |
1217 | where; | |
1218 | .RS | |
1219 | .IP abb 12 | |
1220 | is the abbreviation, | |
1221 | .IP dial-seq | |
1222 | is the dial sequence to call that location. | |
1223 | .RE | |
1224 | .LP | |
1225 | The line | |
1226 | .IP "" 12 | |
1227 | py\ \ 165\- | |
1228 | .LP | |
1229 | would be set up so that entry py7777 would | |
1230 | send 165\-7777 to the dial-unit. | |
1231 | .SH | |
1232 | LOGIN/SYSTEM NAMES | |
1233 | .LP | |
1234 | It is assumed that the | |
1235 | .I "login name" | |
1236 | used by a remote computer to call into a local computer | |
1237 | is not the same as the login name of a normal user | |
1238 | of that local machine. | |
1239 | However, several remote computers may employ the same | |
1240 | login name. | |
1241 | .LP | |
1242 | Each computer is given a unique | |
1243 | .I "system name" | |
1244 | which is transmitted at the start of each call. | |
1245 | This name identifies the calling machine to the called machine. | |
1246 | .SH | |
1247 | USERFILE | |
1248 | .LP | |
1249 | This file contains user accessibility information. | |
1250 | It specifies four types of constraint; | |
1251 | .RS | |
1252 | .IP [1] | |
1253 | which files can be accessed by a normal user of the local machine, | |
1254 | .IP [2] | |
1255 | which files can be accessed from a remote computer, | |
1256 | .IP [3] | |
1257 | which login name is used by a particular remote computer, | |
1258 | .IP [4] | |
1259 | whether a remote computer should be called back in order to confirm | |
1260 | its identity. | |
1261 | .RE | |
1262 | .LP | |
1263 | Each line in the file has the following format | |
1264 | .IP "" 6 | |
1265 | login,sys\ \ | |
1266 | .B [ | |
1267 | c | |
1268 | .B ] | |
1269 | \ \ path-name\ \ | |
1270 | .B [ | |
1271 | path-name | |
1272 | .B ] | |
1273 | \ ... | |
1274 | .LP | |
1275 | where; | |
1276 | .RS | |
1277 | .IP login 12 | |
1278 | is the login name for a user or the remote computer, | |
1279 | .IP sys | |
1280 | is the system name for a remote computer, | |
1281 | .IP c | |
1282 | is the optional | |
1283 | .I | |
1284 | call-back required | |
1285 | .R | |
1286 | flag, | |
1287 | .IP path-name | |
1288 | is a path-name prefix that is acceptable for | |
1289 | .I user. | |
1290 | .LP | |
1291 | .RE | |
1292 | .LP | |
1293 | The constraints are implemented as follows. | |
1294 | .RS | |
1295 | .IP [1] | |
1296 | When the program is obeying a command stored on the local machine, | |
1297 | .I MASTER | |
1298 | mode, | |
1299 | the path-names allowed are those given for the first line in the | |
1300 | .I USERFILE | |
1301 | that has a login name that matches the login name of the user | |
1302 | who entered the command. | |
1303 | If no such line is found, the first line with a | |
1304 | .I null | |
1305 | login name is used. | |
1306 | .IP [2] | |
1307 | When the program is responding to a command from a remote machine, | |
1308 | .I SLAVE | |
1309 | mode, the path-names allowed are those given for the first line | |
1310 | in the file that has the system name that matches the system name | |
1311 | of the remote machine. | |
1312 | If no such line is found, the first one with a | |
1313 | .I null | |
1314 | system name is used. | |
1315 | .IP [3] | |
1316 | When a remote computer logs in, the login name that | |
1317 | it uses must appear in the | |
1318 | .I USERFILE . | |
1319 | There may be several lines with the same login name but one of them must | |
1320 | either have the name of the remote system or must contain a | |
1321 | .I null | |
1322 | system name. | |
1323 | .IP [4] | |
1324 | If the line matched in ([3]) contains a ``c'', | |
1325 | the remote machine is called back before any transactions take place. | |
1326 | .RE | |
1327 | .LP | |
1328 | The line | |
1329 | .IP "" 12 | |
1330 | u,m /usr/xyz | |
1331 | .LP | |
1332 | allows machine | |
1333 | .I m | |
1334 | to login with name | |
1335 | .I u | |
1336 | and request the transfer of files whose names start with | |
1337 | ``/usr/xyz''. | |
1338 | .LP | |
1339 | The line | |
1340 | .IP "" 12 | |
1341 | dan, /usr/dan | |
1342 | .LP | |
1343 | allows the ordinary user | |
1344 | .I dan | |
1345 | to issue commands for files whose name starts with | |
1346 | ``/usr/dan''. | |
1347 | .LP | |
1348 | The lines | |
1349 | .IP "" 12 | |
1350 | u,m /usr/xyz /usr/spool | |
1351 | .br | |
1352 | u, /usr/spool | |
1353 | .LP | |
1354 | allows any remote machine to login with name | |
1355 | .I u , | |
1356 | but if its system name is not | |
1357 | .I m , | |
1358 | it can only ask to transfer files whose names start with | |
1359 | ``/usr/spool''. | |
1360 | .LP | |
1361 | The lines | |
1362 | .IP "" 12 | |
1363 | root, / | |
1364 | .br | |
1365 | , /usr | |
1366 | .LP | |
1367 | allows any user to transfer files beginning with ``/usr'' | |
1368 | but the user with login | |
1369 | .I root | |
1370 | can transfer any file. | |
1371 | .SH | |
1372 | L.sys | |
1373 | .LP | |
1374 | Each entry in this file represents one system | |
1375 | which can be called by the local uucp programs. | |
1376 | The fields are described below. | |
1377 | .RS | |
1378 | .SH | |
1379 | system name | |
1380 | .LP | |
1381 | The name of the remote system. | |
1382 | .SH | |
1383 | time | |
1384 | .LP | |
1385 | This is a string which indicates the days-of-week | |
1386 | and times-of-day when the system should | |
1387 | be called | |
1388 | (e.g. MoTuTh0800\-1730). | |
1389 | .LP | |
1390 | The day portion may be a list containing | |
1391 | some of | |
1392 | .IP | |
1393 | .I | |
1394 | Su Mo Tu We Th Fr Sa | |
1395 | .R | |
1396 | .LP | |
1397 | or it may be | |
1398 | .I Wk | |
1399 | for any week-day or | |
1400 | .I Any | |
1401 | for any day. | |
1402 | .LP | |
1403 | The time should be a range of times (e.g. 0800\-1230). | |
1404 | If no time portion is specified, any time | |
1405 | of day is assumed to be ok for the call. | |
1406 | .SH | |
1407 | device | |
1408 | .LP | |
1409 | This is either | |
1410 | .I ACU | |
1411 | or the hardwired device to be used for the call. | |
1412 | For the hardwired case, the last part of the | |
1413 | special file name is used (e.g. tty0). | |
1414 | .SH | |
1415 | speed | |
1416 | .LP | |
1417 | This is the line speed for the call (e.g. 300). | |
1418 | .SH | |
1419 | phone | |
1420 | .LP | |
1421 | The phone number is made up of an optional | |
1422 | alphabetic abbreviation and a numeric part. | |
1423 | The abbreviation is one which appears in the | |
1424 | .I L-dialcodes | |
1425 | file (e.g. mh5900, boston995\-9980). | |
1426 | .LP | |
1427 | For the hardwired devices, this field contains | |
1428 | the same string as used for the | |
1429 | .I device | |
1430 | field. | |
1431 | .SH | |
1432 | login | |
1433 | .LP | |
1434 | The login information is given as a series of | |
1435 | fields and subfields in the format | |
1436 | .IP | |
1437 | expect\ \ send\ | |
1438 | .B [ | |
1439 | expect\ \ send | |
1440 | .B ] | |
1441 | \ ... | |
1442 | .LP | |
1443 | where; | |
1444 | .I expect | |
1445 | is the string expected to be read and | |
1446 | .I send | |
1447 | is the string to be sent when the | |
1448 | .I expect | |
1449 | string is received. | |
1450 | .LP | |
1451 | The expect field may be made up of subfields | |
1452 | of the form | |
1453 | .IP | |
1454 | expect\fB[\fR\-send\-expect\fB]\fR... | |
1455 | .LP | |
1456 | where the | |
1457 | .I send | |
1458 | is sent if the prior | |
1459 | .I expect | |
1460 | is not successfully read | |
1461 | and the | |
1462 | .I expect | |
1463 | following the | |
1464 | .I send | |
1465 | is the next expected string. | |
1466 | .LP | |
1467 | There are two special names available to be sent | |
1468 | during the login sequence. | |
1469 | The string | |
1470 | .I EOT | |
1471 | will send an EOT character and the string | |
1472 | .I BREAK | |
1473 | will try to send a BREAK character. | |
1474 | (The | |
1475 | .I BREAK | |
1476 | character is simulated using line speed changes | |
1477 | and null characters and may not work on all | |
1478 | devices and/or systems.) | |
1479 | .RE | |
1480 | .LP | |
1481 | A typical entry in the L.sys file would be | |
1482 | .IP "" 6 | |
1483 | sys Any ACU 300 mh7654 login uucp ssword: word | |
1484 | .LP | |
1485 | The expect algorithm looks at the last part of the | |
1486 | string as illustrated in the password field. | |
1487 | .RE | |
1488 | .NH | |
1489 | Administration | |
1490 | .LP | |
1491 | This section indicates some events and files which must be | |
1492 | administered for the | |
1493 | .I uucp | |
1494 | system. | |
1495 | Some administration can be accomplished by | |
1496 | .I "shell files" | |
1497 | which can be initiated by | |
1498 | .I crontab | |
1499 | entries. | |
1500 | Others will require manual intervention. | |
1501 | Some sample | |
1502 | .I "shell files" | |
1503 | are given toward the end of this section. | |
1504 | .SH | |
1505 | SQFILE \- sequence check file | |
1506 | .LP | |
1507 | This file is set up in the | |
1508 | .I program | |
1509 | directory and contains an entry for each remote | |
1510 | system with which you agree to perform conversation | |
1511 | sequence checks. | |
1512 | The initial entry is just the system name of | |
1513 | the remote system. | |
1514 | The first conversation will add two items to the line, | |
1515 | the conversation count, and the date/time of the most | |
1516 | resent conversation. | |
1517 | These items will be updated with each conversation. | |
1518 | If a sequence check fails, the entry will have to | |
1519 | be adjusted. | |
1520 | .SH | |
1521 | TM \- temporary data files | |
1522 | .LP | |
1523 | These files are created in the | |
1524 | .I spool | |
1525 | directory while files are being copied | |
1526 | from a remote machine. | |
1527 | Their names have the form | |
1528 | .IP "" 12 | |
1529 | \fBTM\fR.pid.ddd | |
1530 | .LP | |
1531 | where | |
1532 | .I pid | |
1533 | is a process-id and | |
1534 | .I ddd | |
1535 | is a sequential three digit number starting at zero | |
1536 | for each invocation of | |
1537 | .I uucico | |
1538 | and incremented for each file received. | |
1539 | ||
1540 | After the entire remote file is received, the | |
1541 | .I TM | |
1542 | file is moved/copied to the requested destination. | |
1543 | If processing is abnormally terminated or the | |
1544 | move/copy fails, the file will remain in the | |
1545 | spool directory. | |
1546 | .LP | |
1547 | The leftover files should be periodically removed; | |
1548 | the | |
1549 | .I uuclean | |
1550 | program is useful in this regard. | |
1551 | The command | |
1552 | .IP "" 12 | |
1553 | uuclean\ \ \-pTM | |
1554 | .LP | |
1555 | will remove all | |
1556 | .I TM | |
1557 | files older than three days. | |
1558 | .SH | |
1559 | LOG \- log entry files | |
1560 | .LP | |
1561 | During execution of programs, individual | |
1562 | .I LOG | |
1563 | files are created in the | |
1564 | .I spool | |
1565 | directory with information about | |
1566 | queued requests, calls to remote systems, | |
1567 | execution of | |
1568 | .I uux | |
1569 | commands and file copy results. | |
1570 | These files should be combined into the | |
1571 | .I LOGFILE | |
1572 | by using the | |
1573 | .I uulog | |
1574 | program. | |
1575 | This program will put the new | |
1576 | .I LOG | |
1577 | files at the beginning of the existing | |
1578 | .I LOGFILE. | |
1579 | The command | |
1580 | .IP "" 12 | |
1581 | uulog | |
1582 | .LP | |
1583 | will accomplish the merge. | |
1584 | Options are available to print some or all the | |
1585 | log entries after the files are merged. | |
1586 | The | |
1587 | .I LOGFILE | |
1588 | should be removed periodically | |
1589 | since it is copied each time new LOG | |
1590 | entries are put into the file. | |
1591 | .LP | |
1592 | The | |
1593 | .I LOG | |
1594 | files are created initially with mode 0222. | |
1595 | If the program which creates the file terminates normally, | |
1596 | it changes the | |
1597 | mode to 0666. | |
1598 | Aborted runs may leave the files with mode | |
1599 | 0222 and the | |
1600 | .I uulog | |
1601 | program will not read or remove them. | |
1602 | To remove them, either use | |
1603 | .I rm , | |
1604 | .I uuclean , | |
1605 | or change the mode to 0666 and let | |
1606 | .I uulog | |
1607 | merge them with the | |
1608 | .I LOGFILE . | |
1609 | .SH | |
1610 | STST \- system status files | |
1611 | .LP | |
1612 | These files are created in the spool directory by the | |
1613 | .I uucico | |
1614 | program. | |
1615 | They contain information of failures such as login, dialup or | |
1616 | sequence check and will contain a | |
1617 | .I TALKING | |
1618 | status when to machines are conversing. | |
1619 | The form of the file name is | |
1620 | .IP | |
1621 | \fBSTST\fR.sys | |
1622 | .LP | |
1623 | where | |
1624 | .I sys | |
1625 | is the remote system name. | |
1626 | .LP | |
1627 | For ordinary failures (dialup, login), the file will prevent | |
1628 | repeated tries for about one hour. | |
1629 | For sequence check failures, the file must be removed before | |
1630 | any future attempts to converse with that remote system. | |
1631 | .LP | |
1632 | If the file is left due to an aborted run, it may contain a | |
1633 | .I TALKING | |
1634 | status. | |
1635 | In this case, the file must be removed before a conversation | |
1636 | is attempted. | |
1637 | .SH | |
1638 | LCK \- lock files | |
1639 | .LP | |
1640 | Lock files are created for each device in use (e.g. automatic calling | |
1641 | unit) and each system conversing. | |
1642 | This prevents duplicate conversations and multiple attempts to use the | |
1643 | same devices. | |
1644 | The form of the lock file name is | |
1645 | .IP "" 12 | |
1646 | \fBLCK..\fRstr | |
1647 | .LP | |
1648 | where | |
1649 | .I str | |
1650 | is either a device or system name. | |
1651 | The files may be left in the spool directory if runs abort. | |
1652 | They will be ignored (reused) after a time of about 24 hours. | |
1653 | When runs abort and calls are desired before the time limit, | |
1654 | the lock files should be removed. | |
1655 | .SH | |
1656 | Shell Files | |
1657 | .LP | |
1658 | The | |
1659 | .I uucp | |
1660 | program will spool work and attempt to start the | |
1661 | .I uucico | |
1662 | program, but the starting of | |
1663 | .I uucico | |
1664 | will sometimes fail. | |
1665 | (No devices available, login failures etc.). | |
1666 | Therefore, the | |
1667 | .I uucico | |
1668 | program should be periodically started. | |
1669 | The command to start | |
1670 | .I uucico | |
1671 | can be put in a ``shell'' file with a command to merge | |
1672 | .I LOG | |
1673 | files and started by a crontab entry on an hourly basis. | |
1674 | The file could contain the commands | |
1675 | .IP | |
1676 | .I program /uulog | |
1677 | .br | |
1678 | .I program /uucico | |
1679 | \ \ \-r1 | |
1680 | .LP | |
1681 | Note that the ``\-r1'' option is required to start the | |
1682 | .I uucico | |
1683 | program in | |
1684 | .I MASTER | |
1685 | mode. | |
1686 | .LP | |
1687 | Another shell file may be set up on a daily basis to remove | |
1688 | .I TM , | |
1689 | .I ST | |
1690 | and | |
1691 | .I LCK | |
1692 | files | |
1693 | and | |
1694 | .I C. | |
1695 | or | |
1696 | .I D. | |
1697 | files for work which can not be accomplished for | |
1698 | reasons like bad phone number, login changes etc. | |
1699 | A shell file containing commands like | |
1700 | .IP | |
1701 | .I program /uuclean | |
1702 | \ \ \-pTM \-pC. \-pD. | |
1703 | .br | |
1704 | .I program /uuclean | |
1705 | \ \ \-pST \-pLCK \-n12 | |
1706 | .LP | |
1707 | can be used. | |
1708 | Note the ``\-n12'' option causes the | |
1709 | .I ST | |
1710 | and | |
1711 | .I LCK | |
1712 | files older than 12 hours to be deleted. | |
1713 | The absence of the ``\-n'' option will use a three day time | |
1714 | limit. | |
1715 | .LP | |
1716 | A daily or weekly shell should also be created | |
1717 | to remove or save old | |
1718 | .I LOGFILE s. | |
1719 | A shell like | |
1720 | .IP | |
1721 | cp | |
1722 | .I spool /LOGFILE | |
1723 | \ \ | |
1724 | .I spool /o.LOGFILE | |
1725 | .br | |
1726 | rm | |
1727 | .I spool /LOGFILE | |
1728 | .LP | |
1729 | can be used. | |
1730 | .SH | |
1731 | Login Entry | |
1732 | .LP | |
1733 | One or more logins should be set up for | |
1734 | .I uucp . | |
1735 | Each of the ``/etc/passwd'' entries should | |
1736 | have the | |
1737 | ``\fIprogram\fR/uucico'' | |
1738 | as the shell to be executed. | |
1739 | The login directory is not used, but if the system | |
1740 | has a special directory for use by the users for | |
1741 | sending or receiving file, it should as the | |
1742 | login entry. | |
1743 | The various logins are used in conjunction with the | |
1744 | .I USERFILE | |
1745 | to restrict file access. | |
1746 | Specifying the | |
1747 | .I shell | |
1748 | argument limits the login to the use of uucp | |
1749 | ( | |
1750 | .I uucico ) | |
1751 | only. | |
1752 | .SH | |
1753 | File Modes | |
1754 | .LP | |
1755 | It is suggested that the owner and file modes of various | |
1756 | programs and files be set as follows. | |
1757 | .LP | |
1758 | The programs | |
1759 | .I uucp , | |
1760 | .I uux , | |
1761 | .I uucico | |
1762 | and | |
1763 | .I uuxqt | |
1764 | should be owned by the | |
1765 | .I uucp | |
1766 | login with the ``setuid'' bit set and only execute | |
1767 | permissions (e.g. mode 04111). | |
1768 | This will prevent outsiders from modifying the programs | |
1769 | to get at a standard | |
1770 | .I shell | |
1771 | for the | |
1772 | .I uucp | |
1773 | logins. | |
1774 | .LP | |
1775 | The | |
1776 | .I L.sys , | |
1777 | .I SQFILE | |
1778 | and the | |
1779 | .I USERFILE | |
1780 | which are put in the | |
1781 | .I program | |
1782 | directory should be owned by | |
1783 | the | |
1784 | .I uucp | |
1785 | login and set with mode 0400. | |
1786 | .SG MH-1273-DAN-unix |