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