⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 implement

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻
📖 第 1 页 / 共 3 页
字号:
.I Typeis an upper case letter,(.I C-\ copy command file,.I D-\ data file,.I X-\ execute file);.IP.I System-nameis the remote system;.IP.I Gradeis a character;.IP.I Numberis a four digit, padded sequence number..LPThe file.IP "" 12C.res45n0031.LPwould be a.I "work file"for a file transfer between the localmachine and the ``res45'' machine..LPThe scan for work is done by looking through thespool directory for.I "work files"(files with prefix ``C.'').A list is made of all systems to be called..I Uucicowill then call each system and process all.I "work files" ..SHCall Remote System.LPThe call is made using information from severalfiles which reside in the uucp program directory.At the start of the call process, a lock isset to forbid multiple conversations between the same two systems..LPThe system name is found in the.I L.sysfile.The information contained for each system is;.RS.IP [1]system name,.IP [2]times to call the system(days-of-week and times-of-day),.IP [3]device or device type to be used for call,.IP [4]line speed,.IP [5]phone number if field [3] is.I ACUor the device name (same as field [3])if not.I ACU,.IP [6]login information (multiple fields),.RE.LPThe time field is checked against the present time to seeif the call should be made..LPThe.Iphone number.Rmay contain abbreviations (e.g. mh, py, boston) which get translated into dialsequences using the.I L-dialcodesfile..LPThe.I L-devicesfile is scanned using fields [3] and [4] from the.I L.sysfile to find an available device for the call.The program will try all devices which satisfy[3] and [4] until the call is made, or no moredevices can be tried.If a device is successfully opened, a lock fileis created so that another copy of.I uucicowill not try to use it.If the call is complete, the.Ilogin information.R(field [6] of.I L.sys )is used to login..LPThe conversation between the two.I uucicoprograms begins with a handshake started by the called,.I SLAVE ,system.The.I SLAVEsends a message to let the.I MASTERknow it is ready to receive the systemidentification and conversation sequence number.The response from the.I MASTERisverified by the.I SLAVEand if acceptable, protocol selection begins.The.I SLAVEcan also reply with a ``call-back required''message in which case, the current conversationis terminated..SHLine Protocol Selection.LPThe remote system sends a message.IP "" 12P\fIproto-list\fR.LPwhere proto-list is a string of characters, eachrepresenting a line protocol..LPThe calling program checks the proto-listfor a letter corresponding to an available lineprotocol and returns a.I use-protocolmessage.The.I use-protocolmessage is.IP "" 12U\fIcode\fR.LPwhere code is either a one characterprotocol letter or.I Nwhich means there is no common protocol..SHWork Processing.LPThe initial roles (.I MASTERor.I SLAVE) for the work processing arethe mode in which each program starts.(The .I MASTERhas been specified by the ``\-r1'' uucico option.)The.I MASTERprogram does a work search similar to theone used in the ``Scan For Work'' section..LPThere are five messages used during thework processing, each specified by the firstcharacter of the message.They are;.IP "" 12.RS.IP S 3send a file,.IP Rreceive a file,.IP Ccopy complete,.IP Xexecute a.I uucpcommand,.IP Hhangup..RE.LPThe.I MASTERwill send.I R ,.I Sor.I Xmessages until all work from the spool directory iscomplete, at which point an.I Hmessage will be sent.The.I SLAVEwill reply with\fISY\fR, \fISN\fR, \fIRY\fR, \fIRN\fR, \fIHY\fR, \fIHN\fR,\fIXY\fR, \fIXN\fr,corresponding to.I yesor.I nofor each request..LPThe send and receive replies arebased on permission to access therequested file/directory using the.I USERFILEand read/write permissions of the file/directory.After each file is copied into the spool directoryof the receiving system,a copy-complete message is sent by the receiver of the file.The message.I CYwill be sent if thefile has successfully been moved from thetemporary spool file to the actual destination.Otherwise, a.I CNmessage is sent.(In the case of.I CN ,the transferred file will be in the spooldirectory with a name beginning with ``TM'.)The requests and results are logged on both systems..LPThe hangup response is determined by the.I SLAVEprogram by a work scan of the spool directory.If work for the remote system exists in the.I SLAVE'sspool directory, an.I HNmessage is sent and the programs switch roles.If no work exists, an.I HYresponse is sent..SHConversation Termination.LPWhen a.I HYmessage is received by the.I MASTERit is echoed back to the.I SLAVEand the protocols are turned off.Each program sends a final ``OO'' message to theother.The original.I SLAVEprogram will clean up and terminate.The.I MASTERwill proceed to call other systemsand process work as long as possibleor terminate if a.I \-soption was specified..LP.NHUuxqt - Uucp Command Execution.LPThe.I uuxqtprogram is used to execute.Iexecute files.Rgenerated by.I uux.The.I uuxqtprogram may be started by either the.I uucicoor.I uuxprograms.The program scans the spool directory for.Iexecute files.R(prefix ``X.'').Each one is checked to see if all the required files are available andif so, the command line or send line is executed..LPThe.Iexecute file.Ris described in the ``Uux''section above..SHCommand Execution.LPThe execution is accomplished by executing a.Ish \-c.Rof the command line after appropriatestandard input and standard output have been opened.If a standard output is specified, the programwill create a send command or copy the outputfile as appropriate..NHUulog - Uucp Log Inquiry.LPThe.I uucpprograms create individuallog files for each program invocation.Periodically,.I uulogmay be executed to prepend these files to thesystem logfile.This method of logging was chosen to minimize filelocking of the logfile during program execution..LPThe.I uulogprogram merges the individuallog files and outputs specified log entries.The output request is specified by the use of thefollowing options:.RS.IP \-s\fIsys\fR 9Print entries where.I sysis the remote system name;.IP \-u\fIuser\fRPrint entries for user.I user..RE.LPThe intersection of lines satisfying the two options is output.A null.I sysor.I usermeans all system names or users respectively..NHUuclean - Uucp Spool Directory Cleanup.LPThis program is typically started by the daemon, once a day.Its function is to remove files from the spool directory whichare more than 3 days old.These are usually files for work which can not be completed..LP.LPThe options available are:.RS.IP \-d\fIdir\fR 10The directory to be scanned is.I dir ..IP \-mSend mail to the owner of each file being removed.(Note that most files put into the spool directorywill be owned by the owner of theuucp programs since the setuid bit will be set on theseprograms.The mail will therefore most often go to the ownerof the uucp programs.).IP \-n\fIhours\fRChange the aging time from 72 hours to.I hourshours..IP \-p\fIpre\fRExamine files with prefix.I prefor deletion.(Up to 10 file prefixes may be specified.).IP \-x\fInum\fRThis is the level of debugging output desired..RE.NHSecurity.LP.LG\fBThe uucp system, left unrestricted,will let any outside user execute any commandsand copy in/out any file which is readable/writableby the uucp login user.It is up to the individual sites to be aware of this andapply the protections that they feel are necessary.\fR.NL.LPThere are several security features available aside from thenormal file mode protections.These must be set up by the installer of the.I uucpsystem..IP - 3The login for uucp does not get a standard shell.Instead, the.I uucicoprogram is started.Therefore, the only work that can be done is through.I uucico ..IP -A path check is done on file names that are to be sentor received.The.I USERFILEsupplies the information for these checks.The.I USERFILEcan also be set up to require call-backfor certain login-ids.(See the ``Files required for execution'' sectionfor the file description.).IP -A conversation sequence count can be set up sothat the called systemcan be more confident that the calleris who he says he is..IP -The.I uuxqtprogram comes with a list of commands that itwill execute.A ``PATH'' shell statement is prepended to the commandline as specifed in the.I uuxqtprogram.The installer may modify the list or remove therestrictions as desired..IP -The.I L.sysfile should be owned by uucp and have mode 0400to protect the phone numbers and login informationfor remote sites.(Programs uucp, uucico, uux, uuxqt should be alsoowned by uucp and have the setuid bit set.).NHUucp Installation.LPThere are several source modifications that may be requiredbefore the system programs are compiled.These relate to the directories used during compilation,the directories used during execution,and the local.Iuucp system-name..R.LPThe four directories are:.RS.IP lib 12(/usr/src/cmd/uucp)This directory contains the source files for generating the.I uucpsystem..IP program(/usr/lib/uucp)This is the directory used for the executable system programs andthe system files..IP spool(/usr/spool/uucp)This is the spool directory used during.I uucpexecution..IP xqtdir(/usr/spool/uucp/.XQTDIR)This directory is used during execution of.I "execute files" ..RE.LPThe names given in parentheses above are the default valuesfor the directories.The italicized named.Ilib, program, xqtdir,.Rand.I spoolwill be used in the following text to represent theappropriate directory names..LPThere are two files which may require modification,the.I makefilefile and the.I uucp.hfile.The following paragraphs describe the modifications.The modes of.I spooland.I xqtdirshould be made ``0777''..SHUucp.h modification.LPChange the.I programand the.I spoolnames from the default values to the directorynames to be used on the local system usingglobal edit commands..LPChange the.I definevalue for.I MYNAMEto be the local.I uucpsystem-name..SHmakefile modification.LPThere are several.I makevariable definitions which may need modification..RS.IP INSDIR 10This is the.I programdirectory(e.g. INSDIR=/usr/lib/uucp).This parameter is used if ``make cp'' isused after the programs are compiled..IP IOCTLThis is required to be set if an appropriate.I ioctlinterface subroutine does not exist in the standard``C'' library;the statement``IOCTL=ioctl.o'' is required in this case..IP PKONThe statement ``PKON=pkon.o'' is required if thepacket driver is not in the kernel..RE.SHCompile the systemThe command.IP "" 12make.LPwill compile the entire system.The command.IP "" 12make cp.LPwill copy the commands to theto the appropriate directories..LPThe programs.I uucp ,.I uux ,and.I uulogshould be put in ``/usr/bin''.The programs.I uuxqt ,.I uucico ,and.I uucleanshould be put in the.I programdirectory..SHFiles required for execution.LPThere are four files which are required for execution,all of which should reside in the.I programdirectory.The field separator for all files is a space unless otherwisespecified..SHL-devices.LPThis file contains entries for the call-unit devices andhardwired connections which are to be used by.I uucp.The special device files are assumed to be in the.I /devdirectory.The format for each entry is.IP "" 12line\ \ call-unit\ \ speed.LPwhere;.RS.IP line 12is the device for the line (e.g. cul0),.IP call-unitis the automatic call unit associated with.I line

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -