UucpImplementationDescription D.A.Nowitz ABSTRACT Uucpisaseriesofprogramsdesignedtopermitcommunicationbetween UNIXsystemsusingeitherdial-uporhardwiredcommunicationlines.Thisdocu-mentgivesadetailedimplementationdescriptionofthecurrent(second)imple-mentationofuucp. Thisdocumentisforusebyanadministrator/installerofthesystem.Itis notmeantasauser’sguide. October31,1978 UucpImplementationDescription D.A.Nowitz Introduction UucpisaseriesofprogramsdesignedtopermitcommunicationbetweenUNIX◯rsystemsusing eitherdial-uporhardwiredcommunicationlines.Itisusedforfiletransfersandremotecommand execution.ThefirstversionofthesystemwasdesignedandimplementedbyM.E.Lesk.1This paperdescribesthecurrent(second)implementationofthesystem. Uucpisabatchtypeoperation.Filesarecreatedinaspooldirectoryforprocessingbytheuucp demons.Therearethreetypesoffilesusedfortheexecutionofwork.Datafilescontaindatafor transfertoremotesystems.Workfilescontaindirectionsforfiletransfersbetweensystems. ExecutionfilesaredirectionsforUNIXcommandexecutionswhichinvolvetheresourcesofoneor moresystems. Theuucpsystemconsistsoffourprimaryandtwosecondaryprograms.Theprimaryprograms are: uucpThisprogramcreatesworkandgathersdatafilesinthespooldirectoryforthe transmissionoffiles. uuxThisprogramcreatesworkfiles,executefilesandgathersdatafilesforthe remoteexecutionofUNIXcommands. uucicoThisprogramexecutestheworkfilesfordatatransmission. uuxqtThisprogramexecutestheexecutionfilesforUNIXcommandexecution. Thesecondaryprogramsare: uulogThisprogramupdatesthelogfilewithnewentriesandreportsonthestatusof uucprequests. uucleanThisprogramremovesoldfilesfromthespooldirectory. Theremainderofthispaperwilldescribetheoperationofeachprogram,theinstallationofthe system,thesecurityaspectsofthesystem,thefilesrequiredforexecution,andtheadministration ofthesystem. 1.Uucp-UNIXtoUNIXFileCopy Theuucpcommandistheuser’sprimaryinterfacewiththesystem.Theuucpcommandwas designedtolooklikecptotheuser.Thesyntaxis uucp[option]...source...destination wherethesourceanddestinationmaycontaintheprefixsystem-name!whichindicatesthesystem onwhichthefileorfilesresideorwheretheywillbecopied. Theoptionsinterpretedbyuucpare: −dMakedirectorieswhennecessaryforcopyingthefile. −cDon’tcopysourcefilestothespooldirectory,butusethespecifiedsourcewhen theactualtransfertakesplace. −gletterPutletterinasthegradeinthenameoftheworkfile.(Thiscanbeusedto changetheorderofworkforaparticularmachine.) 1M.E.LeskandA.S.Cohen,UNIXSoftwareDistributionbyCommunicationLink,privatecommunication.

-2- −mSendmailoncompletionofthework. Thefollowingoptionsareusedprimarilyfordebugging: −rQueuethejobbutdonotstartuucicoprogram. −sdirUsedirectorydirforthespooldirectory. −xnumNumisthelevelofdebuggingoutputdesired. Thedestinationmaybeadirectoryname,inwhichcasethefilenameistakenfromthelastpart ofthesource’sname.Thesourcenamemaycontainspecialshellcharacterssuchas‘‘?*[]’’.Ifa sourceargumenthasasystem-name!prefixforaremotesystem,thefilenameexpansionwillbe doneontheremotesystem. Thecommand uucp*.cusg!/usr/dan willsetupthetransferofallfileswhosenamesendwith‘‘.c’’tothe‘‘/usr/dan’’directoryon the‘‘usg’’machine. Thesourceand/ordestinationnamesmayalsocontaina˜ userprefix.Thistranslatestothelogin directoryonthespecifiedsystem.Fornameswithpartialpath-names,thecurrentdirectoryis prependedtothefilename.Filenameswith../arenotpermitted. Thecommand uucpusg!˜ dan/*.h˜ dan willsetupthetransferoffileswhosenamesendwith‘‘.h’’indan’slogindirectoryonsystem‘‘usg’’ todan’slocallogindirectory. Foreachsourcefile,theprogramwillcheckthesourceanddestinationfile-namesandthesystem-partofeachtoclassifytheworkintooneoffivetypes: [1]Copysourcetodestinationonlocalsystem. [2]Receivefilesfromothersystems. [3]Sendfilestoaremotesystems. [4]Sendfilesfromremotesystemstoanotherremotesystem. [5]Receivefilesfromremotesystemswhenthesourcecontainsspecialshellcharactersas mentionedabove. Aftertheworkhasbeensetupinthespooldirectory,theuucicoprogramisstartedtotrytocontacttheothermachinetoexecutethework(unlessthe−roptionwasspecified). Type1 Acpcommandisusedtodothework.The−dandthe−moptionsarenothonoredinthiscase. Type2 Aonelineworkfileiscreatedforeachfilerequestedandputinthespooldirectorywiththefollowingfields,eachseparatedbyablank.(Allworkfilesandexecutefilesuseablankasthefield separator.) [1]R [2]Thefullpath-nameofthesourceora˜ user/path-name.The˜ userpartwillbe expandedontheremotesystem. [3]Thefullpath-nameofthedestinationfile.Ifthe˜ usernotationisused,itwillbe immediatelyexpandedtobethelogindirectoryfortheuser. [4]Theuser’sloginname. [5]A‘‘−’’followedbyanoptionlist.(Onlythe−mand−doptionswillappearinthis list.)

-3-Type3 Foreachsourcefile,aworkfileiscreatedandthesourcefileiscopiedintoadatafileinthespool directory.(A‘‘−c’’optionontheuucpcommandwillpreventthedatafilefrombeingmade.)In thiscase,thefilewillbetransmittedfromtheindicatedsource.)Thefieldsofeachentryare givenbelow. [1]S [2]Thefull-pathnameofthesourcefile. [3]Thefull-pathnameofthedestinationor˜ user/file-name. [4]Theuser’sloginname. [5]A‘‘−’’followedbyanoptionlist. [6]Thenameofthedatafileinthespooldirectory. [7]Thefilemodebitsofthesourcefileinoctalprintformat(e.g.0666). Type4andType5 Uucpgeneratesauucpcommandandsendsittotheremotemachine;theremoteuucicoexecutes theuucpcommand. 2.Uux-UNIXToUNIXExecution TheuuxcommandisusedtosetuptheexecutionofaUNIXcommandwheretheexecution machineand/orsomeofthefilesareremote.Thesyntaxoftheuuxcommandis uux[−][option]...command-string wherethecommand-stringismadeupofoneormorearguments.Allspecialshellcharacterssuch as‘‘<>|ˆ ’’mustbequotedeitherbyquotingtheentirecommand-stringorquotingthecharacter asaseparateargument.Withinthecommand-string,thecommandandfilenamesmaycontaina system-name!prefix.Allargumentswhichdonotcontaina‘‘!’’willnotbetreatedasfiles. (Theywillnotbecopiedtotheexecutionmachine.)The‘‘−’’isusedtoindicatethatthestandardinputforcommand-stringshouldbeinheritedfromthestandardinputoftheuuxcommand. Theoptions,essentiallyfordebugging,are: −rDon’tstartuucicooruuxqtafterqueuingthejob; −xnumNumisthelevelofdebuggingoutputdesired. Thecommand prabc|uux−usg!lpr willsetuptheoutputof‘‘prabc’’asstandardinputtoanlprcommandtobeexecutedonsystem ‘‘usg’’. Uuxgeneratesanexecutefilewhichcontainsthenamesofthefilesrequiredforexecution(includingstandardinput),theuser’sloginname,thedestinationofthestandardoutput,andthecommandtobeexecuted.Thisfileiseitherputinthespooldirectoryforlocalexecutionorsentto theremotesystemusingageneratedsendcommand(type3above). Forrequiredfileswhicharenotontheexecutionmachine,uuxwillgeneratereceivecommandfiles (type2above).Thesecommand-fileswillbeputontheexecutionmachineandexecutedbythe uucicoprogram.(Thiswillworkonlyifthelocalsystemhaspermissiontoputfilesintheremote spooldirectoryascontrolledbytheremoteUSERFILE.) Theexecutefilewillbeprocessedbytheuuxqtprogramontheexecutionmachine.Itismadeup ofseverallines,eachofwhichcontainsanidentificationcharacterandoneormorearguments. Theorderofthelinesinthefileisnotrelevantandsomeofthelinesmaynotbepresent.Each lineisdescribedbelow.

-4-UserLine Uusersystem wheretheuserandsystemaretherequester’sloginnameandsystem. RequiredFileLine Ffile-namereal-name wherethefile-nameisthegeneratednameofafilefortheexecutemachineandreal-nameis thelastpartoftheactualfilename(containsnopathinformation).Zeroormoreofthese linesmaybepresentintheexecutefile.Theuuxqtprogramwillcheckfortheexistenceof allrequiredfilesbeforethecommandisexecuted. StandardInputLine Ifile-name Thestandardinputiseitherspecifiedbya‘‘<’’inthecommand-stringorinheritedfromthe standardinputoftheuuxcommandifthe‘‘−’’optionisused.Ifastandardinputisnot specified,‘‘/dev/null’’isused. StandardOutputLine Ofile-namesystem-name Thestandardoutputisspecifiedbya‘‘>’’withinthecommand-string.Ifastandardoutput isnotspecified,‘‘/dev/null’’isused.(Note−theuseof‘‘>>’’isnotimplemented.) CommandLine Ccommand[arguments]... Theargumentsarethosespecifiedinthecommand-string.Thestandardinputandstandard outputwillnotappearonthisline.Allrequiredfileswillbemovedtotheexecutiondirectory(asubdirectoryofthespooldirectory)andtheUNIXcommandisexecutedusingthe Shellspecifiedintheuucp.hheaderfile.Inaddition,ashell‘‘PATH’’statementisprepended tothecommandlineasspecifiedintheuuxqtprogram. Afterexecution,thestandardoutputiscopiedorsetuptobesenttotheproperplace. 3.Uucico-CopyIn,CopyOut Theuucicoprogramwillperformthefollowingmajorfunctions: -Scanthespooldirectoryforwork. -Placeacalltoaremotesystem. -Negotiatealineprotocoltobeused. -Executeallrequestsfrombothsystems. -Logworkrequestsandworkcompletions. Uucicomaybestartedinseveralways; a)byasystemdaemon, b)byoneoftheuucp,uux,uuxqtoruucicoprograms, c)directlybytheuser(thisisusuallyfortesting), d)byaremotesystem.(Theuucicoprogramshouldbespecifiedasthe‘‘shell’’fieldin the‘‘/etc/passwd’’fileforthe‘‘uucp’’logins.) Whenstartedbymethoda,borc,theprogramisconsideredtobeinMASTERmode.Inthis mode,aconnectionwillbemadetoaremotesystem.Ifstartedbyaremotesystem(methodd), theprogramisconsideredtobeinSLAVEmode.

-5-TheMASTERmodewilloperateinoneoftwoways.Ifnosystemnameisspecified(−soption notspecified)theprogramwillscanthespooldirectoryforsystemstocall.Ifasystemnameis specified,thatsystemwillbecalled,andworkwillonlybedoneforthatsystem. Theuucicoprogramisgenerallystartedbyanotherprogram.Thereareseveraloptionsusedfor execution: −r1StarttheprograminMASTERmode.Thisisusedwhenuucicoisstartedbya programor‘‘cron’’shell. −ssysDoworkonlyforsystemsys.If−sisspecified,acalltothespecifiedsystemwill bemadeevenifthereisnoworkforsystemsysinthespooldirectory.Thisis usefulforpollingsystemswhichdonothavethehardwaretoinitiateaconnection. Thefollowingoptionsareusedprimarilyfordebugging: −ddir Usedirectorydirforthespooldirectory. −xnum Numisthelevelofdebuggingoutputdesired. Thenextpartofthissectionwilldescribethemajorstepswithintheuucicoprogram. ScanForWork Thenamesoftheworkrelatedfilesinthespooldirectoryhaveformat type.system-namegradenumber where: Typeisanuppercaseletter,(C-copycommandfile,D-datafile,X-executefile); System-nameistheremotesystem; Gradeisacharacter; Numberisafourdigit,paddedsequencenumber. Thefile C.res45n0031 wouldbeaworkfileforafiletransferbetweenthelocalmachineandthe‘‘res45’’machine. Thescanforworkisdonebylookingthroughthespooldirectoryforworkfiles(fileswithprefix ‘‘C.’’).Alistismadeofallsystemstobecalled.Uucicowillthencalleachsystemandprocessall workfiles. CallRemoteSystem Thecallismadeusinginformationfromseveralfileswhichresideintheuucpprogramdirectory. Atthestartofthecallprocess,alockissettoforbidmultipleconversationsbetweenthesametwo systems. ThesystemnameisfoundintheL.sysfile.Theinformationcontainedforeachsystemis; [1]systemname, [2]timestocallthesystem(days-of-weekandtimes-of-day), [3]deviceordevicetypetobeusedforcall, [4]linespeed, [5]phonenumberiffield[3]isACUorthedevicename(sameasfield[3])ifnotACU, [6]logininformation(multiplefields), Thetimefieldischeckedagainstthepresenttimetoseeifthecallshouldbemade.

-6-Thephonenumbermaycontainabbreviations(e.g.mh,py,boston)whichgettranslatedintodial sequencesusingtheL-dialcodesfile. TheL-devicesfileisscannedusingfields[3]and[4]fromtheL.sysfiletofindanavailabledevice forthecall.Theprogramwilltryalldeviceswhichsatisfy[3]and[4]untilthecallismade,orno moredevicescanbetried.Ifadeviceissuccessfullyopened,alockfileiscreatedsothatanother copyofuucicowillnottrytouseit.Ifthecalliscomplete,thelogininformation(field[6]of L.sys)isusedtologin. Theconversationbetweenthetwouucicoprogramsbeginswithahandshakestartedbythecalled, SLAVE,system.TheSLAVEsendsamessagetolettheMASTERknowitisreadytoreceivethe systemidentificationandconversationsequencenumber.TheresponsefromtheMASTERisverifiedbytheSLAVEandifacceptable,protocolselectionbegins.TheSLAVEcanalsoreplywitha ‘‘call-backrequired’’messageinwhichcase,thecurrentconversationisterminated. LineProtocolSelection Theremotesystemsendsamessage Pproto-list whereproto-listisastringofcharacters,eachrepresentingalineprotocol. Thecallingprogramcheckstheproto-listforalettercorrespondingtoanavailablelineprotocol andreturnsause-protocolmessage.Theuse-protocolmessageis Ucode wherecodeiseitheraonecharacterprotocolletterorNwhichmeansthereisnocommonprotocol. WorkProcessing Theinitialroles(MASTERorSLAVE)fortheworkprocessingarethemodeinwhicheachprogramstarts.(TheMASTERhasbeenspecifiedbythe‘‘−r1’’uucicooption.)TheMASTERprogramdoesaworksearchsimilartotheoneusedinthe‘‘ScanForWork’’section. Therearefivemessagesusedduringtheworkprocessing,eachspecifiedbythefirstcharacterof themessage.Theyare; Ssendafile, Rreceiveafile, Ccopycomplete, Xexecuteauucpcommand, Hhangup. TheMASTERwillsendR,SorXmessagesuntilallworkfromthespooldirectoryiscomplete,at whichpointanHmessagewillbesent.TheSLAVEwillreplywithSY,SN,RY,RN,HY,HN, XY,XN,correspondingtoyesornoforeachrequest. Thesendandreceiverepliesarebasedonpermissiontoaccesstherequestedfile/directoryusing theUSERFILEandread/writepermissionsofthefile/directory.Aftereachfileiscopiedintothe spooldirectoryofthereceivingsystem,acopy-completemessageissentbythereceiverofthefile. ThemessageCYwillbesentifthefilehassuccessfullybeenmovedfromthetemporaryspoolfile totheactualdestination.Otherwise,aCNmessageissent.(InthecaseofCN,thetransferred filewillbeinthespooldirectorywithanamebeginningwith‘‘TM’.)Therequestsandresults areloggedonbothsystems. ThehangupresponseisdeterminedbytheSLAVEprogrambyaworkscanofthespooldirectory. IfworkfortheremotesystemexistsintheSLAVE’sspooldirectory,anHNmessageissentand theprogramsswitchroles.Ifnoworkexists,anHYresponseissent.

-7-ConversationTermination WhenaHYmessageisreceivedbytheMASTERitisechoedbacktotheSLAVEandtheprotocolsareturnedoff.Eachprogramsendsafinal‘‘OO’’messagetotheother.TheoriginalSLAVE programwillcleanupandterminate.TheMASTERwillproceedtocallothersystemsandprocessworkaslongaspossibleorterminateifa−soptionwasspecified. 4.Uuxqt-UucpCommandExecution Theuuxqtprogramisusedtoexecuteexecutefilesgeneratedbyuux.Theuuxqtprogrammaybe startedbyeithertheuucicooruuxprograms.Theprogramscansthespooldirectoryforexecute files(prefix‘‘X.’’).Eachoneischeckedtoseeifalltherequiredfilesareavailableandifso,the commandlineorsendlineisexecuted. Theexecutefileisdescribedinthe‘‘Uux’’sectionabove. CommandExecution Theexecutionisaccomplishedbyexecutingash−cofthecommandlineafterappropriatestandardinputandstandardoutputhavebeenopened.Ifastandardoutputisspecified,theprogram willcreateasendcommandorcopytheoutputfileasappropriate. 5.Uulog-UucpLogInquiry Theuucpprogramscreateindividuallogfilesforeachprograminvocation.Periodically,uulog maybeexecutedtoprependthesefilestothesystemlogfile.Thismethodofloggingwaschosen tominimizefilelockingofthelogfileduringprogramexecution. Theuulogprogrammergestheindividuallogfilesandoutputsspecifiedlogentries.Theoutput requestisspecifiedbytheuseofthefollowingoptions: −ssysPrintentrieswheresysistheremotesystemname; −uuserPrintentriesforuseruser. Theintersectionoflinessatisfyingthetwooptionsisoutput.Anullsysorusermeansallsystem namesorusersrespectively. 6.Uuclean-UucpSpoolDirectoryCleanup Thisprogramistypicallystartedbythedaemon,onceaday.Itsfunctionistoremovefilesfrom thespooldirectorywhicharemorethan3daysold.Theseareusuallyfilesforworkwhichcan notbecompleted. Theoptionsavailableare: −ddirThedirectorytobescannedisdir. −mSendmailtotheownerofeachfilebeingremoved.(Notethatmostfilesputinto thespooldirectorywillbeownedbytheowneroftheuucpprogramssincethe setuidbitwillbesetontheseprograms.Themailwillthereforemostoftengo totheowneroftheuucpprograms.) −nhoursChangetheagingtimefrom72hourstohourshours. −ppreExaminefileswithprefixprefordeletion.(Upto10fileprefixesmaybespecified.) −xnumThisisthelevelofdebuggingoutputdesired. 7.Security Theuucpsystem,leftunrestricted,willletanyoutsideuserexecute anycommandsandcopyin/outanyfilewhichisreadable/writableby theuucploginuser.Itisuptotheindividualsitestobeawareofthis andapplytheprotectionsthattheyfeelarenecessary.

-8-Thereareseveralsecurityfeaturesavailableasidefromthenormalfilemodeprotections.These mustbesetupbytheinstalleroftheuucpsystem. -Theloginforuucpdoesnotgetastandardshell.Instead,theuucicoprogramisstarted. Therefore,theonlyworkthatcanbedoneisthroughuucico. -Apathcheckisdoneonfilenamesthataretobesentorreceived.TheUSERFILEsupplies theinformationforthesechecks.TheUSERFILEcanalsobesetuptorequirecall-backfor certainlogin-ids.(Seethe‘‘Filesrequiredforexecution’’sectionforthefiledescription.) -Aconversationsequencecountcanbesetupsothatthecalledsystemcanbemoreconfident thatthecalleriswhohesaysheis. -Theuuxqtprogramcomeswithalistofcommandsthatitwillexecute.A‘‘PATH’’shellstate-mentisprependedtothecommandlineasspecifedintheuuxqtprogram.Theinstallermay modifythelistorremovetherestrictionsasdesired. -TheL.sysfileshouldbeownedbyuucpandhavemode0400toprotectthephonenumbers andlogininformationforremotesites.(Programsuucp,uucico,uux,uuxqtshouldbealso ownedbyuucpandhavethesetuidbitset.) 8.UucpInstallation Thereareseveralsourcemodificationsthatmayberequiredbeforethesystemprogramsarecompiled.Theserelatetothedirectoriesusedduringcompilation,thedirectoriesusedduringexecution,andthelocaluucpsystem-name. Thefourdirectoriesare: lib(/usr/src/cmd/uucp)Thisdirectorycontainsthesourcefilesforgeneratingthe uucpsystem. program(/usr/lib/uucp)Thisisthedirectoryusedfortheexecutablesystemprograms andthesystemfiles. spool(/usr/spool/uucp)Thisisthespooldirectoryusedduringuucpexecution. xqtdir(/usr/spool/uucp/.XQTDIR)Thisdirectoryisusedduringexecutionofexecutefiles. Thenamesgiveninparenthesesabovearethedefaultvaluesforthedirectories.Theitalicized namedlib,program,xqtdir,andspoolwillbeusedinthefollowingtexttorepresenttheappropriatedirectorynames. Therearetwofileswhichmayrequiremodification,themakefilefileandtheuucp.hfile.Thefollowingparagraphsdescribethemodifications.Themodesofspoolandxqtdirshouldbemade ‘‘0777’’. Uucp.hmodification Changetheprogramandthespoolnamesfromthedefaultvaluestothedirectorynamestobe usedonthelocalsystemusingglobaleditcommands. ChangethedefinevalueforMYNAMEtobethelocaluucpsystem-name. makefilemodification Thereareseveralmakevariabledefinitionswhichmayneedmodification. INSDIRThisistheprogramdirectory(e.g.INSDIR=/usr/lib/uucp).Thisparameteris usedif‘‘makecp’’isusedaftertheprogramsarecompiled. IOCTLThisisrequiredtobesetifanappropriateioctlinterfacesubroutinedoesnot existinthestandard‘‘C’’library;thestatement‘‘IOCTL=ioctl.o’’isrequiredin thiscase. PKONThestatement‘‘PKON=pkon.o’’isrequiredifthepacketdriverisnotinthekernel.

-9-CompilethesystemThecommand make willcompiletheentiresystem.Thecommand makecp willcopythecommandstothetotheappropriatedirectories. Theprogramsuucp,uux,anduulogshouldbeputin‘‘/usr/bin’’.Theprogramsuuxqt,uucico,and uucleanshouldbeputintheprogramdirectory. Filesrequiredforexecution Therearefourfileswhicharerequiredforexecution,allofwhichshouldresideintheprogram directory.Thefieldseparatorforallfilesisaspaceunlessotherwisespecified. L-devices Thisfilecontainsentriesforthecall-unitdevicesandhardwiredconnectionswhicharetobeused byuucp.Thespecialdevicefilesareassumedtobeinthe/devdirectory.Theformatforeach entryis linecall-unitspeed where; lineisthedevicefortheline(e.g.cul0), call-unitistheautomaticcallunitassociatedwithline(e.g.cua0),(Hardwiredlines haveanumber‘‘0’’inthisfield.), speedisthelinespeed. Theline cul0cua0300 wouldbesetupforasystemwhichhaddevicecul0wiredtoacall-unitcua0foruseat300baud. L-dialcodes ThisfilecontainsentrieswithlocationabbreviationsusedintheL.sysfile(e.g.py,mh,boston). Theentryformatis abbdial-seq where; abbistheabbreviation, dial-seqisthedialsequencetocallthatlocation. Theline py165− wouldbesetupsothatentrypy7777wouldsend165−7777tothedial-unit. LOGIN/SYSTEMNAMES Itisassumedthattheloginnameusedbyaremotecomputertocallintoalocalcomputerisnot thesameastheloginnameofanormaluserofthatlocalmachine.However,severalremotecomputersmayemploythesameloginname. Eachcomputerisgivenauniquesystemnamewhichistransmittedatthestartofeachcall.This nameidentifiesthecallingmachinetothecalledmachine. USERFILE Thisfilecontainsuseraccessibilityinformation.Itspecifiesfourtypesofconstraint; -10- [1]whichfilescanbeaccessedbyanormaluserofthelocalmachine, [2]whichfilescanbeaccessedfromaremotecomputer, [3]whichloginnameisusedbyaparticularremotecomputer, [4]whetheraremotecomputershouldbecalledbackinordertoconfirmitsidentity. Eachlineinthefilehasthefollowingformat login,sys[c]path-name[path-name]... where; loginistheloginnameforauserortheremotecomputer, sysisthesystemnameforaremotecomputer, cistheoptionalcall-backrequiredflag, path-nameisapath-nameprefixthatisacceptableforuser. Theconstraintsareimplementedasfollows. [1]Whentheprogramisobeyingacommandstoredonthelocalmachine,MASTER mode,thepath-namesallowedarethosegivenforthefirstlineintheUSERFILEthat hasaloginnamethatmatchestheloginnameoftheuserwhoenteredthecommand. Ifnosuchlineisfound,thefirstlinewithanullloginnameisused. [2]Whentheprogramisrespondingtoacommandfromaremotemachine,SLAVEmode, thepath-namesallowedarethosegivenforthefirstlineinthefilethathasthesystem namethatmatchesthesystemnameoftheremotemachine.Ifnosuchlineisfound, thefirstonewithanullsystemnameisused. [3]Whenaremotecomputerlogsin,theloginnamethatitusesmustappearinthe USERFILE.Theremaybeseverallineswiththesameloginnamebutoneofthem musteitherhavethenameoftheremotesystemormustcontainanullsystemname. [4]Ifthelinematchedin([3])containsa‘‘c’’,theremotemachineiscalledbackbefore anytransactionstakeplace. Theline u,m/usr/xyz allowsmachinemtologinwithnameuandrequestthetransferoffileswhosenamesstartwith ‘‘/usr/xyz’’. Theline dan,/usr/dan allowstheordinaryuserdantoissuecommandsforfileswhosenamestartswith‘‘/usr/dan’’. Thelines u,m/usr/xyz/usr/spool u,/usr/spool allowsanyremotemachinetologinwithnameu,butifitssystemnameisnotm,itcanonlyask totransferfileswhosenamesstartwith‘‘/usr/spool’’. Thelines root,/ ,/usr allowsanyusertotransferfilesbeginningwith‘‘/usr’’buttheuserwithloginrootcantransfer anyfile. L.sys Eachentryinthisfilerepresentsonesystemwhichcanbecalledbythelocaluucpprograms.The fieldsaredescribedbelow.

-11-systemname Thenameoftheremotesystem. time Thisisastringwhichindicatesthedays-of-weekandtimes-of-daywhenthesystemshould becalled(e.g.MoTuTh0800−1730). Thedayportionmaybealistcontainingsomeof SuMoTuWeThFrSa oritmaybeWkforanyweek-dayorAnyforanyday. Thetimeshouldbearangeoftimes(e.g.0800−1230).Ifnotimeportionisspecified,any timeofdayisassumedtobeokforthecall. device ThisiseitherACUorthehardwireddevicetobeusedforthecall.Forthehardwiredcase, thelastpartofthespecialfilenameisused(e.g.tty0). speed Thisisthelinespeedforthecall(e.g.300). phone Thephonenumberismadeupofanoptionalalphabeticabbreviationandanumericpart. TheabbreviationisonewhichappearsintheL-dialcodesfile(e.g.mh5900, boston995−9980). Forthehardwireddevices,thisfieldcontainsthesamestringasusedforthedevicefield. login Thelogininformationisgivenasaseriesoffieldsandsubfieldsintheformat expectsend[expectsend]... where;expectisthestringexpectedtobereadandsendisthestringtobesentwhenthe expectstringisreceived. Theexpectfieldmaybemadeupofsubfieldsoftheform expect[−send−expect]... wherethesendissentifthepriorexpectisnotsuccessfullyreadandtheexpectfollowingthe sendisthenextexpectedstring. Therearetwospecialnamesavailabletobesentduringtheloginsequence.ThestringEOT willsendanEOTcharacterandthestringBREAKwilltrytosendaBREAKcharacter. (TheBREAKcharacterissimulatedusinglinespeedchangesandnullcharactersandmay notworkonalldevicesand/orsystems.) AtypicalentryintheL.sysfilewouldbe sysAnyACU300mh7654loginuucpssword:word Theexpectalgorithmlooksatthelastpartofthestringasillustratedinthepasswordfield. 9.Administration Thissectionindicatessomeeventsandfileswhichmustbeadministeredfortheuucpsystem. Someadministrationcanbeaccomplishedbyshellfileswhichcanbeinitiatedbycrontabentries. Otherswillrequiremanualintervention.Somesampleshellfilesaregiventowardtheendofthis section.

-12-SQFILE−sequencecheckfile Thisfileissetupintheprogramdirectoryandcontainsanentryforeachremotesystemwith whichyouagreetoperformconversationsequencechecks.Theinitialentryisjustthesystem nameoftheremotesystem.Thefirstconversationwilladdtwoitemstotheline,theconversation count,andthedate/timeofthemostresentconversation.Theseitemswillbeupdatedwitheach conversation.Ifasequencecheckfails,theentrywillhavetobeadjusted. TM−temporarydatafiles Thesefilesarecreatedinthespooldirectorywhilefilesarebeingcopiedfromaremotemachine. Theirnameshavetheform TM.pid.ddd wherepidisaprocess-idanddddisasequentialthreedigitnumberstartingatzeroforeach invocationofuucicoandincrementedforeachfilereceived. Aftertheentireremotefileisreceived,theTMfileismoved/copiedtotherequesteddestination. Ifprocessingisabnormallyterminatedorthemove/copyfails,thefilewillremaininthespool directory. Theleftoverfilesshouldbeperiodicallyremoved;theuucleanprogramisusefulinthisregard. Thecommand uuclean−pTM willremoveallTMfilesolderthanthreedays. LOG−logentryfiles Duringexecutionofprograms,individualLOGfilesarecreatedinthespooldirectorywithinformationaboutqueuedrequests,callstoremotesystems,executionofuuxcommandsandfilecopy results.ThesefilesshouldbecombinedintotheLOGFILEbyusingtheuulogprogram.ThisprogramwillputthenewLOGfilesatthebeginningoftheexistingLOGFILE.Thecommand uulog willaccomplishthemerge.Optionsareavailabletoprintsomeorallthelogentriesafterthefiles aremerged.TheLOGFILEshouldberemovedperiodicallysinceitiscopiedeachtimenewLOG entriesareputintothefile. TheLOGfilesarecreatedinitiallywithmode0222.Iftheprogramwhichcreatesthefileterminatesnormally,itchangesthemodeto0666.Abortedrunsmayleavethefileswithmode0222 andtheuulogprogramwillnotreadorremovethem.Toremovethem,eitheruserm,uuclean,or changethemodeto0666andletuulogmergethemwiththeLOGFILE. STST−systemstatusfiles Thesefilesarecreatedinthespooldirectorybytheuucicoprogram.Theycontaininformationof failuressuchaslogin,dialuporsequencecheckandwillcontainaTALKINGstatuswhento machinesareconversing.Theformofthefilenameis STST.sys wheresysistheremotesystemname. Forordinaryfailures(dialup,login),thefilewillpreventrepeatedtriesforaboutonehour.For sequencecheckfailures,thefilemustberemovedbeforeanyfutureattemptstoconversewiththat remotesystem. Ifthefileisleftduetoanabortedrun,itmaycontainaTALKINGstatus.Inthiscase,thefile mustberemovedbeforeaconversationisattempted.

-13-LCK−lockfiles Lockfilesarecreatedforeachdeviceinuse(e.g.automaticcallingunit)andeachsystemconversing.Thispreventsduplicateconversationsandmultipleattemptstousethesamedevices.The formofthelockfilenameis LCK..str wherestriseitheradeviceorsystemname.Thefilesmaybeleftinthespooldirectoryifruns abort.Theywillbeignored(reused)afteratimeofabout24hours.Whenrunsabortandcalls aredesiredbeforethetimelimit,thelockfilesshouldberemoved. ShellFiles Theuucpprogramwillspoolworkandattempttostarttheuucicoprogram,butthestartingof uucicowillsometimesfail.(Nodevicesavailable,loginfailuresetc.).Therefore,theuucicoprogramshouldbeperiodicallystarted.Thecommandtostartuucicocanbeputina‘‘shell’’file withacommandtomergeLOGfilesandstartedbyacrontabentryonanhourlybasis.Thefile couldcontainthecommands program/uulog program/uucico−r1 Notethatthe‘‘−r1’’optionisrequiredtostarttheuucicoprograminMASTERmode. AnothershellfilemaybesetuponadailybasistoremoveTM,STandLCKfilesandC.orD. filesforworkwhichcannotbeaccomplishedforreasonslikebadphonenumber,loginchangesetc. Ashellfilecontainingcommandslike program/uuclean−pTM−pC.−pD. program/uuclean−pST−pLCK−n12 canbeused.Notethe‘‘−n12’’optioncausestheSTandLCKfilesolderthan12hourstobe deleted.Theabsenceofthe‘‘−n’’optionwilluseathreedaytimelimit. AdailyorweeklyshellshouldalsobecreatedtoremoveorsaveoldLOGFILEs.Ashelllike cpspool/LOGFILEspool/o.LOGFILE rmspool/LOGFILE canbeused. LoginEntry Oneormoreloginsshouldbesetupforuucp.Eachofthe‘‘/etc/passwd’’entriesshouldhavethe ‘‘program/uucico’’astheshelltobeexecuted.Thelogindirectoryisnotused,butifthesystem hasaspecialdirectoryforusebytheusersforsendingorreceivingfile,itshouldasthelogin entry.ThevariousloginsareusedinconjunctionwiththeUSERFILEtorestrictfileaccess. Specifyingtheshellargumentlimitsthelogintotheuseofuucp(uucico)only. FileModes Itissuggestedthattheownerandfilemodesofvariousprogramsandfilesbesetasfollows. Theprogramsuucp,uux,uucicoanduuxqtshouldbeownedbytheuucploginwiththe‘‘setuid’’ bitsetandonlyexecutepermissions(e.g.mode04111).Thiswillpreventoutsidersfrommodifyingtheprogramstogetatastandardshellfortheuucplogins. TheL.sys,SQFILEandtheUSERFILEwhichareputintheprogramdirectoryshouldbeowned bytheuucploginandsetwithmode0400.