ckuins.txt 171 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589
  1. [1]The Columbia Crown The Kermit Project | Columbia University
  2. 612 West 115th Street, New York NY 10025 USA o [2]kermit@columbia.edu
  3. ...since 1981
  4. [3]Home [4]Kermit 95 [5]C-Kermit [6]Scripts [7]Current [8]New [9]FAQ
  5. [10]Support
  6. C-Kermit 9.0 Installation Instructions and Options for Unix
  7. [ [11]Contents ] [ [12]C-Kermit ] [ [13]Kermit Home ]
  8. Frank da Cruz
  9. The Kermit Project
  10. Columbia University
  11. As of C-Kermit version: 9.0.302, 20 August 2011
  12. This file last updated: Sun Aug 21 12:08:29 2011 (New York City
  13. time)
  14. IF YOU ARE READING A PLAIN-TEXT version of this document, it is a
  15. plain-text copy of a Web page. You can visit the original (and possibly
  16. more up-to-date) Web page here:
  17. [14]http://www.columbia.edu/kermit/ckuins.html
  18. CONTENTS
  19. [15]OVERVIEW
  20. 1. [16]INTERNET QUICK START
  21. 2. [17]INSTALLING FROM PACKAGES
  22. 3. [18]INSTALLING PREBUILT BINARIES
  23. 4. [19]BUILDING FROM SOURCE CODE
  24. 5. [20]INSTALLING THE KERMIT FILES
  25. 6. [21]INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
  26. 7. [22]CHECKING THE RESULTS
  27. 8. [23]REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
  28. 9. [24]UNIX VERSIONS
  29. 10. [25]DIALING OUT AND COORDINATING WITH UUCP
  30. 11. [26]RUNNING UNIX C-KERMIT SETUID OR SETGID
  31. 12. [27]CONFIGURING UNIX WORKSTATIONS
  32. 13. [28]BIZARRE BEHAVIOR AT RUNTIME
  33. 14. [29]CRASHES AND CORE DUMPS
  34. 15. [30]SYSLOGGING
  35. 16. [31]BUILDING SECURE VERSIONS OF C-KERMIT 9.0
  36. 17. [32]INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
  37. OVERVIEW
  38. [ [33]Top ] [ [34]Contents ] [ [35]Next ]
  39. WARNING: This document contains notes that have been accumulating
  40. since the mid 1980s. Many of the products and Unix versions
  41. mentioned here have not been heard of in a long while, but that does
  42. not necessarily mean they are not still running in some obscure
  43. nook.
  44. This file contains Unix-specific information. A lot of it. Unlike most
  45. other packages, C-Kermit tries very hard to be portable to every Unix
  46. variety (and every release of each one) known to exist, including many
  47. that are quite old, as well as to other platforms like VMS, AOS/VS,
  48. VOS, OS-9, the BeBox, the Amiga, etc.
  49. Since C-Kermit gets so deeply into the file system, i/o system, and
  50. other areas that differ radically from one Unix platform to the next,
  51. this means that a lot can go wrong when you try to install C-Kermit on
  52. (for example) a new release of a particular variety of Unix, in which
  53. certain things might have changed that C-Kermit depended upon.
  54. This file concentrates on installation. For a description of general
  55. configuration options for C-Kermit, please read the [36]Configurations
  56. Options document. For troubleshooting after installation, see the
  57. [37]General Hints and Tips and [38]Unix-Specific Hints and Tips
  58. documents. The latter, in particular, contains lots of information on
  59. lots of specific Unix platforms. If you want to work on the source
  60. code, see the [39]C-Kermit Program Logic Manual
  61. You may install C-Kermit:
  62. * From an "[40]install package", if one is available.
  63. * As a [41]prebuilt binary, if available, plus accompanying text
  64. files.
  65. * By building from [42]source code.
  66. 1. INTERNET QUICK START
  67. [ [43]Top ] [ [44]Contents ] [ [45]Next ] [ [46]Previous ]
  68. If your Unix computer is on the Internet and it has a C compiler,
  69. here's how to download, build, and install C-Kermit directly from the
  70. "tarballs" or Zip archives:
  71. 1. Make a fresh directory and cd to it.
  72. 2. Download the C-Kermit source code:
  73. [47]ftp://www.columbia.edu/kermit/archives/cku211.tar.Z (compress
  74. format) or [48]ftp://www.columbia.edu/kermit/archives/cku211.tar.gz
  75. (gunzip format). If those links don't work, FTP transfers are being
  76. blocked; try these HTTP links instead:
  77. [49]http://kermit.columbia.edu/ftp/archives/cku211.tar.Z (compress
  78. format) or
  79. [50]http://kermit.columbia.edu/ftp/archives/cku211.tar.gz (gunzip
  80. format).
  81. 3. Uncompress the compressed tar file with "uncompress" or "gunzip",
  82. according to which type of compressed file you downloaded. (If you
  83. don't understand this, you could download a (much larger)
  84. uncompressed tar archive directly:
  85. [51]ftp://www.columbia.edu/kermit/archives/cku211.tar or
  86. [52]http://kermit.columbia.edu/ftp/archives/cku211.tar
  87. 4. Now type "tar xvf cku211.tar" to unpack the individual files from
  88. the tar archive.
  89. 5. Type "rm cku211.tar" to get rid of the tar archive, which is no
  90. longer needed.
  91. 6. Read the comments at the top of the makefile to find out which
  92. target to use and then type the appropriate "make" command, such as
  93. "make linux", "make solaris8", etc.
  94. 7. This produces a binary in your current directory called "wermit".
  95. Start it by typing "./wermit" and [53]try it out to make sure it
  96. works. Then read [54]Section 5 for how to install it, or simply
  97. copy the wermit binary to the desired public directory, rename it
  98. to kermit, and give it the needed permissions (and, if it is going
  99. to be used to dial out, give it the same group and owner and
  100. permissions as the cu, tip, or minicom program).
  101. For secure installations, see [55]Sections 5 and [56]16.
  102. 2. INSTALLING FROM PACKAGES
  103. [ [57]Top ] [ [58]Contents ] [ [59]Next ] [ [60]Previous ]
  104. Various Unix varieties -- Linux, Solaris, AIX, etc -- now incorporate
  105. the idea of "install packages", and many users expect to find all new
  106. applications in this format. A selection of install packages might be
  107. available for any given release of C-Kermit, but there is a tradeoff
  108. between convenience and safety. Unix presents several notable problems
  109. to the builder of install packages:
  110. a. Since C-Kermit is portable to many non-Unix platforms (VMS, VOS,
  111. AOS/VS, etc), some of the files in the C-Kermit distribution do not
  112. fit into the Unix application model. In particular, C-Kermit
  113. includes some plain text files (described in [61]Section 5) and
  114. Unix has no standard place to put such files. Typical Unix package
  115. managers do not allow for them. Where should they go, and how will
  116. the user know where to find them?
  117. b. Installation of any program that will be used to make modem calls
  118. requires some important decisions from the installer regarding
  119. security and privilege.
  120. Item (b) is discussed at length in [62]Sections 10 and [63]11 of this
  121. document, but the package-related aspects are also given here. The
  122. basic problem is that Unix dialout devices and the UUCP "lock files"
  123. that regulate contention for them (described in [64]Section 10) are
  124. usually protected against "world". Therefore, the install procedure
  125. must either run as root in order to give the Kermit binary the required
  126. permissions, group, and/or owner, or else the dialout devices and
  127. associated directories must be open for group or world reading and
  128. writing. Otherwise, the Kermit program just installed WILL NOT WORK for
  129. dialing out.
  130. Thus, a well-crafted installation procedure should present the options
  131. and allow the installer to choose the method, if any, for regulating
  132. access to the dialout devices:
  133. a. Check the permissions of the lockfile directory and the dialout
  134. devices. If they do not allow group or world R/W access, then:
  135. b. "Your UUCP lockfile directory and/or dialout devices require
  136. privilege to access. You must either change their permissions or
  137. install Kermit with privileges."
  138. c. "If you wish to install Kermit with privileges, it will be given
  139. the same owner, group, and permissions as the cu program so it can
  140. use the dialout devices." (This is increasingly problematic as some
  141. newer Unix systems like Mac OS X don't have a cu program, or even a
  142. serial port!)
  143. d. If they choose (c) but the user is not root, give a message that
  144. the install procedure can be run only by root and then quit.
  145. It should go without saying, of course, that any binaries that are to
  146. be included in an install package should be built fresh on the exact
  147. platform (e.g. Red Hat 8.0 on Intel) for which the package is targeted;
  148. prebuilt binaries ([65]next section) from other sites are likely to
  149. have library mismatches. [66]CLICK HERE for more about building
  150. C-Kermit install packages.
  151. The Kermit Project does not have the resources or the expertise to make
  152. install packages for every platform. Most install packages, therefore,
  153. are contributed by others, and they do not necessarily follow the
  154. guidelines given above. Pay attention to what they do.
  155. If you are an end user who has obtained a C-Kermit install package for
  156. a particular platform, you should be aware that some additional steps
  157. might needed if you want to use Kermit to dial out. Read [67]Section 10
  158. for details.
  159. 3. INSTALLING PREBUILT BINARIES
  160. [ [68]Top ] [ [69]Contents ] [ [70]Next ] [ [71]Previous ]
  161. Hundreds of prebuilt C-Kermit binaries are available on the CDROM in
  162. the BINARY tree [NOTE: The C-Kermit CDROM is still for version 7.0],
  163. and at our ftp site in the [72]kermit/bin area (with names starting
  164. with "ck"), also accessible on the [73]C-Kermit website. To install a
  165. prebuilt binary:
  166. a. Rename the binary to "wermit".
  167. b. Make sure it works; some tests are suggested in [74]Section 7.
  168. c. Follow steps (b) through (e) in [75]Section 4.
  169. d. Install related files as described in [76]Section 5.
  170. But first... Please heed the following cautions:
  171. a. If you pick the wrong binary, it won't work (or worse).
  172. b. Even when you pick the appropriate binary, it still might not work
  173. due to shared-library mismatches, etc. (see [77]Section 4.0).
  174. c. Don't expect a binary built on or for version n of your OS to work
  175. on version n - x (where x > 0). However, it is supposed to be safe
  176. to run a binary built on (or for) an older OS release on a newer
  177. one (but is [78]increasingly less so as time-honored principles of
  178. stability and backwards compatibility go fading into obscurity).
  179. Therefore, it is always better to build your own binary from source
  180. code ([79]next section) if you can. But since it is increasingly common
  181. for Unix systems (not to mention VMS and other OS's) to be delivered
  182. without C compilers, it is sometimes not possible. In such cases, try
  183. the most appropriate prebuilt binary or binaries, and if none of them
  184. work, [80]contact us and we'll see what we can do to help.
  185. 4. BUILDING FROM SOURCE CODE
  186. [ [81]Top ] [ [82]Contents ] [ [83]Next ] [ [84]Previous ]
  187. Also see: [85]Section 8 and [86]Section 9.
  188. C-Kermit is designed to be built and used on as many platforms as
  189. possible: Unix and non-Unix, old and new (and ancient), ANSI C and K&R.
  190. The Unix version does not use or depend on any external tools for
  191. building except the "make" utility, the C compiler, the linker, and the
  192. shell. It does not use any external automated configuration tools such
  193. as configure, autoconf, automake, libtool, etc. Everything in C-Kermit
  194. has been built by hand based on direct experience or reports or
  195. contributions from users of each platform.
  196. The [87]C-Kermit makefile contains the rules for building the program
  197. for each of the hundreds of different kinds of Unix systems that
  198. C-Kermit attempts to support. It covers all Unix variations since about
  199. 1980 -- pretty much everything after Unix V6. Separate makefiles are
  200. used for [88]Plan 9 and [89]2.x BSD.
  201. Prerequisites:
  202. * The C compiler, linker, and make program must be installed.
  203. * The C libraries and header files must be installed (*).
  204. * The C-Kermit source code and makefile in your current directory.
  205. * The C-Kermit text files ([90]Section 5) in your current directory.
  206. * This is becoming problematic in this new age of "selective
  207. installs" e.g. of Linux packages. C-Kermit builds will often fail
  208. because replying "no" to some obscure Linux installation option
  209. will result in missing libraries or header files. Ditto on
  210. platforms like AIX and Solaris that don't come with C compilers,
  211. and then later have gcc installed, but are still missing crucial
  212. libraries, like libm (math).
  213. Plus:
  214. * For TCP/IP networking support, the sockets library and related
  215. header files must be installed.
  216. * The math library for floating-point arithmetic support (can be
  217. deselected by adding -DNOFLOAT to CFLAGS and removing -lm from
  218. LIBS).
  219. * Many and varied security libraries for building a secure version
  220. (Kerberos, SSL/TLS, SRP, Zlib,...) These are required only if you
  221. select a secure target.
  222. * For the curses-based fullscreen file-transfer display, the curses
  223. or ncurses header file(s) and library, and probably also the
  224. termcap and/or termlib library. Note that the names and locations
  225. of these files and libraries are likely to change capriciously with
  226. every new release of your Unix product. If you discover that the
  227. C-Kermit build procedure fails because your curses and/or termxxx
  228. headers or libraries are not named or located as expected, please
  229. [91]let us know. In the meantime, work around by installing
  230. symlinks.
  231. * IMPORTANT: Modern Linux distributions might give you the choice
  232. during installation of whether to install the "ncurses development
  233. package" (perhaps called "ncurses-devel"). If you did not install
  234. it, you won't be able to build C-Kermit with curses support
  235. included. In this case, either go back and install ncurses, or else
  236. choose (or create) a non-curses makefile target for your platform.
  237. To install the ncurses developers tools in Red Hat Linux, do
  238. "apt-get install ncurses-developer" or if you have the CD:
  239. mount redhat cdrom
  240. goto RedHat/RPMS
  241. rpm -ivh ncurses-devel*.rpm
  242. or to have the exact name ls ncurse* and load as
  243. rpm -ivh filename
  244. then leave the cdrom and unmount it.
  245. * In AIX you might have to go back and install any or all of:
  246. bos.adt.base
  247. bos.adt.include
  248. bos.adt.lib
  249. bos.adt.libm
  250. bos.adt.utils
  251. from the first installation CD.
  252. Depending on where you got it, the makefile might need to be renamed
  253. from ckuker.mak to makefile. Directions:
  254. a. Type "make xxx" where xxx is the name of the makefile target most
  255. appropriate to your platform, e.g. "make linux", "make aix43", etc.
  256. Read the [92]comments at the top of the makefile for a complete
  257. list of available targets (it's a long list).
  258. b. Test the resulting 'wermit' file (see [93]Section 7 for
  259. suggestions). If it's OK, proceed; otherwise [94]notify us.
  260. NOTE: steps (c) through (e) can be accomplished using the
  261. [95]makefile 'install' target as described in [96]Section 5.4.
  262. c. Rename the 'wermit' file to 'kermit', copy it to the desired binary
  263. directory (such as /usr/local/bin or /opt/something), and if it is
  264. to be used for dialing out, give it the same owner, group, and
  265. permissions as the 'cu' program (IMPORTANT: read [97]Sections 10
  266. and [98]11 for details).
  267. d. Install the man page, ckuker.nr, with your other man pages.
  268. e. Install the accompanying text files (see [99]Section 5).
  269. f. If you want C-Kermit to also offer a Telnet command-line
  270. personality, make a symbolic link as follows:
  271. cd directory-where-kermit-binary-is
  272. ln -s kermit telnet
  273. If you want C-Kermit to be the default Telnet client, make sure the
  274. directory in which you created the symlink is in the PATH ahead of
  275. the where the regular Telnet client is.
  276. g. If you want C-Kermit to also offer an FTP command-line personality,
  277. make a symlink called "ftp" as in (f).
  278. h. If you want C-Kermit to also offer an FTTP command-line
  279. personality, make a symlink called "http" as in (f).
  280. i. If you want to offer an Internet Kermit Service, follow the
  281. directions in the [100]IKSD Administrator's Guide.
  282. 4.0. Special Considerations for C-Kermit 8.0-9.0
  283. [ [101]Top ] [ [102]Contents ] [ [103]Next ]
  284. Also see: [104]C-Kermit Configuration Options
  285. SECTION CONTENTS
  286. 4.1. [105]The Unix Makefile
  287. 4.2. [106]The C-Kermit Initialization File
  288. 4.3. [107]The 2.x BSD Makefile
  289. 4.4. [108]The Plan 9 Makefile
  290. 4.5. [109]Makefile Failures
  291. (Also see the [110]Configurations Options document, [111]Section 8).
  292. Lots of new features have been added in versions 7.0 and 8.0 that
  293. require access to new symbols, APIs, libraries, etc, and this will no
  294. doubt cause problems in compiling, linking, or execution on platforms
  295. where 6.0 and earlier built without incident. This section contains
  296. what we know as of the date of this file.
  297. The first category concerns the new Kermit Service Daemon (IKSD; see
  298. the [112]IKSD Administrator's Guide for details):
  299. The wtmp File
  300. When C-Kermit is started as an IKSD (under inetd), it makes
  301. syslog and wtmp entries, and also keeps its own ftpd-like log.
  302. The code assumes the wtmp log is /var/log/wtmp on Linux and
  303. /usr/adm/wtmp elsewhere. No doubt this assumption will need
  304. adjustment. Use -DWTMPFILE=path to override at compile time
  305. (there is also a runtime override). See [113]iksd.html for
  306. details.
  307. UTMP, utsname(), etc
  308. C-Kermit 7.0 gets as much info as it can about its job -- mainly
  309. for IKSD logging -- from utmp. But of course utmp formats and
  310. fields differ, and for that matter, there can be two different
  311. header files, <utmp.h> and <utmpx.h>. Look for HAVEUTMPX and
  312. HAVEUTHOST in [114]ckufio.c and let me know of any needed
  313. adjustments.
  314. Password lookup
  315. IKSD needs to authenticate incoming users against the password
  316. list. In some cases, this requires the addition of -lcrypt (e.g.
  317. in Unixware 2.x). In most others, the crypt functions are in the
  318. regular C library. If you get "crypt" as an unresolved symbol at
  319. link time, add -lcrypt to LIBS. If your site has local
  320. replacement libraries for authentication, you might need a
  321. special LIBS clause such as "LIBS=-L/usr/local/lib -lpwent".
  322. These days most Unix systems take advantage of shadow password
  323. files or Pluggable Authentication Modules (PAM). If your system
  324. uses shadow passwords you must add -DCK_SHADOW to the CFLAGS
  325. list. If your system requires PAM you must add -DCK_PAM to the
  326. CFLAGS and -lpam -ldl to LIBS.
  327. getusershell()
  328. This is called by the IKSD at login time to see if a user has
  329. been "turned off". But many Unix platforms lack this function.
  330. In that case, you will get unresolved symbol reports at link
  331. time for _getusershell, _endusershell; to work around, add
  332. -DNOGETUSERSHELL.
  333. initgroups()
  334. This is called by IKSD after successful authentication. But some
  335. platforms do not have this function, so obviously it can't be
  336. called there, in which case add -DNOINITGROUPS.
  337. setreuid(), setreuid(), setregid() not found or "deprecated"
  338. Find out what your Unix variety wants you to use instead, and
  339. make appropriate substitutions in routine zvpass(), module
  340. [115]ckufio.c, and [116]let us know.
  341. printf()
  342. IKSD installs a printf() substitute to allow redirection of
  343. printf-like output to the connection. However, this can conflict
  344. with some curses libraries. In this case, separate binaries must
  345. be built for IKSD and non-IKSD use.
  346. If you encounter difficulties with any of the above, and you are not
  347. interested in running C-Kermit as an IKSD, then simply add NOIKSD to
  348. CFLAGS and rebuild. Example:
  349. make sco286
  350. (get lots of errors)
  351. make clean
  352. make sco286 "KFLAGS=-DNOIKSD"
  353. Some non-IKSD things to watch out for:
  354. Return type of main()
  355. The main() routine is in [117]ckcmai.c. If you get complaints
  356. about "main: return type is not blah", define MAINTYPE on the CC
  357. command line, e.g.:
  358. make xxx "KFLAGS=-DMAINTYPE=blah
  359. (where blah is int, long, or whatever). If the complaint is
  360. "Attempt to return a value from a function of type void" then
  361. add -DMAINISVOID:
  362. make xxx "KFLAGS=-DMAINISVOID=blah
  363. DNS Service Records
  364. This feature allows a remote host to redirect C-Kermit to the
  365. appropriate socket for the requested service; e.g. if C-Kermit
  366. requests service "telnet" and the host offers Telnet service on
  367. port 999 rather than the customary port 23. If you get
  368. compile-time complaints about not being able to find <resolv.h>,
  369. <netdb.h>, or <arpa/nameser.h>, add -DNO_DNS_SRV to CFLAGS. If
  370. you get link-time complaints about unresolved symbols res_search
  371. or dn_expand, try adding -lresolve to LIBS.
  372. \v(ipaddress)
  373. If "echo \v(ipaddress)" shows an empty string rather than your
  374. local IP address, add -DCKGHNLHOST to CFLAGS and rebuild.
  375. <sys/wait.h>
  376. If this file can't be found at compile time, add -DNOREDIRECT to
  377. CFLAGS. This disables the REDIRECT and PIPE commands and
  378. anything else that needs the wait() system service.
  379. syslog()
  380. C-Kermit can now write syslog records. Some older platforms
  381. might not have the syslog facility. In that case, add
  382. -DNOSYSLOG. Others might have it, but require addition of
  383. -lsocket to LIBS (SCO OSR5 is an example). See [118]Section 15.
  384. putenv()
  385. If "_putenv" comes up as an undefined symbol, add -DNOPUTENV to
  386. CFLAGS and rebuild.
  387. "Passing arg1 of 'time' from incompatible pointer"
  388. This is a mess. See the mass of #ifdefs in the appropriate
  389. module, [119]ckutio.c or [120]ckufio.c.
  390. gettimeofday()
  391. Wrong number of arguments. On most platforms, gettimeofday()
  392. takes two arguments, but on a handful of others (e.g. Motorola
  393. System V/88 V4, SNI Reliant UNIX 5.43, etc) it takes one. If
  394. your version of gettimeofday() is being called with two args but
  395. wants one, add -DGTODONEARG.
  396. "Assignment makes pointer from integer without a cast"
  397. This warning might appear in [121]ckutio.c or [122]ckufio.c. (or
  398. elsewhere), and usually can be traced to the use of a system or
  399. library function that returns a pointer but that is not declared
  400. in the system header files even though it should be. Several
  401. functions are commonly associated with this error:
  402. + getcwd(): Add -DDCLGETCWD to CFLAGS and rebuild.
  403. + popen() : Add -DDCLPOPEN to CFLAGS and rebuild.
  404. + fdopen(): Add -DDCLFDOPEN to CFLAGS and rebuild.
  405. "Operands of = have incompatible types"
  406. "Incompatible types in assignment"
  407. If this comes from [123]ckcnet.c and comes from a statement
  408. involving inet_addr(), try adding -DINADDRX to CFLAGS. If that
  409. doesn't help, then try adding -DNOMHHOST.
  410. Complaints about args to get/setsockopt(), getpeername(), getsockname()
  411. These are all in [124]ckcnet.c. Different platforms and OS's and
  412. versions of the same OS change this all the time: int, size_t,
  413. unsigned long, etc. All the affected variables are declared
  414. according to #ifdefs within ckcnet.c, so find the declarations
  415. and adjust the #ifdefs accordingly.
  416. size_t
  417. In case of complaints about "unknown type size_t", add
  418. -DSIZE_T=int (or other appropriate type) to CFLAGS.
  419. 'tz' undefined
  420. Use of undefined enum/struct/union 'timezone'
  421. Left of 'tv_sec' specifies undefined struct/union 'timeval' And
  422. similar complaints in [125]ckutio.c: Add -DNOGFTIMER and/or
  423. -DNOTIMEVAL.
  424. Symlinks
  425. The new built-in DIRECTORY command should show symlinks like "ls
  426. -l" does. If it does not, check to see if your platform has the
  427. lstat() and readlink() functions. If so, add -DUSE_LSTAT and
  428. -DCKSYMLINK to CFLAGS and rebuild. On the other hand, if lstat()
  429. is unresolved at link time, add -DNOLSTAT to CFLAGS. If
  430. readlink() is also unresolved, add -DNOSYMLINK.
  431. realpath()
  432. Link-time complains about realpath() -- find the library in
  433. which it resides and add it to LIBS (example for Unixware 7.1:
  434. "-lcudk70") or add -DNOREALPATH to CFLAGS and rebuild. If built
  435. with realpath() but debug log file is truncated or mangled,
  436. ditto (some realpath() implementations behave differently from
  437. others). If built with realpath() and seemingly random core
  438. dumps occur during file path resolution, ditto.
  439. Failure to locate header file <term.h>
  440. Usually happens on Linux systems that have the C compiler
  441. installed, but not the ncurses package (see comments about
  442. selective installs above). Go back and install ncurses, or use
  443. "make linuxnc" (Linux No Curses).
  444. "Can't find shared library libc.so.2.1"
  445. "Can't find shared library libncurses.so.3.0", etc...
  446. You are trying to run a binary that was built on a computer that
  447. has different library versions than your computer, and your
  448. computer's loader is picky about library version numbers.
  449. Rebuild from source on your computer.
  450. Time (struct tm) related difficulties:
  451. Errors like the following:
  452. "ckutio.c", line 11994: incomplete struct/union/enum tm: _tm
  453. "ckutio.c", line 11995: error: cannot dereference non-pointer type
  454. "ckutio.c", line 11995: error: assignment type mismatch
  455. "ckutio.c", line 11997: warning: using out of scope declaration: localtime
  456. "ckutio.c", line 11997: error: unknown operand size: op "="
  457. "ckutio.c", line 11997: error: assignment type mismatch
  458. "ckutio.c", line 11998: error: undefined struct/union member: tm_year
  459. "ckutio.c", line 12000: error: undefined struct/union member: tm_mon
  460. "ckutio.c", line 12001: error: undefined struct/union member: tm_mday
  461. "ckutio.c", line 12002: error: undefined struct/union member: tm_hour
  462. "ckutio.c", line 12003: error: undefined struct/union member: tm_min
  463. "ckutio.c", line 12004: error: undefined struct/union member: tm_sec
  464. are due to failure to include the appropriate time.h header
  465. files. Unix platforms generally have one or more of the
  466. following: <time.h>, <sys/time.h>, and <sys/timeb.h>. Any
  467. combination of these might be required. Defaults are set up for
  468. each makefile target. The defaults can be corrected on the CC
  469. command line by adding the appropriate definition from the
  470. following list to CFLAGS:
  471. -DTIMEH Include <time.h>
  472. -DNOTIMEH Don't include <time.h>
  473. -DSYSTIMEH Include <sys/time.h>
  474. -DNOSYSTIMEH Don't include <sys/time.h>
  475. -DSYSTIMEBH Include <sys/timeb.h>
  476. -DNOSYSTIMEBH Don't include <sys/timeb.h>
  477. Note that <sys/timeb.h> is relatively scarce in the System V and
  478. POSIX environments; the only platform of recent vintage where it
  479. was/is used is OSF/1 and its derivatives (Digital Unix and Tru64
  480. Unix).
  481. Struct timeval and/or timezone not declared:
  482. In some cases, merely including the appropriate time.h header
  483. files is still not enough. POSIX.1 does not define the timeval
  484. struct, and so the items we need from the header are protected
  485. against us by #ifndef _POSIX_SOURCE or somesuch. In this case,
  486. we have to declare the timeval (and timezone) structs ourselves.
  487. To force this, include -DDCLTIMEVAL in CFLAGS.
  488. Warnings about dn_expand() Argument #4
  489. WARNING: argument is incompatible with prototyp. It's the old
  490. char versus unsigned char stupidity again. Try to find a
  491. compiler switch like GCC's "-funsigned-char". Failing that, add
  492. -DCKQUERYTYPE=xxx to CFLAGS, where xxx is whatever 'man
  493. dn_expand' tells you the type of the 4th argument should be
  494. (presumably either char or unsigned char; in the latter case use
  495. CHAR to avoid confusion caused by multiple words.
  496. Switch Table Overflow (in [126]ckcuni.c)
  497. Add -DNOUNICODE to CFLAGS.
  498. Compile-time warnings about ck_out() or tgetstr() or tputs():
  499. Easy solution: Add -DNOTERMCAP to CFLAGS. But then you lose the
  500. SCREEN function. Real solution: Try all different combinations
  501. of the following CFLAGS:
  502. -DTPUTSARGTYPE=char -DTPUTSFNTYPE=int
  503. -DTPUTSARGTYPE=int -DTPUTSFNTYPE=void
  504. Until the warnings go away, except maybe "ck_outc: return with a
  505. value in a function returning void", and in that case also add
  506. -DTPUTSISVOID.
  507. "Passing arg 1 of to tputs() makes pointer from integer without a
  508. cast":
  509. Add -DTPUTSARG1CONST to CFLAGS.
  510. "Undefined symbol: dup2"
  511. Add -DNOZEXEC to CFLAGS.
  512. "header file 'termcap.h' not found"
  513. Add -DNOHTERMCAP to CFLAGS.
  514. Other difficulties are generally of the "where is curses.h and what is
  515. it called this week?" variety (most easily solved by making symlinks in
  516. the include and lib directories), or overzealous complaints regarding
  517. type mismatches in function calls because of the totally needless and
  518. silly signed versus unsigned char conflict (*), etc. In any case,
  519. please send any compilation or linking warnings or errors to the
  520. author, preferably along with fixes.
  521. * C-Kermit does not use the signed property of chars at all anywhere,
  522. ever. So if all chars and char *'s can be made unsigned at compile
  523. time, as they can in gcc with "-funsigned-char", they should be.
  524. IMPORTANT: If you find any of these hints necessary for a particular
  525. make target (or you hit upon others not listed here), PLEASE SEND A
  526. REPORT TO:
  527. [127]kermit-support@columbia.edu
  528. 4.1. The Unix Makefile
  529. [ [128]Top ] [ [129]Contents ] [ [130]Section Contents ] [ [131]Next ]
  530. [ [132]Previous ]
  531. If your distribution does not contain a file with the name "makefile"
  532. or "Makefile", then rename the file called ckuker.mak to makefile:
  533. mv ckuker.mak makefile
  534. Then type "make xxx", where xxx is the platform you want to build
  535. C-Kermit for. These are listed in the [133]comments at the top of the
  536. makefile. For example, to build C-Kermit for Linux, type:
  537. make linux
  538. Here are some typical examples:
  539. Target Description
  540. linux Linux, any version on any hardware platform
  541. openbsd OpenBSD, any version on any hardware platform
  542. aix43 AIX 4.3
  543. aix43g AIX 4.3, built with gcc
  544. solaris9 Solaris 9
  545. solaris9g Solaris 9 built with gcc
  546. hpux1100 HP-UX 11-point-anything
  547. The makefile is quite long, and at least two versions of Unix, SCO
  548. Xenix/286 and 2.x BSD, cannot cope with its length. An attempt to "make
  549. sco286" gives the message "Make: Cannot alloc mem for env.. Stop".
  550. Solution: edit away some or all of the nonrelevant material from the
  551. makefile. (A separate version of the makefile is provided for BSD 2.x:
  552. ckubs2.mak but C-Kermit 8.0 can't be built for BSD 2.x -- it has simply
  553. grown too large.)
  554. Some make programs reportedly cannot handle continued lines (lines
  555. ending in backslash (\)). If you have a problem with the makefile, try
  556. editing the makefile to join the continued lines (remove the
  557. backslashes and the following linefeed).
  558. Other makefile troubles may occur because tabs in the makefile have
  559. somehow been converted to spaces. Spaces and tabs are distinct in Unix
  560. makefiles.
  561. Similarly, carriage returns might have been added to the end of each
  562. line, which also proves confusing to most Unix versions of make.
  563. Check to see if there are comments about your particular version in its
  564. makefile target itself. In a text editor such as EMACS or VI, search
  565. for the make entry name followed by a colon, e.g. "linux:" (if you
  566. really are building C-Kermit for Linux, do this now).
  567. Check to see if there are comments about your particular version in the
  568. [134]ckubwr.txt file ([135]CLICK HERE for the Web version).
  569. If you have trouble with building [136]ckwart.c, or running the
  570. resulting wart preprocessor program on [137]ckcpro.w:
  571. 1. Just "touch" the [138]ckcpro.c file that comes in the distribution
  572. and then give the "make" command again, or:
  573. 2. Compile ckwart.c "by hand": cc -o wart ckwart.c, or:
  574. 3. Try various other tricks. E.g. one Linux user reported that that
  575. adding the "static" switch to the rule for building wart fixed
  576. everything:
  577. wart: ckwart.$(EXT)
  578. $(CC) -static -o wart ckwart.$(EXT) $(LIBS)
  579. If your compiler supports a compile-time option to treat ALL chars (and
  580. char *'s, etc) as unsigned, by all means use it -- and send me email to
  581. let me know what it is (I already know about gcc -funsigned-char).
  582. To add compilation options (which are explained later in this document)
  583. to your makefile target without editing the makefile, include
  584. "KFLAGS=..." on the make command line, for example:
  585. make linux KFLAGS=-DNODEBUG
  586. make bsd "KFLAGS=-DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET"
  587. Multiple options must be separated by spaces. Quotes are necessary if
  588. the KFLAGS= clause includes spaces. The KFLAGS are added to the end of
  589. the CFLAGS that are defined in the selected makefile target. For
  590. example, the "bsd" entry includes -DBSD4 -DTCPSOCKET, so the second
  591. example above compiles Kermit with the following options:
  592. -DBSD4 -DTCPSOCKET -DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET
  593. (Notice how "-UTCPSOCKET" is used to negate the effect of the
  594. "-DTCPSOCKET" option that is included in the makefile target.)
  595. WARNING: Be careful with KFLAGS. If you build C-Kermit, change some
  596. files, and then run make again using the same make entry but specifying
  597. different KFLAGS than last time, make won't detect it and you could
  598. easily wind up with inconsistent object modules, e.g. some of them
  599. built with a certain option, others not. When in doubt, "make clean"
  600. first to make sure all your object files are consistent. Similarly, if
  601. you change CFLAGS, LIBS, or any other items in the makefile, or you
  602. rebuild using a different makefile target, "make clean" first.
  603. If you create a new makefile target, use static linking if possible.
  604. Even though this makes your C-Kermit binary bigger, the resulting
  605. binary will be more portable. Dynamically linked binaries tend to run
  606. only on the exact configuration and version where they were built; on
  607. others, invocation tends to fail with a message like:
  608. Can't find shared library "libc.so.2.1"
  609. 4.2. The C-Kermit Initialization File
  610. [ [139]Top ] [ [140]Contents ] [ [141]Section Contents ] [ [142]Next ]
  611. [ [143]Previous ]
  612. (This section is obsolete.) Read [144]Section 5 about the
  613. initialization file.
  614. 4.3. The 2.x BSD Makefile
  615. [ [145]Top ] [ [146]Contents ] [ [147]Section Contents ] [ [148]Next ]
  616. [ [149]Previous ]
  617. This section is obsolete. C-Kermit 6.0 was the last release that
  618. could be built on PDP-11 based BSD versions.
  619. 4.4. The Plan 9 Makefile
  620. [ [150]Top ] [ [151]Contents ] [ [152]Section Contents ] [ [153]Next ]
  621. [ [154]Previous ]
  622. Use the separate makefile [155]ckpker.mk. NOTE: The Plan 9 version of
  623. C-Kermit 8.0 has not yet been built. There should be no impediment to
  624. building it. However, even when built successfully, certain key
  625. features are missing, notably TCP/IP networking.
  626. 4.5. Makefile Failures
  627. [ [156]Top ] [ [157]Contents ] [ [158]Section Contents ] [
  628. [159]Previous ]
  629. First, be sure the source files are stored on your current disk and
  630. directory with the right names (in lowercase). Second, make sure that
  631. the makefile itself does not contain any lines with leading spaces:
  632. indented lines must all start with horizontal TAB, and no spaces.
  633. Then make sure that your Unix PATH is defined to find the appropriate
  634. compiler for your makefile target. For example, on SunOS systems, "make
  635. sunos41" builds C-Kermit for the BSD environment, and assumes that
  636. /usr/ucb/cc will be used for compilation and linking. If your PATH has
  637. /usr/5bin ahead of /usr/ucb, you can have problems at compile or link
  638. time (a commonly reported symptom is the inability to find "ftime"
  639. during linking). Fix such problems by redefining your Unix PATH, or by
  640. specifying the appropriate "cc" in CC= and CC2= statements in your
  641. makefile target.
  642. During edits 166-167, considerable effort went into making C-Kermit
  643. compilable by ANSI C compilers. This includes prototyping all of
  644. C-Kermit's functions, and including the ANSI-defined system header
  645. files for system and library functions, as defined in K&R, second
  646. edition: <string.h>, <stdlib.h>, <unistd.h> (except in NeXTSTEP this is
  647. <libc.h>), and <sys/stdtypes.h>. If you get warnings about any of these
  648. header files not being found, or about argument mismatches involving
  649. pid_t, uid_t, or gid_t, look in ckcdeb.h and make amendments. C-Kermit
  650. assumes it is being compiled by an ANSI-compliant C compiler if
  651. __STDC__ is defined, normally defined by the compiler itself. You can
  652. force ANSI compilation without defining __STDC__ (which some compilers
  653. won't let you define) by including -DCK_ANSIC on the cc command line.
  654. On the other hand, if your compiler defines __STDC__ but still
  655. complains about the syntax of Kermit's function prototypes, you can
  656. disable the ANSI-style function prototyping by including -DNOANSI on
  657. the command line.
  658. For SCO OpenServer, UNIX, ODT, and XENIX compilations, be sure to pick
  659. the most appropriate [160]makefile target, and be sure you have
  660. installed an SCO development system that is keyed to your exact SCO
  661. operating system release, down to the minor version (like 2.3.1).
  662. Also note that SCO distributes some of its libraries in encrypted form,
  663. and they must be decrypted before C-Kermit can be linked with them. If
  664. not, you might see a message like:
  665. ld: file /usr/lib/libsocket.a is of unknown type: magic number = 6365
  666. To decrypt, you must supply a key (password) that came with your
  667. license. Call SCO for further info.
  668. If your compiler uses something other than int for the pid (process id)
  669. data type, put -DPID_T=pid_t or whatever in your CFLAGS.
  670. If you get complaints about unknown data types uid_t and gid_t, put
  671. -DUID_T=xxx -DGID_T=yyy in your CFLAGS, where xxx and yyy are the
  672. appropriate types.
  673. If your compilation fails because of conflicting or duplicate
  674. declarations for sys_errlist, add -DUSE_STRERROR or -DNDSYSERRLIST to
  675. CFLAGS.
  676. If your compilation dies because getpwnam() is being redeclared (or
  677. because of "conflicting types for getwpnam"), add -DNDGPWNAM to your
  678. CFLAGS. If that doesn't work, then add -DDCGPWNAM to your CFLAGS (see
  679. ckufio.c around line 440).
  680. If the compiler complains about the declaration of getpwnam() during an
  681. ANSI C compilation, remove the declaration from ckufio.c or change the
  682. argument in the prototype from (char *) to (const char *).
  683. If you get complaints that getpwuid() is being called with an improper
  684. type, put -DPWID_T=xx in your CFLAGS.
  685. If you get compile-time warnings that t_brkc or t_eofc (tchars
  686. structure members, used in BSD-based versions) are undefined, or
  687. structure-member- related warnings that might be traced to this fact,
  688. add -DNOBRKC to CFLAGS.
  689. If you get a linker message to the effect that _setreuid or _setregid
  690. is not defined, add -DNOSETREU to CFLAGS, or add -DCKTYP_H=blah to
  691. CFLAGS to make C-Kermit read the right <types.h>-kind-of-file to pick
  692. up these definitions.
  693. If you get a message that _popen is undefined, add -DNOPOPEN to CFLAGS.
  694. If you get a complaint at compile time about an illegal pointer-integer
  695. combination in ckufio.c involving popen(), or at link time that _popen
  696. is an undefined symbol, add the declaration "FILE *popen();" to the
  697. function zxcmd() in ckufio.c (this declaration is supposed to be in
  698. <stdio.h>). If making this change does not help, then apparently your
  699. Unix does not have the popen() function, so you should add -DNOPOPEN to
  700. your make entry, in which case certain functions involving "file" i/o
  701. to the standard input and output of subprocesses will not be available.
  702. If your linker complains that _getcwd is undefined, you can add a
  703. getcwd() function to ckufio.c, or add it to your libc.a library using
  704. ar:
  705. #include <stdio.h>
  706. char *
  707. getcwd(buf,size) char *buf; int size; {
  708. #ifndef NOPOPEN
  709. #ifdef DCLPOPEN
  710. FILE *popen();
  711. #endif
  712. FILE *pfp;
  713. if (!buf) return(NULL);
  714. if (!(pfp = popen("pwd","r"))) return(NULL);
  715. fgets(buf,size-2,pfp);
  716. pclose(pfp);
  717. buf[strlen(buf)-1] = '\0';
  718. return((char *)buf);
  719. #else
  720. buf[0] = '\0';
  721. return(NULL);
  722. #endif /* NOPOPEN */
  723. }
  724. #ifdef NOPOPEN
  725. FILE *popen(s,t) char *s,*t; {
  726. return(NULL);
  727. }
  728. #endif /* NOPOPEN */
  729. If you get complaints about NPROC having an invalid value, add a valid
  730. definition for it (depends on your system), as in the cray entry.
  731. If you get some symbol that's multiply defined, it probably means that
  732. a variable name used by Kermit is also used in one of your system
  733. libraries that Kermit is linked with. For example, under PC/IX some
  734. library has a variable or function called "data", and the variable
  735. "data" is also used extensively by Kermit. Rather than edit the Kermit
  736. source files, just put a -D in the make entry CFLAGS to change the
  737. Kermit symbol at compile time. In this example, it might be
  738. -Ddata=xdata.
  739. Some symbol is defined in your system's header files, but it produces
  740. conflicts with, or undesired results from, Kermit. Try undefining the
  741. symbol in the makefile target's CFLAGS, for example -UFIONREAD.
  742. Some well-known symbol is missing from your system header files. Try
  743. defining in the makefile target's CFLAGS, for example -DFREAD=1.
  744. You get many warnings about pointer mismatches. This probably means
  745. that Kermit is assuming an int type for signal() when it should be
  746. void, or vice-versa. Try adding -DSIG_I (for integer signal()) or
  747. -DSIG_V (for void) to CFLAGS. Or just include KFLAGS=-DSIG_V (or
  748. whatever) in your "make" command, for example:
  749. make bsd KFLAGS=-DSIG_V
  750. You get many messages about variables that are declared and/or set but
  751. never used. It is difficult to avoid these because of all the
  752. conditional compilation in the program. Ignore these messages.
  753. Some of C-Kermit's modules are so large, or contain so many character
  754. string constants, or are so offensive in some other way, that some C
  755. compilers give up and refuse to compile them. This is usually because
  756. the -O (optimize) option is included in the make entry. If this happens
  757. to you, you can (a) remove the -O option from the make entry, which
  758. will turn off the optimizer for ALL modules; or (b) compile the
  759. offending module(s) by hand, including all the switches from make entry
  760. except for -O, and then give the appropriate "make" command again; or
  761. (c) increase the value of the -Olimit option, if your compiler supports
  762. this option; or (d) change the [161]makefile target to first compile
  763. each offending module explicitly without optimization, then compile the
  764. others normally (with optimization), for example:
  765. #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd)
  766. ft21:
  767. @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
  768. $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
  769. -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
  770. $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
  771. -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
  772. $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
  773. -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
  774. $(MAKE) wermit "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
  775. -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short" \
  776. "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
  777. As an extreme example, some compilers (e.g. gcc on the DG AViiON) have
  778. been known to dump core when trying to compile ckwart.c with
  779. optimization. So just do this one "by hand":
  780. cc -o wart ckwart.c
  781. or:
  782. touch ckcpro.c
  783. and then give the "make" command again.
  784. Speaking of wart, it is unavoidable that some picky compilers might
  785. generate "statement unreachable" messages when compiling ckcpro.c.
  786. Unreachable statements can be generated by the wart program, which
  787. generates ckcpro.c automatically from [162]ckcpro.w, which translates
  788. lex-like state/input constructions into a big switch/case construction.
  789. Some function in Kermit wreaks havoc when it is called. Change all
  790. invocations of the function into a macro that evaluates to the
  791. appropriate return code that would have been returned by the function
  792. had it been called and failed, for example: -Dzkself()=0. Obviously not
  793. a good idea if the function is really needed.
  794. If you have just installed SunOS 4.1.2 or 4.1.3, you might find that
  795. C-Kermit (and any other C program) fails to link because of unresolved
  796. references from within libc. This is because of a mistake in Sun's
  797. /usr/lib/shlib.etc files for building the new libc. Change the libc
  798. Makefile so that the "ld" lines have "-ldl" at the end. Change the
  799. README file to say "mv xccs.multibyte. xccs.multibyte.o" and follow
  800. that instruction.
  801. 5. INSTALLING THE KERMIT FILES
  802. [ [163]Top ] [ [164]Contents ] [ [165]Next ] [ [166]Previous ]
  803. SECTION CONTENTS
  804. 5.1. [167]The C-Kermit Initialization File
  805. 5.2. [168]Text Files
  806. 5.3. [169]Installing the Kermit Files
  807. 5.4. [170]The Makefile Install Target
  808. The C-Kermit executable does not need any external files to run.
  809. Unlike, say, the cu program, which on most platforms is useless unless
  810. you (as root) edit the /usr/spool/uucp/Systems and
  811. /usr/spool/uucp/Devices files to supply whatever obscure and
  812. undocumented syntax is required to match some supposedly user-friendly
  813. mnemonic to the real pathname of whatever device you want to use,
  814. Kermit runs on its own without needing any external configuration
  815. files, and lets you refer to device (and network hosts and services) by
  816. their own natural undisguised names.
  817. Nevertheless, a number of external files can be installed along with
  818. the C-Kermit executable if you wish. These include configuration and
  819. customization files that are read by Kermit as well as documentation
  820. files to be read by people. All of this material is (a) optional, and
  821. (b) available on the Kermit website:
  822. [171]http://www.columbia.edu/kermit/
  823. and usually in a more pleasant form, perhaps also with updated content.
  824. So if your computer is on the Internet, there is no need to install
  825. anything but the Kermit executable if users know how to find the Kermit
  826. website (and if they don't, Kermit's "help" command tells them).
  827. 5.1. The C-Kermit Initialization File
  828. In C-Kermit 7.0 and earlier, the standard initialization file was a key
  829. C-Kermit component because:
  830. a. It "loaded" the dialing and network directories.
  831. b. It defined all the macros and variables for the services directory.
  832. c. It defined macros for quickly changing Kermit's file-transfer
  833. performance tuning.
  834. The standard initialization file is quite long (more than 600 lines)
  835. and requires noticeable processing time (the slower the computer, the
  836. more noticeable), yet few people actually use the services directory,
  837. whose definition takes up most of its bulk. Meanwhile, in C-Kermit 8.0,
  838. many of the remaining functions of the standard initialization file are
  839. now built in; for example, the FAST, CAUTIOUS, and ROBUST commands.
  840. More to the point, many of the settings that could be made only in the
  841. initialization and customization files can now be picked up from
  842. environment variables. The first group identifies initialization and
  843. directory files:
  844. CKERMIT_INI
  845. The path of your Kermit initialization file, if any. This
  846. overrides the built-in search for $HOME/.kermrc.
  847. K_CHARSET
  848. The character set used for encoding local text files. Equivalent
  849. to SET FILE CHARACTER-SET.
  850. K_DIAL_DIRECTORY
  851. The full pathname of one or more Kermit dialing directory files.
  852. Equivalent to SET DIAL DIRECTORY.
  853. K_NET_DIRECTORY
  854. The full pathname of one or more Kermit network directory files.
  855. Equivalent to SET NETWORK DIRECTORY.
  856. K_INFO_DIRECTORY
  857. K_INFO_DIR
  858. The full pathname of a directory containing Kermit (if any)
  859. containing ckubwr.txt and other Kermit text files. Overrides
  860. Kermit's built-in search for this directory.
  861. The next group is related to dialing modems:
  862. K_COUNTRYCODE
  863. The telephonic numeric country code for this location, e.g. 1
  864. for North America or 39 for Italy. It is recommended that this
  865. one be set for all users, system-wide. Not only is it used to
  866. process portable-format dialing directory entries, but it is
  867. also compared against Kermit's built-in list of "tone countries"
  868. to see if tone dialing can be used. Equivalent to Kermit's SET
  869. DIAL COUNTRY-CODE command.
  870. K_AREACODE
  871. The telephonic numeric area code for this location, e.g. 212 for
  872. Manhattan, New York, USA. Recommend this one also be set
  873. system-wide, so shared portable-format dialing directories will
  874. work automatically for everybody. Equivalent to Kermit's SET
  875. DIAL AREA-CODE command.
  876. K_DIAL_METHOD
  877. TONE or PULSE. Equivalent to Kermit's SET DIAL METHOD command.
  878. If a dial method is not set explicitly (or implicitly from the
  879. country code), Kermit does not specify a dialing method, and
  880. uses the modem's default method, which tends to be pulse.
  881. K_INTL_PREFIX
  882. The telephonic numeric international dialing prefix for this
  883. location. Equivalent to Kermit's SET DIAL INTL-PREFIX command.
  884. K_LD_PREFIX
  885. The telephonic numeric long-distance dialing prefix for this
  886. location. Equivalent to Kermit's SET DIAL LD-PREFIX command.
  887. K_PBX_ICP
  888. The telephonic numeric PBX internal call prefix for this
  889. location. Equivalent to Kermit's SET DIAL PBX-INSIDE-PREFIX
  890. command.
  891. K_PBX_OCP
  892. The telephonic numeric PBX external call prefix for this
  893. location. Equivalent to Kermit's SET DIAL PBX-OUTSIDE-PREFIX
  894. command.
  895. K_PBX_XCH
  896. The telephonic numeric PBX exchange (first part of the
  897. subscriber number). Equivalent to Kermit's SET DIAL PBX-EXCHANGE
  898. command.
  899. K_TF_AREACODE
  900. A list of one or more telephonic numeric toll-free area codes.
  901. K_TF_PREFIX
  902. The telephonic numeric toll-free dialing prefix, in case it is
  903. different from the long-distance prefix. Equivalent to Kermit's
  904. SET DIAL TF-PREFIX command.
  905. The final group includes well-known environment variables that are also
  906. used by Kermit:
  907. CDPATH
  908. Where the CD command should look for relative directory names.
  909. SHELL
  910. The path of your Unix shell. Used by the RUN (!) command to
  911. choose the shell to execute its arguments.
  912. USER
  913. Your Unix username.
  914. EDITOR
  915. The name or path of your preferred editor (used by the EDIT
  916. command). Equivalent to SET EDITOR.
  917. BROWSER
  918. The name or path of your preferred web browser (used by the
  919. BROWSE command). Equivalent to Kermit's SET BROWSER command.
  920. Does this mean the initialization file can be abolished? I think so.
  921. Here's why:
  922. * Kermit already does everything most people want it to do without
  923. one.
  924. * Important site-specific customizations can be done with global
  925. environment variables.
  926. * There is no longer any need for everybody to have to use the
  927. standard initialization file.
  928. * This means that your initialization file, if you want one, can
  929. contain your own personal settings, definitions, and preferences,
  930. rather than 600 lines of "standard" setups.
  931. * If you still want the services directory, you can either TAKE the
  932. standard initialization file (which must be named anything other
  933. than $HOME/.kermrc to avoid being executed automatically every time
  934. you start Kermit), or you can make it a kerbang script and execute
  935. it "directly" (the [172]makefile install target does this for you
  936. by putting ckermit.ini in the same directory as the Kermit binary,
  937. adding the appropriate Kerbang line to the top, and giving it
  938. execute permission).
  939. In fact, you can put any number of kerbang scripts in your PATH to
  940. start up C-Kermit in different ways, to have it adopt certain settings,
  941. make particular connections, execute complicated scripts, whatever you
  942. want.
  943. And in C-Kermit 9.0 the initialization has indeed been "retired" by
  944. renaming it to okermit.ini, and replaced by a stub ckermit.ini that
  945. doesn't do anything but print a message. Ditto for ckermod.ini.
  946. 5.2. Text Files
  947. These are entirely optional. Many of them are to be found at the Kermit
  948. website in HTML form (i.e. as Web pages with clickable links, etc), and
  949. very likely also more up to date. Plain-text files that correspond to
  950. Web pages were simply "dumped" by Lynx from the website to plain ASCII
  951. text. The format is whatever Lynx uses for this purpose. If you wish,
  952. you can install them on your computer as described in the [173]next
  953. section.
  954. [174]COPYING.TXT
  955. Copyright notice, permissions, and disclaimer.
  956. [175]ckermit.ini
  957. The standard initialization file, intended more for reference
  958. (in most cases) than actual use; see [176]Section 5.1.
  959. [177]ckermod.ini
  960. A sample customization file.
  961. [178]ckermit70.txt
  962. Supplement to [179]Using C-Kermit for version 7.0. Available on
  963. the Kermit website as:
  964. [180]http://www.columbia.edu/kermit/ckermit70.html
  965. [181]ckermit80.txt
  966. Supplement to [182]Using C-Kermit for version 8.0. Available on
  967. the Kermit website as:
  968. [183]http://www.columbia.edu/kermit/ckermit80.html
  969. [184]ckermit90.txt
  970. Supplement to [185]Using C-Kermit for version 9.0. Available on
  971. the Kermit website as:
  972. [186]http://www.columbia.edu/kermit/ckermit90.html
  973. [187]ckcbwr.txt
  974. The general C-Kermit hints and tips ("beware") file. Available
  975. on the Kermit website as:
  976. [188]http://www.columbia.edu/kermit/ckcbwr.html
  977. [189]ckubwr.txt
  978. The Unix-specific C-Kermit hints and tips file. Available on the
  979. Kermit website as:
  980. [190]http://www.columbia.edu/kermit/ckubwr.html
  981. [191]ckuins.txt
  982. Unix C-Kermit Installation Instructions (this file). Available
  983. on the Kermit website as:
  984. [192]http://www.columbia.edu/kermit/ckuins.html
  985. [193]ckccfg.txt
  986. C-Kermit compile-time configuration options. Available on the
  987. Kermit website as:
  988. [194]http://www.columbia.edu/kermit/ckccfg.html
  989. [195]ckcplm.txt
  990. The C-Kermit program logic manual. Available on the Kermit
  991. website as:
  992. [196]http://www.columbia.edu/kermit/ckcplm.html
  993. [197]ca_certs.pem
  994. Certificate Authority certificates for secure connections (see
  995. [198]Section 16).
  996. 5.3. Installing the Kermit Files
  997. There is an "install" target in the [199]makefile that you can use if
  998. you wish. However, since every site has its own layout and
  999. requirements, it is often better to install the Kermit files by hand.
  1000. You don't have to use the makefile install target to install C-Kermit.
  1001. This is especially true since not all sites build C-Kermit from source,
  1002. and therefore might not even have the makefile. But you should read
  1003. this section in any case.
  1004. If your computer already has an older version of C-Kermit installed,
  1005. you should rename it (e.g. to "kermit6" or "kermit7") so in case you
  1006. have any trouble with the new version, the old one is still
  1007. available.
  1008. In most cases, you need to be root to install C-Kermit, if only to gain
  1009. write access to directories in which the binary and manual page are to
  1010. be copied. The C-Kermit binary should be installed in a directory that
  1011. is in the users' PATH, but that is not likely to be overwritten when
  1012. you install a new version of the operating system. A good candidate
  1013. would be the /usr/local/bin/ directory, but the specific choice is site
  1014. dependent. Example (assuming the appropriate Kermit binary is stored in
  1015. your current directory as "wermit", e.g. because you just built it from
  1016. source and that's the name the makefile gave it):
  1017. mv wermit /usr/local/bin/kermit
  1018. chmod 755 /usr/local/bin/kermit
  1019. or (only after you finish reading this section!) simply:
  1020. make install
  1021. IMPORTANT: IF C-KERMIT IS TO BE USED FOR DIALING OUT, you must also do
  1022. something to give it access to the dialout devices and lockfile
  1023. directories. The 'install' target does not attempt to set Kermit's
  1024. owner, group, and permissions to allow dialing out. This requires
  1025. privileges, open eyes, and human decision-making. Please read
  1026. [200]Sections 10 and [201]11 below, make the necessary decisions, and
  1027. then implement them by hand as described in those sections.
  1028. You should also install the man page, which is called ckuker.nr, in the
  1029. man page directory for local commands, such as /usr/man/man1/, renamed
  1030. appropriately, e.g. to kermit.1. This is also taken care of by "make
  1031. install".
  1032. Optionally, the text files listed in the [202]previous section can be
  1033. placed in a publicly readable directory. Suggested directory names are:
  1034. /usr/local/doc/kermit/
  1035. /usr/local/lib/kermit/
  1036. /usr/share/lib/kermit/
  1037. /opt/kermit/doc/
  1038. (or any of these without the "/kermit"). Upon startup, C-Kermit checks
  1039. the following environment variables whose purpose is to specify the
  1040. directory where the C-Kermit text files are, in the following order:
  1041. K_INFO_DIRECTORY
  1042. K_INFO_DIR
  1043. If either of these is defined, C-Kermit checks for the existence of the
  1044. ckubwr.txt file (Unix C-Kermit Hints and Tips). If not found, it checks
  1045. the directories listed above (both with and without the "/kermit") plus
  1046. several others to see if they contain the ckubwr.txt file. If found,
  1047. various C-Kermit messages can refer the user to this directory.
  1048. Finally, if you want to put the source code files somewhere for people
  1049. to look at, you can do that too.
  1050. 5.4. The Makefile Install Target
  1051. The makefile "install" target does almost everything for you if you
  1052. give it the information it needs by setting the variables described
  1053. below. You can use this target if:
  1054. * You downloaded the [203]complete C-Kermit archive and built
  1055. C-Kermit from source; or:
  1056. * You downloaded an [204]individual C-Kermit binary and the
  1057. [205]C-Kermit text-file archive, and your computer has a "make"
  1058. command.
  1059. Here are the parameters you need to know:
  1060. BINARY
  1061. Name of the binary you want to install as "kermit". Default:
  1062. "wermit".
  1063. prefix
  1064. (lower case) If you define this variable, its value is prepended
  1065. to all the following xxxDIR variables (8.0.211 and later).
  1066. DESTDIR
  1067. If you want to install the Kermit files in a directory structure
  1068. like /opt/kermit/bin/, /opt/kermit/doc/, /opt/kermit/src/, then
  1069. define DESTIR as the root of this structure; for example,
  1070. /opt/kermit. The DESTDIR string should not end with a slash. By
  1071. default, DESTDIR is not defined. If it is defined, but the
  1072. directory does not exist, the makefile attempts to create it,
  1073. which might require you to be root. Even so, this can fail if
  1074. any segments in the path except the last one do not already
  1075. exist. WARNING: If the makefile creates any directories, it
  1076. gives them a mode of 755, and the default owner and group.
  1077. Modify these by hand if necessary.
  1078. BINDIR
  1079. Directory in which to install the Kermit binary (and the
  1080. standard C-Kermit initialization file, if it is found, as a
  1081. Kerbang script). If DESTDIR is defined, BINDIR must start with a
  1082. slash. BINDIR must not end with a slash. If DESTDIR is defined,
  1083. BINDIR is a subdirectory of DESTDIR. If BINDIR does not exist,
  1084. the makefile attempts to create it as with DESTDIR. Default:
  1085. /usr/local/bin.
  1086. MANDIR
  1087. Directory in which to install the C-Kermit manual page as
  1088. "kermit" followed by the manual-chapter extension (next item).
  1089. Default: /usr/man/man1. If MANDIR is defined, the directory must
  1090. already exist.
  1091. MANEXT
  1092. Extension for the manual page. Default: 1 (digit one).
  1093. SRCDIR
  1094. Directory in which to install the C-Kermit source code. If
  1095. DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
  1096. None.
  1097. CERTDIR
  1098. For secure builds only: Directory in which to install the
  1099. ca_certs.pem file. This must be the verification directory used
  1100. by programs that use the SSL libraries at your site. Default:
  1101. none. Possibilities include: /usr/local/ssl, /opt/ssl,
  1102. /usr/lib/ssl, . . . If CERTDIR is defined, the directory
  1103. must already exist.
  1104. INFODIR
  1105. Directory in which to install the C-Kermit text files. If
  1106. DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
  1107. None. If INFODIR is defined but does not exist, the makefile
  1108. attempts to create it, as with DESTDIR.
  1109. Examples:
  1110. make install
  1111. Installs "wermit" as /usr/local/bin/kermit with permissions 755,
  1112. the default owner and group, and no special privileges. The
  1113. manual page is installed as /usr/man/man1/kermit.1. Text files
  1114. are not copied anywhere, nor are the sources.
  1115. make MANDIR= install
  1116. Just like "make install" but does not attempt to install the
  1117. manual page.
  1118. make DESTDIR=/opt/kermit BINDIR=/bin SRCDIR=/src INFODIR=/doc install
  1119. Installs the Kermit binary "wermit" as /opt/kermit/bin/kermit,
  1120. puts the source code in /opt/kermit/src, and puts the text files
  1121. in /opt/kermit/doc, creating the directories if they don't
  1122. already exist, and puts the man page in the default location.
  1123. make BINDIR=/usr/local/bin CERTDIR=/usr/local/ssl install
  1124. Installs the Kerberized Kermit binary "wermit" as
  1125. /usr/local/bin/kermit, puts the CA Certificates file in
  1126. /usr/local/ssl/, and the man page in the normal place.
  1127. For definitive information, see the makefile. The following is
  1128. excerpted from the 8.0.211 makefile:
  1129. # The following symbols are used to specify library and header file locations
  1130. # Redefine them to the values used on your system by:
  1131. # . editing this file
  1132. # . defining the values on the command line
  1133. # . defining the values in the environment and use the -e option
  1134. #
  1135. prefix = /usr/local
  1136. srproot = $(prefix)
  1137. sslroot = $(prefix)
  1138. manroot = $(prefix)
  1139. K4LIB=-L/usr/kerberos/lib
  1140. K4INC=-I/usr/kerberos/include
  1141. K5LIB=-L/usr/kerberos/lib
  1142. K5INC=-I/usr/kerberos/include
  1143. SRPLIB=-L$(srproot)/lib
  1144. SRPINC=-I$(srproot)/include
  1145. SSLLIB=-L$(sslroot)/ssl/lib
  1146. SSLINC=-I$(sslroot)/ssl/include
  1147. ...
  1148. WERMIT = makewhat
  1149. BINARY = wermit
  1150. DESTDIR =
  1151. BINDIR = $(prefix)/bin
  1152. MANDIR = $(manroot)/man/man1
  1153. MANEXT = 1
  1154. SRCDIR =
  1155. INFODIR =
  1156. CERTDIR =
  1157. 6. INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
  1158. [ [206]Top ] [ [207]Contents ] [ [208]Next ] [ [209]Previous ]
  1159. This section is obsolete. We don't distribute C-Kermit on diskettes
  1160. any more because (a)there is no demand, and (b) it no longer fits.
  1161. If you received a DOS-format diskette containing a binary executable
  1162. C-Kermit program plus supporting text files, be sure to chmod +x the
  1163. executable before attempting to run it.
  1164. In version 5A(190) and later, all the text files on the C-Kermit
  1165. DOS-format diskettes are in Unix format: LF at the end of each line
  1166. rather than CRLF. This means that no conversions are necessary when
  1167. copying to your Unix file system, and that all the files on the
  1168. diskette, text and binary, can be copied together. The following
  1169. comments apply to the DOS-format diskettes furnished with version
  1170. 5A(189) and earlier or to other DOS-format diskettes you might have
  1171. obtained from other sources.
  1172. If you have received C-Kermit on MS-DOS format diskettes (such as those
  1173. distributed by Columbia University), you should make sure that your
  1174. DOS-to-Unix conversion utility (such as "dosread") both: (1) changes
  1175. line terminators in all files from carriage-return linefeed (CRLF) to
  1176. just linefeed (LF) (such as "dosread -a") and remove any Ctrl-Z's, and
  1177. (2) that all filenames are converted from uppercase to lowercase. If
  1178. these conversions were not done, you can use the following shell script
  1179. on your Unix system to do them:
  1180. ---(cut here)---
  1181. #!/bin/sh
  1182. #
  1183. # Shell script to convert C-Kermit DOS-format files into Unix format.
  1184. # Lowercases the filenames, strips out carriage returns and Ctrl-Z's.
  1185. #
  1186. x=$1 # the name of the source directory
  1187. y=$2 # the name of the target directory if [ $# -lt 2 ]; then
  1188. echo "usage: $0 source-directory target-directory"
  1189. exit 1
  1190. fi
  1191. if cd $1 ; then
  1192. echo "Converting files from $1 to $2"
  1193. else
  1194. echo "$0: cannot cd to $1"
  1195. exit 1
  1196. fi
  1197. for i in *; do
  1198. j=`echo $i | tr 'A-Z' 'a-z'`
  1199. echo $x/$i =\> $y/$j
  1200. tr -d '\015\032' < $i > $y/$j
  1201. done
  1202. ---(cut here)---
  1203. Cut out this shell script, save it as "convert.sh" (or any other name
  1204. you prefer), then "chmod +x convert.sh". Then, create a new, empty
  1205. directory to put the converted files in, and then "convert.sh /xxx
  1206. /yyy" where /xxx is the name of the directory where the PC-format files
  1207. are, and /yyy is the name of the new, empty directory. The converted
  1208. files will appear in the new directory.
  1209. 7. CHECKING THE RESULTS
  1210. [ [210]Top ] [ [211]Contents ] [ [212]Next ] [ [213]Previous ]
  1211. First some quick checks for problems that can be easily corrected by
  1212. recompiling with different options:
  1213. DIRECTORY listing is garbage
  1214. Permissions, size, and date are random garbage (but the
  1215. filenames are correct) in a C-Kermit DIRECTORY listing. On some
  1216. platforms, the lstat() function is present but simply doesn't
  1217. work; try adding -DNOLSTAT to CFLAGS and rebuild. If that
  1218. doesn't fix it, also add -DNOLINKBITS. If it's still not fixed,
  1219. remove -DNOLSTAT and -DNOLINKBITS and add -DNOSYMLINK.
  1220. curses
  1221. When you make a connection with C-Kermit and transfer files
  1222. using the fullscreen (curses) file-transfer display, and then
  1223. get the C-Kermit> prompt back afterwards, do characters echo
  1224. when you type them? If not, the curses library has altered the
  1225. buffering of /dev/tty. Try rebuilding with KFLAGS=-DCK_NEWTERM.
  1226. If it already has -DCK_NEWTERM in CFLAGS, try removing it. If
  1227. that doesn't help, then rebuild with -DNONOSETBUF (yes, two
  1228. NO's). If none of this works (and you can't fix the code), then
  1229. either don't use the fullscreen display, or rebuild with
  1230. -DNOCURSES.
  1231. Ctrl-L or any SCREEN command crashes C-Kermit:
  1232. Rebuild with -DNOTERMCAP.
  1233. No prompt after CONNECT:
  1234. After escaping back from CONNECT mode, does your C-Kermit>
  1235. prompt disappear? (Yet, typing "?" still produces a command
  1236. list, etc) In that case, add -DCKCONINTB4CB to CFLAGS and
  1237. rebuild.
  1238. Here is a more thorough checklist can use to tell whether your version
  1239. of C-Kermit was built correctly for your Unix system, with hints on how
  1240. to fix or work around problems:
  1241. a. Start C-Kermit (usually by typing "./wermit" in the directory where
  1242. you ran the makefile). Do you see the C-Kermit> prompt? If not,
  1243. C-Kermit incorrectly deduced that it was running in the background.
  1244. The test is in conbgt() in [214]ckutio.c. If you can fix it for
  1245. your system, please send in the fix (Hint: read about "PID_T"
  1246. below). Otherwise, you can force C-Kermit to foreground mode by
  1247. starting it with the -z command line option, as in "kermit -z", or
  1248. giving the interactive command SET BACKGROUND OFF.
  1249. b. When you type characters at the C-Kermit prompt, do they echo
  1250. immediately? If not, something is wrong with concb() and probably
  1251. the other terminal mode settings routines in [215]ckutio.c. Be sure
  1252. you have used the most appropriate make entry.
  1253. c. At the C-Kermit> prompt, type "send ./?". C-Kermit should list all
  1254. the files in the current directory. If not, it was built for the
  1255. wrong type of Unix file system. Details below. In the meantime, try
  1256. SET WILDCARD-EXPANSION SHELL as a workaround.
  1257. d. CD to a directory that contains a variety of files, symlinks, and
  1258. subdirectories and give a DIRECTORY command at the C-Kermit>
  1259. prompt. Do the permissions, size, and date appear correct? If not
  1260. see [216]Section 4.0.
  1261. e. Assuming your platform supports long file names, create a file with
  1262. a long name in your current directory, e.g.:
  1263. $ touch thisisafilewithaveryveryveryveryveryveryveryverylooooooooongname
  1264. (you might need to make it longer than this, perhaps as long as 257
  1265. or even 1025 characters).
  1266. Check with ls to see if your version of Unix truncated the name.
  1267. Now start C-Kermit and type "send thisis<ESC>". Does Kermit
  1268. complete the name, showing the same name as ls did? If not, wrong
  1269. filesystem. Read on.
  1270. f. Make sure that Kermit has the maximum path length right. Just type
  1271. SHOW FILE and see what it says about this. If it is too short,
  1272. there could be some problems at runtime. To correct, look in
  1273. [217]ckcdeb.h to see how the symbol CKMAXPATH is set and make any
  1274. needed adjustments.
  1275. g. Send a file to your new Kermit program from a different Kermit
  1276. program that is known to work. Is the date/timestamp of the new
  1277. file identical to the original? If not, adjustments are needed in
  1278. zstrdt() in [218]ckufio.c.
  1279. h. Go to another computer (Computer B) from which you can send files
  1280. to C-Kermit. Connect Computer B to the computer (A) where you are
  1281. testing C-Kermit. Then:
  1282. i. Send a file from B to A. Make sure it transferred OK and was
  1283. created with the right name.
  1284. j. Send a file from B to A, specifying an "as-name" that is very, very
  1285. long (longer than the maximum name length on computer A). Check to
  1286. make sure that the file was received OK and that its name was
  1287. truncated to Computer A's maximum length. If not, check the
  1288. MAXNAMLEN definition in [219]ckufio.c.
  1289. k. Tell C-Kermit on Computer A to "set receive pathnames relative" and
  1290. then send it a file from Computer B specifying an as-name that
  1291. contains several directory segments:
  1292. send foo dir1/dir2/dir3/foo
  1293. Check to make sure that dir1/dir2/dir3/foo was created in Computer
  1294. A's current directory (i.e. that three levels of directories were
  1295. created).
  1296. l. Repeat step k, but make each path segment in the pathname longer
  1297. than Computer A's maximum name length. Make sure each directory
  1298. name, and the final filename, were truncated properly.
  1299. m. Type Ctrl-C (or whatever your Unix interrupt character is) at the
  1300. prompt. Do you get "^C..." and a new prompt? If instead, you get a
  1301. core dump (this shouldn't happen any more) "rm core" and then
  1302. rebuild with -DNOCCTRAP added to your CFLAGS. If it did work, then
  1303. type another Ctrl-C. If this does the same thing as the first one,
  1304. then Ctrl-C handling is OK. Otherwise, the SIGINT signal is either
  1305. not getting re-armed (shouldn't happen) or is being masked off
  1306. after the first time it is caught, in which case, if your Unix is
  1307. POSIX-based, try rebuilding C-Kermit with -DCK_POSIX_SIG.
  1308. n. Type Ctrl-Z (or whatever your Unix suspend character is) to put
  1309. C-Kermit in the background. Did it work? If nothing happened, then
  1310. (a)your version of Unix does not support job control, or (b) your
  1311. version of C-Kermit was probably built with -DNOJC. If your session
  1312. became totally frozen, then you are probably running C-Kermit on a
  1313. Unix version that supports job control, but under a shell that
  1314. doesn't. If that's not the case, look in the congm() and psuspend()
  1315. routines in [220]ckutio.c and see if you can figure out what's
  1316. wrong. If you can't, rebuild with -DNOJC.
  1317. o. Give a SET LINE command for a dialout device, e.g. "set line
  1318. /dev/tty00". If you got some kind of permission or access denied
  1319. message, go read [221]Section 10 and then come back here.
  1320. p. After giving a successful SET LINE command, type "show comm" to see
  1321. the communication parameters. Do they make sense?
  1322. q. Type "set speed ?" and observe the list of available speeds. Is it
  1323. what you expected? If not, see [222]Section 2) of the
  1324. [223]Configurations Options document.
  1325. r. Give a SET SPEED command to change the device's speed. Did it work?
  1326. (Type "show comm" again to check.)
  1327. s. Try dialing out: SET MODEM TYPE , SET LINE , SET SPEED , DIAL . If
  1328. it doesn't work, keep reading. After dialing, can you REDIAL?
  1329. t. If your version was built with TCP/IP network support, try the
  1330. TELNET command.
  1331. u. Transfer some files in remote mode on incoming asynchronous serial
  1332. (direct or modem) connections, and on incoming network (telnet,
  1333. rlogin, terminal server) connections. If you get lots of errors,
  1334. try different SET FLOW settings on the remote Kermit program.
  1335. v. Establish a serial connection from C-Kermit to another computer
  1336. (direct or dialed) and transfer some files. If you have network
  1337. support, do the same with a network connection.
  1338. w. If your version was built with fullscreen file transfer display
  1339. support, check that it works during local-mode file transfer. Also,
  1340. check C-Kermit's operation afterwards: is the echoing funny? etc
  1341. etc. If there are problems, see [224]Section 4.
  1342. x. If your version was built with script programming language support,
  1343. TAKE the ckedemo.ksc file to give it a workout.
  1344. y. Does C-Kermit interlock correctly with UUCP-family programs (cu,
  1345. tip, uucp, etc)? If not, read the section [225]DIALING OUT AND
  1346. COORDINATING WITH UUCP below.
  1347. z. Modem signals... Give a SET LINE command to a serial device and
  1348. then type the SHOW MODEM command. If it says "Modem signals
  1349. unavailable in this version of Kermit", then you might want to look
  1350. at the ttgmdm() routine in [226]ckutio.c and add the needed code --
  1351. if indeed your version of Unix provides a way to get modem signals
  1352. (some don't; e.g. modem signals are a foreign concept to POSIX,
  1353. requiring politically incorrect workarounds).
  1354. aa. If it says "Modem signals unavailable", then it is likely that the
  1355. API for getting modem signals is provided, but it doesn't actually
  1356. do anything (e.g. ioctl(ttyfd,TIOCMGET,&x) returns EINVAL).
  1357. ab. In any case, it still should be able to manipulate the DTR signal.
  1358. To test, SET LINE , SET MODEM NONE, and HANGUP. The DTR light
  1359. should go out momentarily. If it doesn't, see if you can add the
  1360. needed code for your system to the tthang() routine in
  1361. [227]ckutio.c.
  1362. ac. If your version of Kermit has the SET FLOW RTS/CTS command, check
  1363. to see if it works: give Kermit this command, set your modem for
  1364. RTS/CTS, transfer some files (using big packet and window sizes)
  1365. and watch the RTS and CTS lights on the modem. If they go on and
  1366. off (and Kermit does not get packet errors), then it works. If your
  1367. version of Kermit does not have this command, but your version of
  1368. Unix does support hardware flow control, take a look at the
  1369. tthflow() command in [228]ckutio.c and see if you can add the
  1370. needed code (see the section on [229]HARDWARE FLOW CONTROL below).
  1371. (And please [230]send back any added code, so that others can
  1372. benefit from it and it can be carried forward into future
  1373. releases.)
  1374. ad. If C-Kermit starts normally and issues its prompt, echoing is
  1375. normal, etc, but then after returning from a CONNECT session, the
  1376. prompt no longer appears, try rebuilding with -DCKCONINTB4CB.
  1377. ae. (8.0.206 or later) Type some commands at the C-Kermit prompt. Can
  1378. you use the Up-arrow and Down-arrow keys on your keyboard to access
  1379. Kermit's command history? If not, and you're a programmer, take a
  1380. look at the USE_ARROWKEYS sections of ckucmd.c.
  1381. 8. REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
  1382. [ [231]Top ] [ [232]Contents ] [ [233]Next ] [ [234]Previous ]
  1383. Also see: [235]C-Kermit Configuration Options
  1384. a. Many of C-Kermit's options and features can be deselected at
  1385. compile time. The greatest savings at the least sacrifice in
  1386. functionality is to disable the logging of debug information by
  1387. defining NODEBUG during compilation. See the [236]Configurations
  1388. Options document for further information.
  1389. b. Use shared libraries rather than static linking. This is the
  1390. default on many Unix systems anyway. However, executables built for
  1391. dynamic linking with shared libraries are generally not portable
  1392. away from the machine they were built on, so this is recommended if
  1393. the binary is for your use only.
  1394. c. Most Unix systems have a "strip" command to remove symbol table
  1395. information from an executable program image. "man strip" for
  1396. further information. The same effect can be achieved by including
  1397. "-s" among the link flags when building C-Kermit.
  1398. d. SCO, Interactive, and some other Unix versions have an "mcs"
  1399. command. "mcs -d wermit" can be used to delete the contents of the
  1400. ".comment" section from the executable program image.
  1401. e. Many modern optimizers can be instructed to optimize for space
  1402. rather than execution efficiency. Check the CFLAGS in the makefile
  1403. target, adjust as desired.
  1404. 9. UNIX VERSIONS
  1405. [ [237]Top ] [ [238]Contents ] [ [239]Next ] [ [240]Previous ]
  1406. SECTION CONTENTS
  1407. 9.1 [241]Standards
  1408. 9.1.1. [242]POSIX
  1409. 9.1.2. [243]ANSI C
  1410. 9.1.3. [244]Other Standards
  1411. 9.2. [245]Library Issues
  1412. 9.3. [246]Unix File System Peculiarities
  1413. 9.4. [247]Hardware Flow Control
  1414. 9.5. [248]Terminal Speeds
  1415. 9.6. [249]Millisecond Sleeps
  1416. 9.7. [250]Nondestructive Input Buffer Peeking
  1417. 9.8. [251]Other System-Dependent Features
  1418. 9.9. [252]Terminal Interruption
  1419. There are several major varieties of Unix: Bell Laboratories Seventh
  1420. Edition, AT&T System V, Berkeley Standard Distribution (BSD), and
  1421. POSIX. Each has many, many subvarieties and descendents, and there are
  1422. also hybrids that exhibit symptoms of two or more varieties, plus
  1423. special quirks of their own.
  1424. Seventh edition versions of C-Kermit include the compile-time option
  1425. -DV7 in the CFLAGS string in the makefile target. Various V7-based
  1426. implementations are also supported: -DCOHERENT, -DMINIX, etc.
  1427. AT&T-based versions of Unix Kermit include the compile-time option
  1428. -DATTSV (standing for AT&mp;T Unix System V). This applies to System
  1429. III and to System V up to and including Release 2. For System V Release
  1430. 3, the flag -DSVR3 should be used instead (which also implies -DATTSV).
  1431. This is because the data type of signal() and several other functions
  1432. was changed between SVR2 and SVR3. For System V Release 4, include
  1433. -DSVR4 because of changes in UUCP lockfile conventions; this also
  1434. implies -DSVR3 and -DATTSV.
  1435. For BSD, the flag -BSDxx must be included, where xx is the BSD version
  1436. number, for example BSD4 (for version 4.2 or later, using only 4.2
  1437. features), -DBSD41 (for BSD 4.1 only), -DBSD43 (for 4.3), -DBSD29 (BSD
  1438. 2.9 for DEC PDP-11s). -DBSD44 is for 4.4BSD, which is the basis of
  1439. FreeBSD, NetBSD, OpenBSD, BSDI, and Mac OS X, and which contains many
  1440. POSIX features, and has little relation to 4.3BSD and earlier.
  1441. For POSIX, include the flag -DPOSIX. POSIX defines a whole new set of
  1442. terminal i/o functions that are not found in traditional AT&T or
  1443. Berkeley implementations, and also defines the symbol _POSIX_SOURCE,
  1444. which is used in many system and library header files, mainly to
  1445. disable non-POSIX (i.e. useful) features.
  1446. Note (circa 1997): In order to enable serial speeds higher than 38400
  1447. bps, it is generally necessary to add -DPOSIX (among other things),
  1448. since the older terminal APIs can not accommodate the new speeds -- out
  1449. o' bits. But this often also means wholesale conversion to POSIX APIs.
  1450. In general, just try adding -DPOSIX and then see what goes wrong. Be
  1451. wary of features disappearing: when _POSIX_SOURCE is defined, all sorts
  1452. of things that were perfectly OK before suddenly become politically
  1453. incorrect -- like reading modem signals, doing hardware flow control,
  1454. etc. POSIX was evidently not designed with serial communication in
  1455. mind!
  1456. Case in point: In UnixWare 7.0, #define'ing POSIX causes strictness
  1457. clauses in the header files to take effect. These prevent <sys/time.h>
  1458. from defining the timeval and timezone structs, which are needed for
  1459. all sorts of things (like select()). Thus, if we want the high serial
  1460. speeds, we have to circumvent the POSIX clauses.
  1461. Similarly in SCO OpenServer R5.0.4 where, again, we must use the POSIX
  1462. APIs to get at serial speeds higher than 38400, but then doing so
  1463. removes hardware flow control -- just when we need it most! In cases
  1464. like this, dirty tricks are the only recourse (search for SCO_OSR504 in
  1465. [253]ckutio.c for examples).
  1466. For reasons like this, Unix implementations tend to be neither pure
  1467. AT&T nor pure BSD nor pure POSIX, but a mixture of two or more of
  1468. these, with "compatibility features" allowing different varieties of
  1469. programs to be built on the same computer. In general, Kermit tries not
  1470. to mix and match but to keep a consistent repertoire throughout.
  1471. However, there are certain Unix implementations that only work when you
  1472. mix and match. For example, the Silicon Graphics IRIX operating system
  1473. (prior to version 3.3) is an AT&T Unix but with a BSD file system. The
  1474. only way you can build Kermit successfully for this configuration is to
  1475. include -DSVR3 plus the special option -DLONGFN, meaning "pretend I was
  1476. built with -DBSDxx when it's time to compile file-related code". See
  1477. the "iris" makefile target.
  1478. 9.1. Standards
  1479. [ [254]Top ] [ [255]Section Contents ] [ [256]Contents ] [ [257]Next ]
  1480. SUBSECTION CONTENTS
  1481. 9.1.1. [258]POSIX
  1482. 9.1.2. [259]ANSI C
  1483. 9.1.3. [260]Other Standards
  1484. In edits 166-167 (1988-89), C-Kermit was heavily modified to try to
  1485. keep abreast of new standards while still remaining compatible with old
  1486. versions of C and Unix. There are two new standards of interest: ANSI C
  1487. (as described in Kernighan and Ritchie, "The C Programming Language",
  1488. Second Edition, Prentice Hall, 1988) and POSIX.1 (IEEE Standard 1003.1
  1489. and ISO/IEC 9945-1, 1990, "Portable Operating System Interface"). These
  1490. two standards have nothing to do with each other: you can build
  1491. C-Kermit with a non-ANSI compiler for a POSIX system, or for a
  1492. non-POSIX system with with an ANSI compiler.
  1493. 9.1.1. POSIX
  1494. POSIX.1 defines a repertoire of system functions and header files for
  1495. use by C language programs. Most notably, the ioctl() function is not
  1496. allowed in POSIX; all ioctl() functions have been replaced by
  1497. device-specific functions like tcsetattr(), tcsendbreak(), etc.
  1498. Computer systems that claim some degree of POSIX compliance have made
  1499. some attempt to put their header files in the right places and give
  1500. them the right names, and to provide system library functions with the
  1501. right names and calling conventions. Within the header files,
  1502. POSIX-compliant functions are supposed to be within #ifdef
  1503. _POSIX_SOURCE..#endif conditionals, and non-POSIX items are not within
  1504. these conditionals.
  1505. If Kermit is built with neither -D_POSIX_SOURCE nor -DPOSIX, the
  1506. functions and header files of the selected version of Unix (or VMS,
  1507. etc) are used according to the CFLAGS Kermit was built with.
  1508. If Kermit is built with -D_POSIX_SOURCE but not -DPOSIX, then one of
  1509. the -DBSD or -DATTSV flags (or one that implies them) must also be
  1510. defined, but it still uses only the POSIX features in the system header
  1511. files. This allows C-Kermit to be built on BSD or AT&T systems that
  1512. have some degree of POSIX compliance, but still use BSD or AT&T
  1513. specific features.
  1514. The dilemma is this: it is often necessary to define _POSIX_SOURCE to
  1515. get at new or modern features, such as high serial speeds and the APIs
  1516. to deal with them. But defining _POSIX_SOURCE also hides other APIs
  1517. that Kermit needs, for example the ones dealing with modem signals
  1518. (others are listed just below). Thus all sorts of hideous contortions
  1519. are often required to get a full set of features.
  1520. The POSIX standard does not define anything about uucp lockfiles. "make
  1521. posix" uses NO (repeat, NO) lockfile conventions. If your
  1522. POSIX-compliant Unix version uses a lockfile convention such as HDBUUCP
  1523. (see below), use the "posix" entry, but include the appropriate
  1524. lockfile option in your KFLAGS on the "make" command line, for example:
  1525. make posix "KFLAGS=-DHDBUUCP"
  1526. POSIX.1 also lacks certain other features that Kermit needs. For
  1527. example:
  1528. * There is no defined way for an application to do wildcard matching
  1529. of filenames. Kermit uses the inode in the directory structure, but
  1530. POSIX.1 does not include this concept. (Later POSIX revisions
  1531. include functions named (I think) glob() and fnmatch(), but these
  1532. functions are not yet in Kermit, and might not be appropriate in
  1533. any case.)
  1534. * There is no POSIX mechanism for sensing or controlling modem
  1535. signals, nor to enable RTS/CTS or other hardware flow control.
  1536. * There is no select() for multiplexing i/o, and therefore no TCP/IP.
  1537. * There is no way to check if characters are waiting in a
  1538. communications device (or console) input buffer, short of trying to
  1539. read them -- no select(), ioctl(fd,FIONREAD,blah), rdchk(), etc.
  1540. This is bad for CONNECT mode and bad for sliding windows.
  1541. * No way to do a millisecond sleep (no nap(), usleep(), select(),
  1542. etc).
  1543. * There is no popen().
  1544. So at this point, there cannot be one single fully functional POSIX
  1545. form of C-Kermit unless it also has "extensions", as do Linux, QNX,
  1546. etc.
  1547. More on POSIX (quoting from a newsgroup posting by Dave Butenhof):
  1548. Standards tend to look at themselves as "enabling". So POSIX
  1549. standards say that, in order to use POSIX functions, a program must
  1550. define some macro that will put the development environment in
  1551. "POSIX mode". For the ancient POSIX 1003.1-1990, the symbol is
  1552. _POSIX_SOURCE. For recent revisions, it's _POSIX_C_SOURCE with an
  1553. appropriate value. POSIX 1003.1-1996 says that, to use its features
  1554. in a portable manner, you must define _POSIX_C_SOURCE=199506L before
  1555. including any header files.
  1556. But for Solaris, or Digital Unix, the picture is different. POSIX is
  1557. one important but small part of the universe. Yet POSIX
  1558. unconditionally and unambiguously REQUIRES that, when
  1559. _POSIX_C_SOURCE=199506L, ALL of the functions and definitions
  1560. required by the standard, and NO others (except in specific
  1561. restricted namespaces, specifically "_" followed by an uppercase
  1562. letter or "__" followed by a lowercase letter) shall be visible.
  1563. That kinda puts a cramp on BSD and SVID support, because those
  1564. require names that are not in the "protected" POSIX namespaces. It's
  1565. ILLEGAL to make those symbols visible, unless you've done something
  1566. else that's beyond the scope of POSIX to allow the system to infer
  1567. that you didn't really mean it.
  1568. In most cases, you should just compile, with no standards-related
  1569. macros defined. The system will make available every interface and
  1570. definition that isn't incompatible with the "main stream". There may
  1571. indeed be cases where two standards cross, and you really can't use
  1572. both together. But, in general, they play nicely together as long as
  1573. you don't do anything rash -- like telling the system that it's not
  1574. allowed to let them.
  1575. In the area of threads, both Solaris and Digital Unix support
  1576. incompatible thread APIs. We have POSIX and DCE, they have POSIX and
  1577. UI. The nasty areas are in the _r routines and in some aspects of
  1578. signal behavior. You cannot compile a single source file that uses
  1579. both semantics. That's life. It sounds as if Solaris defaults to the
  1580. UI variants, but allows you to define this _POSIX_THREAD_SEMANTICS
  1581. to get around it. We default to POSIX, and allow you to define
  1582. _PTHREAD_USE_D4 (automatically defined by the cc "-threads" switch)
  1583. to select the DCE thread variants. That default, because you're
  1584. operating outside of any individual standard, is really just a
  1585. marketing decision.
  1586. 9.1.2. ANSI C
  1587. [ [261]Top ] [ [262]Contents ] [ [263]Section Contents ] [
  1588. [264]Subsection Contents ] [ [265]Next ] [ [266]Previous ]
  1589. The major difference between ANSI C and earlier C compilers is function
  1590. prototyping. ANSI C allows function arguments to be checked for type
  1591. agreement, and (when possible) type coercion in the event of a
  1592. mismatch. For this to work, functions and their arguments must be
  1593. declared before they are called. The form for function declarations is
  1594. different in ANSI C and non-ANSI C (ANSI C also accepts the earlier
  1595. form, but then does not do type checking).
  1596. As of edit 167, C-Kermit tries to take full advantage of ANSI C
  1597. features, especially function prototyping. This removes many bugs
  1598. introduced by differing data types used or returned by the same
  1599. functions on different computers. ANSI C features are automatically
  1600. enabled when the symbol __STDC__ is defined. Most ANSI C compilers,
  1601. such as GNU CC and the new DEC C compiler define this symbol
  1602. internally.
  1603. On the downside, ANSI C compilation increases the
  1604. administrative/bureaucratic burden, spewing out countless unneeded
  1605. warnings about mismatched types, especially when we are dealing with
  1606. signed and unsigned characters, requiring casts everywhere to shut up
  1607. the mindless complaints -- there is no use for signed chars in Kermit
  1608. (or probably anywhere else). Some compilers, mercifully, include a
  1609. "treat all chars as unsigned" option, and when available it should be
  1610. used -- not only to stop the warnings, but also to avoid unhelpful sign
  1611. extension on high-bit characters.
  1612. To force use of ANSI C prototypes, include -DCK_ANSIC on the cc command
  1613. line. To disable the use of ANSI prototypes, include -DNOANSI.
  1614. 9.1.3. Other Standards
  1615. [ [267]Top ] [ [268]Contents ] [ [269]Section Contents ] [
  1616. [270]Subsection Contents ] [ [271]Next ] [ [272]Previous ]
  1617. As the years go by, standards with-which-all-must-comply continue to
  1618. pile up: AES, XPG2, XPG3, XPG4, FIPS 151-2, successive generations of
  1619. POSIX, OSF/1, X/Open, Spec 1170, UNIX95, Open Group UNIX98, ISO/IEC
  1620. 9945 parts 1-4, ISO 9899, 88Open, OS 99, Single Unix Specification
  1621. (SUS, [273]IEEE 1003.1-2001, not to mention "mature standards" like V7,
  1622. 4.2/4.3BSD, System V R3 and R4 (SVID2 and SVID3), 4.4BSD (the basis for
  1623. BSDI, OpenBSD, NetBSD, FreeBSD, Mac OS X etc), /usr/group, plus
  1624. assorted seismic pronouncements of the neverending series of ephemeral
  1625. corporate consortia, not to mention the libc-vs-glibc turmoil in the
  1626. Linux arena and who knows what else.
  1627. None of these standards simplifies life for portable applications like
  1628. C-Kermit -- each one is simply one more environment to support (or
  1629. circumvent, as in many cases these standards do more harm than good by
  1630. denying access to facilities we need, e.g. as noted in above in
  1631. [274]9.1.1).
  1632. 9.2. Library Issues
  1633. [ [275]Top ] [ [276]Contents ] [ [277]Section Contents ] [
  1634. [278]Subsection Contents ] [ [279]Next ] [ [280]Previous ]
  1635. On most modern platforms, applications are -- and often must be --
  1636. dynamically linked. This has numerous advantages (smaller executables,
  1637. ability to patch a library and thereby patch all applications that use
  1638. it, etc), but also causes some headaches: most commonly, the library ID
  1639. built into the executable at link time does not match the ID of the
  1640. corresponding library on the target system, and so the loader refuses
  1641. to let the application run.
  1642. This problem only gets worse over time. In the Linux and *BSD world, we
  1643. also have totally different libraries (each with their own names and
  1644. numbering systems) that cover the same territory; for example, curses
  1645. vs ncurses, libc versus glibc. Combinations proliferate and any given
  1646. Unix computer might have any combination. For this reason it is
  1647. becoming increasingly difficult to produce a "Linux binary" for a given
  1648. architecture (e.g. PC or Alpha). There has to be a separate binary for
  1649. (at least) every combination of curses vs ncurses and libc vs glibc.
  1650. In such cases, the best advice is for every user to build C-Kermit from
  1651. source code on the system where it will run. Too bad most commercial
  1652. Unix vendors have stopped including C compilers with the operating
  1653. system!
  1654. 9.3. Unix File System Peculiarities
  1655. [ [281]Top ] [ [282]Contents ] [ [283]Section Contents ] [ [284]Next ]
  1656. [ [285]Previous ]
  1657. Normally, including a BSD, System-V, POSIX, or DIRENT flag in the make
  1658. entry selects the right file system code. But some versions of Unix are
  1659. inconsistent in this regard, and building in the normal way either
  1660. gives compiler or linker errors, or results in problems at runtime,
  1661. typically failure to properly expand wildcard file specifications when
  1662. you do something like "send *.*", or failure to recognize long
  1663. filenames, as in "send filewithaveryveryveryveryverylongname".
  1664. C-Kermit is supposed to know about all the various styles of Unix file
  1665. systems, but it has to be told which one to use when you build it,
  1666. usually in the makefile target CFLAGS as shown below, but you might
  1667. also have to add something like -I/usr/include/bsd to CFLAGS, or
  1668. something like -lbsd to LIBS.
  1669. C-Kermit gives you the following CFLAGS switches to adapt to your file
  1670. system's peculiarities:
  1671. -DDIRENT - #include <dirent.h>
  1672. -DSDIRENT - #include <sys/dirent.h>
  1673. -DNDIR - #include <ndir.h>
  1674. -DXNDIR - #include <sys/ndir.h>
  1675. -DRTU - #include "/usr/lib/ndir.h", only if NDIR and XNDIR not defined.
  1676. -DSYSUTIMH - #include <sys/utime.h> for setting file creation dates.
  1677. -DUTIMEH - #include <utime.h> for setting file creation dates.
  1678. (Note, RTU should only be used for Masscomp RTU systems, because it
  1679. also selects certain other RTU-specific features.)
  1680. If none of these is defined, then <sys/dir.h> is used. IMPORTANT: If
  1681. your system has the file /usr/include/dirent.h then be sure to add
  1682. -DDIRENT to your makefile target's CFLAGS. "dirent" should be used in
  1683. preference to any of the others, because it supports all the features
  1684. of your file system, and the others probably don't.
  1685. Having selected the appropriate directory header file, you might also
  1686. need to tell Kermit how to declare the routines and variables it needs
  1687. to read the directory. This happens most commonly on AT&T System-V
  1688. based UNIXes, particularly System V R3 and earlier, that provide long
  1689. file and directory names (longer than 14 characters). Examples include
  1690. certain releases of HP-UX, DIAB DNIX, older versions of Silicon
  1691. Graphics IRIX, and perhaps also MIPS. In this case, try adding -DLONGFN
  1692. to your makefile target.
  1693. Another problem child is <sys/file.h>. Most Unix C-Kermit versions need
  1694. to #include this file from within [286]ckufio.c and [287]ckutio.c, but
  1695. some not only do not need to include it, but MUST not include it
  1696. because (a) it doesn't exist, or (b) it has already been included by
  1697. some other header file and it doesn't protect itself against multiple
  1698. inclusion, or (c) some other reason that prevents successful
  1699. compilation. If you have compilation problems that seem to stem from
  1700. including this file, then add the following switch to CFLAGS in your
  1701. makefile target:
  1702. -DNOFILEH
  1703. There are a few odd cases where <sys/file.h> must be included in one of
  1704. the cku[ft]io.c files, but not the other. In that case, add the
  1705. aforementioned switch, but go into the file that needs <sys/file.h> and
  1706. add something like this:
  1707. #ifdef XXX /* (where XXX is a symbol unique to your system) */
  1708. #undef NOFILEH
  1709. #endif /* XXX */
  1710. before the section that includes <sys/file.h>.
  1711. Kermit's SEND command expands wildcard characters "?" and "*" itself.
  1712. Before version 5A, commands like "send *" would send all regular
  1713. (non-directory) files, including "hidden files" (whose names start with
  1714. "."). In version 5A, the default behavior is to match like the Bourne
  1715. shell or the ls command, and not include files whose names start with
  1716. dot. Such files can still be sent if the dot is included explicitly in
  1717. the SEND command: "send .oofa, send .*". To change back to the old way
  1718. and let leading wildcard characters match dot files, include the
  1719. following in your CFLAGS:
  1720. -DMATCHDOT
  1721. (In C-Kermit 6.0, there is also a command to control this at runtime.)
  1722. Complaints about data-type mismatches:
  1723. * If you get compile-time complaints about data type mismatches for
  1724. process-ID related functions like getpid(), add -DPID_T=pid_t.
  1725. * If you get compile-time complaints about data type mismatches for
  1726. user ID related functions like getuid(), add -DUID_T=uid_t.
  1727. * If you get compile-time complaints about data type mismatches for
  1728. user-ID related functions like getgid(), add -DGID_T=gid_t.
  1729. * If you get compile-time complaints about data type mismatches for
  1730. getpwuid(), add -DPWID_T=uid_t (or whatever it should be).
  1731. File creation dates: C-Kermit attempts to set the creation date/time of
  1732. an incoming file according to the date/time given in the file's
  1733. attribute packet, if any. If you find that the dates are set
  1734. incorrectly, you might need to build Kermit with the -DSYSUTIMEH flag,
  1735. to tell it to include <sys/utime.h>. If that doesn't help, look at the
  1736. code in zstrdt() in [288]ckufio.c.
  1737. 9.4. Hardware Flow Control
  1738. [ [289]Top ] [ [290]Contents ] [ [291]Section Contents ] [ [292]Next ]
  1739. [ [293]Previous ]
  1740. Hardware flow control is a problematic concept in many popular Unix
  1741. implementations. Often it is lacking altogether, and when available,
  1742. the application program interface (API) to it is inconsistent from
  1743. system to system. Here are some examples:
  1744. a. POSIX does not support hardware flow control.
  1745. b. RTS/CTS flow control support MIGHT be available for System V R3 and
  1746. later if /usr/include/termiox.h exists (its successful operation
  1747. also depends on the device driver, and the device itself, not to
  1748. mention the [294]cable, etc, actually supporting it). If your
  1749. SVR3-or-later Unix system does have this file, add:
  1750. -DTERMIOX
  1751. to your CFLAGS. If the file is in /usr/include/sys instead, add:
  1752. -DSTERMIOX
  1753. Note that the presence of this file does not guarantee that RTS/CTS
  1754. will actually work -- that depends on the device-driver
  1755. implementation (reportedly, many Unix versions treat
  1756. hardware-flow-control related ioctl's as no-ops).
  1757. c. Search ("grep -i") through /usr/include/*.h and
  1758. /usr/include/sys/*.h for RTS or CTS and see what turns up. For
  1759. example, in SunOS 4.x we find "CRTSCTS". Figuring out how to use it
  1760. is another question entirely! In IBM AIX RS/6000 3.x, we have to
  1761. "add" a new "line discipline" (and you won't find uppercase RTS or
  1762. CTS symbols in the header files).
  1763. d. NeXTSTEP and IRIX, and possibly others, support hardware flow
  1764. control, but do not furnish an API to control it, and thus on these
  1765. systems Kermit has no command to select it -- instead, a special
  1766. device name must be used. (NeXTSTEP: /dev/cufa instead of /dev/cua;
  1767. IRIX: /dev/ttyf00)
  1768. See the routine tthflow() in [295]ckutio.c for details. If you find
  1769. that your system offers hardware flow control selection under program
  1770. control, you can add this capability to C-Kermit as follows:
  1771. a. See if it agrees with one of the methods already used in tthflow().
  1772. if not, add new code, appropriately #ifdef'd.
  1773. b. Add -DCK_RTSCTS to the compiler CFLAGS in your makefile target or
  1774. define this symbol within the appropriate #ifdefs in [296]ckcdeb.h.
  1775. To illustrate the difficulties with RTS/CTS, here is a tale from Jamie
  1776. Watson <jw@adasoft.ch>, who added the RTS/CTS code for the RS/6000,
  1777. about his attempts to do the same for DEC ULTRIX:
  1778. "The number and type of hardware signals available to/from a serial
  1779. port vary between different machines and different types of serial
  1780. interfaces on each machine. This means that, for example, there are
  1781. virtually no hardware signals in or out available on the DECsystem
  1782. 3000/3100 series; on the DECsystem 5000/2xx series all modem signals
  1783. in/out are present on both built-in serial ports; on the DECsystem
  1784. 5100 some ports have all signals and some only have some; and so
  1785. on... It looks to me as if this pretty well rules out any attempt to
  1786. use hardware flow control on these platforms, even if we could
  1787. figure out how to do it. The confusion on the user level about
  1788. whether or not it should work for any given platform or port would
  1789. be tremendous. And then it isn't clear how to use the hardware
  1790. signals even in the cases where the device supports them."
  1791. 9.5. Terminal Speeds
  1792. [ [297]Top ] [ [298]Contents ] [ [299]Section Contents ] [ [300]Next ]
  1793. [ [301]Previous ]
  1794. The allowable speeds for the SET SPEED command are defined in
  1795. [302]ckcdeb.h. If your system supports speeds that are not listed in
  1796. "set speed ?", you can add definitions for them to ckcdeb.h.
  1797. Then if the speed you are adding is one that was never used before in
  1798. Kermit, such as 921600, you'll also need to add the appropriate
  1799. keywords to spdtab[] in [303]ckuus3.c, and the corresponding case to
  1800. ttsspd() in [304]ckutio.c.
  1801. 9.6. Millisecond Sleeps
  1802. [ [305]Top ] [ [306]Contents ] [ [307]Section Contents ] [ [308]Next ]
  1803. [ [309]Previous ]
  1804. There is no standard for millisecond sleeps, but at least five
  1805. different functions have appeared in various Unix versions that can be
  1806. used for this purpose: nap() (mostly in System V), usleep() (found at
  1807. least in SunOS and NeXT OS), select() (found in 4.2BSD and later, and
  1808. part of any TCP/IP sockets library), nanosleep(), and sginap(). If you
  1809. have any of these available, pick one (in this order of preference, if
  1810. you have more than one):
  1811. -DSELECT: Include this in CFLAGS if your system has the select() function.
  1812. -DNAP: Include this in CFLAGS if your system has the nap() function.
  1813. -USLEEP: Include this in CFLAGS if your system has the usleep() function.
  1814. NOTE: The nap() function is assumed to be a function that puts the
  1815. process to sleep for the given number of milliseconds. If your system's
  1816. nap() function does something else or uses some other units of time
  1817. (like the NCR Tower 32, which uses clock-ticks), do not include -DNAP.
  1818. Reportedly, all versions of System V R4 for Intel-based computers, and
  1819. possibly also SVR3.2, include nap() as a kernel call, but it's not in
  1820. the library. To include code to use it via syscall(3112,x), without
  1821. having to include Xenix compatibility features, include the following
  1822. compile-time option:
  1823. -DNAPHACK
  1824. 9.7. Nondestructive Input Buffer Peeking
  1825. [ [310]Top ] [ [311]Contents ] [ [312]Section Contents ] [ [313]Next ]
  1826. [ [314]Previous ]
  1827. Some AT&T Unix versions have no way to check if input is waiting on a
  1828. tty device, but this is a very important feature for Kermit. Without
  1829. it, sliding windows might not work very well (or at all), and you also
  1830. have to type your escape character to get Kermit's attention in order
  1831. to interrupt a local-mode file transfer. If your system offers an
  1832. FIONREAD ioctl, the build procedure should pick that up automatically
  1833. and use it, which is ideal.
  1834. If your system lacks FIONREAD but has a select() function, this can be
  1835. used instead. If the build procedure fails to include it (SHOW FEATURES
  1836. will list SELECT), then you can add it to your CFLAGS:
  1837. -DSELECT
  1838. Conversely, if the build procedure tries to use select() when it really
  1839. is not there, add:
  1840. -DNOSELECT
  1841. Note: select() is not part of System V nor of POSIX, but it has been
  1842. added to various System-V- and POSIX-based systems as an extension.
  1843. Some System-V variations (SCO Xenix/UNIX/ODT and DIAB DNIX) include a
  1844. rdchk() function that can be used for buffer peeking. It returns 0 if
  1845. no characters are waiting and 1 if characters are waiting (but unlike
  1846. FIONREAD, it does not tell the actual number). If your system has
  1847. rdchk(), add:
  1848. -DRDCHK: Include this in CFLAGS if your system has the rdchk() function.
  1849. Otherwise, if your version of Unix has the poll() function (and the
  1850. /usr/include/poll.h file) -- which appears to be a standard part of
  1851. System V going back to at least SVR3, include:
  1852. -DCK_POLL
  1853. 9.8. Other System-Dependent Features
  1854. [ [315]Top ] [ [316]Contents ] [ [317]Section Contents ] [ [318]Next ]
  1855. [ [319]Previous ]
  1856. Systems with <termios.h> might have the symbol IEXTEN defined. This is
  1857. used to turn "extended features" in the tty device driver on and off,
  1858. such as Ctrl-O to toggle output flushing, Ctrl-V to quote input
  1859. characters, etc.
  1860. In most Unix implementations, it should be turned off during Kermit
  1861. operation, so if [320]ckutio.c finds this symbol, it uses it. This is
  1862. necessary, at least, on BSDI. On some systems, however, IEXTEN is
  1863. either misdefined or misimplemented. The symptom is that CR, when typed
  1864. to the command processor, is echoed as LF, rather than CRLF. This
  1865. happens (at least) on Convex/OS 9.1. The solution is to add the
  1866. following symbol to the makefile target's CFLACS:
  1867. -DNOIEXTEN
  1868. However, in at least one Unix implementation, QNX 4.21, IEXTEN must be
  1869. set before hardware flow control can be used.
  1870. In edits 177 and earlier, workstation users noticed a "slow screen
  1871. writing" phenomenon during interactive command parsing. This was traced
  1872. to a setbuf() call in [321]ckutio.c that made console (stdout) writes
  1873. unbuffered. This setbuf() call has been there forever, and could not be
  1874. removed without some risk. Kermit's operation was tested on the NeXT in
  1875. edit 178 with the setbuf() call removed, and the slow-writing symptom
  1876. was cured, and everything else (command parsing, proper wakeup on ?,
  1877. ESC, Ctrl-U, and other editing characters, terminal emulation,
  1878. remote-mode and local-mode file transfer, etc) seemed to work as well
  1879. as or better than before. In subsequent edits, this change was made to
  1880. many other versions too, with no apparent ill effects. To remove the
  1881. setbuf() call for your version of Kermit, add:
  1882. -DNOSETBUF
  1883. Later reports indicate that adding -DNOSETBUF has other beneficial
  1884. effects, like cutting down on swapping when Kermit is run on
  1885. workstations with small memories. But BEWARE: on certain small Unix
  1886. systems, notably the AT&T 6300 and 3B1 (the very same ones that benefit
  1887. from NOSETBUF), NOSETBUF seems to conflict with CK_CURSES. The program
  1888. builds and runs OK, but after once using the curses display, echoing is
  1889. messed up. In this case, we use a System-V specific variation in the
  1890. curses code, using newterm() to prevent System V from altering the
  1891. buffering. See makefile entries for AT&T 6300 and 3B1.
  1892. The Unix version of C-Kermit includes code to switch to file descriptor
  1893. zero (stdin) for remote-mode file transfer. This code is necessary to
  1894. prevent Kermit from giving the impression that it is "idle" during file
  1895. transfers, which, at some sites, can result in the job being logged out
  1896. in the middle of an active file transfer by idle-job monitors.
  1897. However, this feature can interfere with certain setups; for example,
  1898. there is a package which substitutes a pty/tty pair for /dev/tty and
  1899. sets file descriptor 0 to be read-only, preventing Kermit from sending
  1900. packets. Or... When a Unix shell is invoked under the PICK environment,
  1901. file descriptor 0 is inoperative.
  1902. To remove this feature and allow Kermit to work in such environments,
  1903. add the compile-time option:
  1904. -DNOFDZERO
  1905. On some versions of Unix, earlier releases of C-Kermit were reported to
  1906. render a tty device unusable after a hangup operation. Examples include
  1907. IBM AIX on the RT PC and RS/6000. A typical symptom of this phenomenon
  1908. is that the DIAL command doesn't work, but CONNECTing to the device and
  1909. dialing manually do work. A further test is to SET DIAL HANGUP OFF,
  1910. which should make dialing work once by skipping the pre-dial hangup.
  1911. However, after the connection is broken, it can't be used any more:
  1912. subsequent attempts to DIAL the same device don't work. The cure is
  1913. usually to close and reopen the device as part of the hangup operation.
  1914. To do this, include the following compile-time option:
  1915. -DCLSOPN
  1916. Similarly, there is a section of code in ttopen(), which does another
  1917. close(open()) to force the O_NDELAY mode change. On some systems, the
  1918. close(open()) is required to make the mode change take effect, and
  1919. apparently on most others it does no harm. But reportedly on at least
  1920. one System V R4 implementation, and on SCO Xenix 3.2, the close(open())
  1921. operation hangs if the device lacks carrier, EVEN THOUGH the CLOCAL
  1922. characteristic has just been set to avoid this very problem. If this
  1923. happens to you, add this to your CFLAGS:
  1924. -DNOCOTFMC
  1925. or, equivalently, in your KFLAGS on the make command line. It stands
  1926. for NO Close(Open()) To Force Mode Change.
  1927. C-Kermit renames files when you give a RENAME command and also
  1928. according to the current SET FILE COLLISION option when receiving
  1929. files. The normal Unix way to rename a file is via two system calls:
  1930. link() and unlink(). But this leaves open a window of vulnerability.
  1931. Some Unix systems also offer an atomic rename(oldname,newname)
  1932. function. If your version of Unix has this function, add the following
  1933. to your CFLAGS:
  1934. -DRENAME
  1935. C-Kermit predefines the RENAME for several Unix versions in
  1936. [322]ckcdeb.h (SVR4, SUNOS41, BSD44, AIXRS, etc). You can tell if
  1937. rename() is being used if the SHOW FEATURES command includes RENAME in
  1938. the compiler options list. If the predefined RENAME symbol causes
  1939. trouble, then add NORENAME to your CFLAGS. Trouble includes:
  1940. a. Linker complains that _rename is an unresolved symbol.
  1941. b. Linking works, but Kermit's RENAME command doesn't work (which
  1942. happens because older versions of rename() might have their
  1943. arguments reversed).
  1944. If rename() is not used, then Kermit uses link()/unlink(), which is
  1945. equivalent except it is not atomic: there is a tiny interval in which
  1946. some other process might "do something" to one of the files or links.
  1947. Some Unix systems (Olivetti X/OS, Amdahl UTS/V, ICL SVR3, etc) define
  1948. the S_ISREG and S_ISDIR macros incorrectly. This is compensated for
  1949. automatically in [323]ckufio.c. Other systems might have this same
  1950. problem. If you get a compile-time error message regarding S_ISREG
  1951. and/or S_ISDIR, add the following to your CFLAGS:
  1952. -DISDIRBUG
  1953. Finally, here's a symbol you should NEVER define:
  1954. -DCOMMENT
  1955. It's used for commenting out blocks of code. If for some reason you
  1956. find that your compiler has COMMENT defined, then add -UCOMMENT to
  1957. CFLAGS or KFLAGS! Similarly, some header files have been known to
  1958. define COMMENT, in which case you must add "#undef COMMENT" to each
  1959. C-Kermit source module, after all the #includes.
  1960. 9.9. Terminal Interruption
  1961. [ [324]Top ] [ [325]Contents ] [ [326]Section Contents ] [ [327]Next ]
  1962. [ [328]Previous ]
  1963. When C-Kermit enters interactive command mode, it sets a Control-C
  1964. (terminal keyboard interrupt = SIGINT) trap to allow it to return to
  1965. the command prompt whenever the user types Control-C (or whatever is
  1966. assigned to be the interrupt character). This is implemented using
  1967. setjmp() and longjmp(). On some systems, depending on the machine
  1968. architecture and C compiler and who knows what else, you might get
  1969. "Memory fault (coredump)" or "longjmp botch" instead of the desired
  1970. effect (this should not happen in 5A(190) and later). In that case, add
  1971. -DNOCCTRAP to your CFLAGS and rebuild the program.
  1972. Job control -- the ability to "suspend" C-Kermit on a Unix system by
  1973. typing the "susp" character (normally Ctrl-Z) and then resume execution
  1974. later (with the "fg" command) -- is a tricky business. C-Kermit must
  1975. trap suspend signals so it can put the terminal back into normal mode
  1976. when you suspend it (Kermit puts the terminal into various strange
  1977. modes during interactive command parsing, CONNECT, and file transfer).
  1978. Supporting code is compiled into C-Kermit automatically if <signal.h>
  1979. includes a definition for the SIGTSTP signal. HOWEVER... some systems
  1980. define this signal without supporting job control correctly. You can
  1981. build Kermit to ignore SIGTSTP signals by including the -DNOJC option
  1982. in CFLAGS. (You can also do this at runtime by giving the command SET
  1983. SUSPEND OFF.)
  1984. NOTE: As of version 5A(190), C-Kermit makes another safety check.
  1985. Even if job control is available in the operating system (according
  1986. to the numerous checks made in congm()), it will still disable the
  1987. catching of SIGTSTP signals if SIGTSTP was set to SIG_IGN at the
  1988. time C-Kermit was started.
  1989. System V R3 and earlier systems normally do not support job control. If
  1990. you have an SVR3 system that does, include the following option in your
  1991. CFLAGS:
  1992. -DSVR3JC
  1993. On systems that correctly implement POSIX signal handling, signals can
  1994. be handled more reliably than in Bell, Berkeley, or AT&T Unixes. On
  1995. systems (such as QNX) that are "strictly POSIX", POSIX signal handling
  1996. *must* be used, otherwise no signal will work more than once. If you
  1997. have POSIX-based system and you find that your version of Kermit
  1998. responds to Ctrl-C (SIGINT) or Ctrl-Z (SIGTSTP) only once, then you
  1999. should add the following option to your CFLAGS:
  2000. -DCK_POSIX_SIG
  2001. But be careful; some POSIX implementations, notably 4.4BSD, include
  2002. POSIX signal handling symbols and functions as "stubs" only, which do
  2003. nothing. Look in <signal.h> for sigsetjmp and siglongjmp and read the
  2004. comments.
  2005. 10. DIALING OUT AND COORDINATING WITH UUCP
  2006. [ [329]Top ] [ [330]Contents ] [ [331]Next ] [ [332]Previous ]
  2007. The short version (general):
  2008. In order for C-Kermit to be able to dial out from your Unix
  2009. computer, you need to give it the same owner, group, and permissions
  2010. as your other dialout programs, such as cu, tip, minicom, uucp,
  2011. seyon, etc.
  2012. The short version for Linux only:
  2013. Since Red Hat 7.2, about 2002, Linux does not leave the lockfile
  2014. handling to each application, but instead provides an external
  2015. application, /usr/sbin/lockdev, that all applications should invoke
  2016. when they need to access a serial port; lockdev locks and unlocks
  2017. the port without requiring the application to have privileges, since
  2018. the privileges on the lockfile directory are assigned to lockdev.
  2019. C-Kermit 8.0.211 and later support this method. But C-Kermit still
  2020. needs to be able to open the port itself, and therefore if the
  2021. port's permissions do not allow read/write access to the general
  2022. public, the general rule must still be followed: in the most common
  2023. case, it must be SETGID to the group uucp (explained below). If a
  2024. pre-8.0.211 version of C-Kermit is to be installed for use with
  2025. serial ports on any version of Linux, it must still be installed as
  2026. described in the following sections.
  2027. The long version:
  2028. Make sure your dialout line is correctly configured for dialing out (as
  2029. opposed to login). The method for doing this is different for each kind
  2030. of Unix. Consult your system documentation for configuring lines for
  2031. dialing out (for example, Sun SPARCstation IPC users should read the
  2032. section "Setting up Modem Software" in the Desktop SPARC Sun System and
  2033. Network Manager's Guide, or the Terminals and Modems section of the HP
  2034. manual, "Configuring HP-UX for Peripherals" (e.g. /usr/sbin/sam =>
  2035. Peripheral Devices => Terminals and Modems => Add Modem).
  2036. Unlike most other multiuser, multitasking operating systems, Unix
  2037. allows multiple users to access the same serial device at the same
  2038. time, even though there is no earthly reason why two users should do
  2039. this. When they do, user A will read some of the incoming characters,
  2040. and user B will read the others. In all likelihood, neither user will
  2041. see them all. Furthermore, User B can hang up User A's call, and so
  2042. one.
  2043. Rather than change Unix to enforce exclusive access to serial devices
  2044. such as ttys, when it might still have been possible, Unix developers
  2045. opted for a "lock file" mechanism. Any process that wants to open a tty
  2046. device should first check to see if a file of a certain name exists,
  2047. and if so, not to open the device. If the file does not exist, the
  2048. process creates the file and then opens the device. When the process
  2049. closes the device, it destroys the lockfile. This procedure was
  2050. originated for use with Unix's UUCP, CU, and TIP programs, and so these
  2051. lockfiles are commonly called "UUCP lockfiles" (UUCP = Unix-to-Unix
  2052. Copy Program).
  2053. As you can imagine, this method is riddled with pitfalls:
  2054. * If a process does not observe the prevailing lockfile convention,
  2055. then it can interfere with other "polite" processes. And in fact,
  2056. very few Unix applications or commands handle lockfiles at all; an
  2057. original design goal of Unix was that "everything is a file", and
  2058. countless utilities operate on files directly (by opening them) or
  2059. indirectly through redirection of standard i/o, without creating or
  2060. looking for lockfiles.
  2061. * If a process crashes while it has the device open, the lockfile is
  2062. left behind, preventing further processes from using the device.
  2063. * Various versions of Unix use different names for the lockfiles, put
  2064. them in different directories, with different owners and groups and
  2065. permissions, and specify their contents differently.
  2066. * On a given platform, the lockfile conventions may change from one
  2067. Unix release to the next (for example, SunOS 4.0 to 4.1) or, in the
  2068. case of Linux, across different distributions.
  2069. * The same tty device might have more than one name, and most
  2070. lockfile conventions don't allow for this. Similarly for symbolic
  2071. links.
  2072. In an attempt to address the problem of "stale" lockfiles, most UUCP
  2073. implementations put the PID (Process ID) of the creating process in the
  2074. lockfile. Thus, another process that wants to open the corresponding
  2075. device can check not only for the lockfile itself, but also can check
  2076. the PID for validity. But this doesn't work well either:
  2077. * PIDs are stored in diverse formats that change with every new
  2078. release (short, integer, long, or string in any of various
  2079. formats). If the reading program does not follow the same
  2080. convention as the writing program, it can diagnose a valid PID to
  2081. be invalid, and therefore not honor the lock.
  2082. * PIDs recycle. If the lockfile was created by PID 1234, which later
  2083. crashed without removing the lockfile, and then a new process 1234
  2084. exists a the time the lockfile is checked, the lockfile will be
  2085. improperly taken as valid, and access to the device denied
  2086. unnecessarily.
  2087. Several techniques address the problem of multiple names for the same
  2088. device:
  2089. * Multiple lockfiles. For example, if the user opens a device through
  2090. a symlink, a lockfile is created for both the symlink name and the
  2091. true name (obtained from readlink()). However, when multiple
  2092. drivers are installed for the same device (e.g. /dev/cua,
  2093. /dev/cufa, etc), this approach won't work unless all applications
  2094. *know* all the different names for the same device and make
  2095. lockfiles for all of them, which is obviously not practical.
  2096. * Lockfiles whose names are not based on the device name. These
  2097. lockfiles generally have names like LK.inode/major/minor, where
  2098. inode, major, and minor are numbers, which will always be the same
  2099. for any physical device, no matter what its name. This form of
  2100. lockfile is used in System V R4 and its derivatives, such as
  2101. Solaris, UnixWare, etc. If lockfiles must be used (as opposed to,
  2102. say, kernel-based locks), this would seem to be the most effective
  2103. form.
  2104. Most versions of Unix were not designed to accommodate third-party
  2105. communications software; thus vendors of these Unix products feel no
  2106. compunction about changing lockfile conventions from release to
  2107. release, since they also change their versions of the cu, uucp, tip,
  2108. etc, programs at the same time to match. And since the source code to
  2109. these programs might not be published, it is difficult for makers of
  2110. third-party products like C-Kermit to find out what the new conventions
  2111. are. It also forces release of new versions of C-Kermit whenever the OS
  2112. vendor makes a change like this.
  2113. Some Unix vendors have taken a small step to simplify communications
  2114. application development for their products: the inclusion of lockfile
  2115. routines in the standard system C runtime libraries to shield the
  2116. application from the details of lockfile management (IBM AIX is an
  2117. example). When such routines are used, communications applications do
  2118. not need modification when lockfile conventions change (although they
  2119. will need recompiling if the routines are statically linked into the
  2120. application). In the AIX example, the simple function calls ttylock(),
  2121. ttyunlock(), and ttylocked() replace hundreds of lines of ugly code in
  2122. C-Kermit that attempts to keep pace with every release of every Unix
  2123. product over the last 20 years. Inclusion of ttylock() code occurs
  2124. when:
  2125. -DUSETTYLOCK
  2126. is included in the CFLAGS.
  2127. If such routines are available, they should be used. The rest of this
  2128. section applies when they are not.
  2129. To fit in with UUCP and other Unix-based serial-port communication
  2130. software, C-Kermit must have the same idea as your system's uucp, cu,
  2131. and tip programs about what the UUCP lock directory is called, what the
  2132. lockfile itself is called, and what its contents should be. In most
  2133. cases, C-Kermit preprocessor flags create the appropriate configuration
  2134. at compile time if the appropriate makefile target was used (see
  2135. [333]ckutio.c). The following CFLAGS options can be used to override
  2136. the built-in configuration:
  2137. -DLCKDIR
  2138. Tells Kermit that the UUCP lock directory is
  2139. /usr/spool/uucp/LCK.
  2140. -DACUCNTRL
  2141. Tells Kermit to use the BSD 4.3 acucntrl() program to turn off
  2142. getty (login) on the line before using it, and restore getty
  2143. when done.
  2144. -DHDBUUCP
  2145. Include this if your system uses Honey DanBer UUCP, in which the
  2146. lockfile directory and format are relatively standardized.
  2147. -DLOCK_DIR=\\\"/xxx/yyy\\\"
  2148. Gives the lock directory name explicitly. The triple quoting is
  2149. necessary. For example:
  2150. CFLAGS= -DBSD4 -DLOCK_DIR=\\\"/usr/local/locks\\\" -DNODEBUG
  2151. (NOTE: The triple quoting assumes this is a "top-level" make
  2152. entry, and not a make entry that calls another one.)
  2153. -DLFDEVNO The lockfile name uses the tty device inode and major and
  2154. minor
  2155. numbers: LK.dev.maj.min, as in Sys V R4, e.g. LK.035.044.008.
  2156. When the LK.inode.major.minor form is used, a single lockfile is
  2157. enough. Otherwise, a single lockfile rarely suffices. For example, in
  2158. Linux, it is common to have a /dev/modem symbolic link to an actual
  2159. dialout device, like /dev/cua0 or /dev/ttyS0, whose purpose is to hide
  2160. the details of the actual driver from the user. So if one user opens
  2161. /dev/modem, a lockfile called LCK..modem is created, which does not
  2162. prevent another user from simultaneously opening the same device by its
  2163. real name.
  2164. On SCO Unix platforms, we have a slightly different problem: the same
  2165. device is, by convention, known by "lowercase" and "uppercase" names,
  2166. depending on whether it has modem control. So by convention,
  2167. communications programs are supposed to create the lockfiles based on
  2168. the lowercase name. But some programs don't follow this convention. In
  2169. HP-UX, we have several different names for each serial device. And so
  2170. on.
  2171. For this reason, on platforms where the LK.inode.major.minor form is
  2172. not used, C-Kermit also creates a secondary lockfile (which is simply a
  2173. link to the first) if:
  2174. a. The given device name is a symbolic link. The secondary link is
  2175. based on the device's real name.
  2176. b. On SCO: The device name is not a symbolic link, but it contains
  2177. uppercase letters. The primary link is based on the lowercase name;
  2178. the secondary link is based on the name that was given.
  2179. c. On HP-UX: The device name starts with "cu". The primary link is
  2180. based on the name that was given; the secondary link is based on
  2181. the corresponding "ttyd" device, e.g. "LCK..cua0p0" and
  2182. "LCK..ttyd0p0".
  2183. NOTE: symlinks are not handled in HP-UX.
  2184. Honey DanBer (HDB) UUCP, the basis of many UUCP implementations, has
  2185. two characteristics:
  2186. a. Lockfiles are kept in /usr/spool/locks/ (usually).
  2187. b. A lockfile contains the process id (pid) in ASCII, rather than as
  2188. an int.
  2189. Non-HDB selections assume the lockfile contains the pid in int form
  2190. (or, more precisely, in PID_T form, where PID_T is either int or pid_t,
  2191. depending on your system's C library and header files). (b), by the
  2192. way, is subject to interpretation: the numeric ASCII string may or may
  2193. not be terminated by a newline, it may or may not have leading spaces
  2194. (or zeros), and the number of leading spaces or zeros can differ, and
  2195. the differences can be significant.
  2196. Even if you build the program with the right lockfile option, you can
  2197. still have problems when you try to open the device. Here are the error
  2198. messages you can get from SET LINE, and what they mean:
  2199. a. "Timed out, no carrier." This one is not related to lockfiles. It
  2200. means that you have SET CARRIER ON xx, where xx is the number of
  2201. seconds to wait for carrier, and carrier did not appear within xx
  2202. seconds. Solution: SET CARRIER AUTO or OFF.
  2203. b. "Sorry, access to lock denied." Kermit has been configured to use
  2204. lockfiles, but (a)the lockfile directory is write-protected against
  2205. you, or (b) it does not exist. The "access to lock denied" message
  2206. will tell you the reason. If the directory does not exist, check to
  2207. make sure Kermit is using the right name. Just because version n of
  2208. your Unix used a certain lockfile directory is no guarantee that
  2209. version n.1 does not use a different one. Workaround: ask the
  2210. system administrator to install a symbolic link from the old name
  2211. to the new name. Other solutions: (see below)
  2212. c. "Sorry, access to tty device denied." The tty device that you
  2213. specified in your SET LINE command is read/write protected against
  2214. you. Solution: (see below)
  2215. d. "Sorry, device is in use." The tty device you have specified is
  2216. currently being used by another user. A prefatory message gives you
  2217. an "ls -l" listing of the lockfile, which should show the username
  2218. of the person who created it, plus a message "pid = nnn" to show
  2219. you the process id of the user's program. Solutions: try another
  2220. device, wait until the other user is finished, ask the other user
  2221. to hurry up, or ask the system manager for help.
  2222. e. "Sorry, can't open connection: reason". The device cannot be opened
  2223. for some other reason, which is listed.
  2224. f. "sh: /usr/lib/uucp/acucntrl: not found". This means your Kermit
  2225. program was built with the -DACUCNTRL switch, but your computer
  2226. system does not have the BSD 4.3 acucntrl program. Solution:
  2227. install the acucntrl program if you have it, or rebuild Kermit
  2228. without the -DACUCNTRL switch.
  2229. There are two solutions for problems (b) and (c), both of which involve
  2230. intervention by your Unix system administrator (superuser):
  2231. a. Have the superuser change the permission of the lockfile directory
  2232. and to the tty devices so that everyone on the system has
  2233. read/write permission.
  2234. su% chmod 777 /usr/spool/locks (or whatever the path is)
  2235. su% chmod 666 /dev/ttyXX
  2236. One risk here is that people can write lots of junk into the
  2237. lockfile directory, delete other people's files in the lockfile
  2238. directory, and intercept other people's data as it goes in and out
  2239. of the tty device. The major danger here would be intercepting a
  2240. privileged password. Of course, any user could write a short,
  2241. ordinary, unprivileged program to do exactly the same thing if the
  2242. tty device was world read/writeable. The other risk as that
  2243. telephone calls are not controlled -- anybody on your system can
  2244. make them, without having to belong to any particular group, and
  2245. this could run up your phone bill.
  2246. b. Use groups to regulate access. Normally the lockfile directory and
  2247. and the dialout devices will have the same group (such as uucp). If
  2248. so, then put everybody who's allowed to dial out into that group,
  2249. and make sure that the lockfile directory and the tty devices have
  2250. group read AND write permission. Example:
  2251. su% chmod 770 /usr/spool/locks (or whatever the path is)
  2252. su% chmod 660 /dev/ttyXX
  2253. User whatever tool is available on your platform to add users to
  2254. the appropriate group (e.g. edit the /etc/group file).
  2255. c. Have the superuser change Kermit to run setuid and/or setgid to the
  2256. owner and/or group of the lockfile directory and the tty devices if
  2257. necessary), typically uucp (see [334]next section), but NOT root.
  2258. Example:
  2259. su% chown uucp kermit - or - chgrp uucp kermit
  2260. su% chmod u+s kermit (setuid) - or - chmod g+s kermit (setgid)
  2261. and then make sure the lockfile directory, and the tty devices,
  2262. have owner (setuid) and/or group (setgid) write permission. For
  2263. example:
  2264. su% chmod o+rwx /usr/spool/uucp
  2265. su% chown uucp /dev/ttyXX ; chmod 600 /dev/ttyXX
  2266. In some cases, the owner and group must be distinct; the key point
  2267. is that read/write access is required to both the UUCP lockfile
  2268. directory and the tty itself.
  2269. If you make C-Kermit setuid or setgid to root, it refuses to run:
  2270. Fatal: C-Kermit setuid to root!
  2271. Example:
  2272. crw-r----- 1 uucp uucp 5, 67 Feb 11 06:23 /dev/cua3
  2273. drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock
  2274. requires suid uucp to get read/write access on /dev/cua3 and sgid to
  2275. get read/write access on /var/lock (since you can't set Kermit's uid or
  2276. gid to root).
  2277. The reason Kermit can't be setuid or setgid to root has to do with
  2278. the fact that some Unix OS's can't switch user or group IDs in that
  2279. case. Unfortunately, the prohibition against making Kermit setuid or
  2280. setgid to root means that Unix C-Kermit can't be used to make rlogin
  2281. connections by non-root users. (The rlogin port is privileged, which
  2282. is why the regular rlogin command is setuid root -- which is safe
  2283. because the rlogin program never has to create or access files like
  2284. Kermit does.)
  2285. For the lockfile mechanism to achieve its desired purpose -- prevention
  2286. of access to the same tty device by more than one process at a time --
  2287. ALL programs on a given computer that open, read or write, and close
  2288. tty devices must use the SAME lockfile conventions. Unfortunately, this
  2289. is often not the case. Here is a typical example of how this can go
  2290. wrong: In SunOS 4.0 and earler, the lockfile directory was
  2291. /usr/spool/uucp; in 4.1 it was changed to /var/spool/locks in the quest
  2292. for political correctness. Consequently, any third-party programs (such
  2293. as C-Kermit) that were not modified to account for this change,
  2294. recompiled, and reinstalled, did not use the same lockfiles as uucp,
  2295. tip, etc, and so the entire purpose of the lockfile is defeated.
  2296. What if your Unix system does not have UUCP installed? For example, you
  2297. have a Unix workstation, and you do not use uucp, cu, or tip, or UUCP
  2298. was not even supplied with your version of Unix (QNX is an example). In
  2299. this case, you have two choices:
  2300. a. If there may be more than one person running Kermit at the same
  2301. time, competing for the same tty device, then create a special
  2302. lockfile directory just for Kermit, for example, /usr/spool/kermit,
  2303. and make sure you have read/write access to it. Then add the
  2304. following to your makefile target CFLAGS, as shown earlier:
  2305. -DLOCK_DIR=\\\"/usr/spool/kermit\\\"
  2306. b. If you are the only user on your workstation, and no other
  2307. processes will ever be competing with Kermit for the dialout tty
  2308. device, then add -DNOUUCP to your makefile target's CFLAGS and
  2309. rebuild Kermit.
  2310. 11. RUNNING UNIX C-KERMIT SETUID OR SETGID
  2311. [ [335]Top ] [ [336]Contents ] [ [337]Next ] [ [338]Previous ]
  2312. Even if you don't intend to run C-Kermit setuid, somebody else might
  2313. come along and chown and chmod it after it has been built. You should
  2314. be sure that it is built correctly to run setuid on your system. For
  2315. POSIX and AT&T Unix based versions, you don't have to do anything
  2316. special.
  2317. For 4.2 and 4.3 BSD-based Unix versions, you normally need not add
  2318. anything special to the makefile. The program assumes that the
  2319. setreuid() and setregid() functions are available, without which we
  2320. cannot switch back and forth between real and effective uids. If "make"
  2321. complains that _setreuid or _setregid is/are not defined, add
  2322. -DNOSETREU to CFLAGS. In this case it is very likely (but not certain)
  2323. that you cannot protect ttys and lockfiles against people and have them
  2324. run Kermit setuid.
  2325. If make does not complain about this, you should find out whether your
  2326. BSD version (4.3 or other systems like SunOS 4.x that claim to include
  2327. BSD 4.3 compatibility) includes the saved-setuid feature (see long
  2328. notes under edit 146 in ckc178.upd). If it does, then add -DSAVEDUID to
  2329. CFLAGS.
  2330. IMPORTANT NOTE: Most Unix system documentation will not give you the
  2331. required information. To determine whether your Unix system supplies
  2332. the saved-original-effective-user/group-id feature, use the ckuuid.c
  2333. program. Read and follow the instructions in the comments at the
  2334. beginning.
  2335. C-Kermit for 4.4BSD-based systems automatically use sete[ug]id(). See
  2336. [339]ckutio.c.
  2337. If you have a version of Unix that is not BSD-based, but which supplies
  2338. the setreuid() and setregid() functions, and these are the only way to
  2339. switch between real and effective uid, add -DSETREUID to your makefile
  2340. target.
  2341. WARNING: There are two calls to access() in [340]ckufio.c, by which
  2342. Kermit checks to see if it can create an output file. These calls
  2343. will not work correctly when (a)you have installed C-Kermit setuid
  2344. or setgid on a BSD-based Unix system, and (b) the
  2345. saved-original-effective-uid/gid feature is not present, and (c) the
  2346. access() function always checks what it believes to be the real ID
  2347. rather than the effective ID. This is the case, for example, in
  2348. Olivetti X/OS and in NeXTSTEP. In such cases, you can force correct
  2349. operation of access() calls by defining the symbol SW_ACC_ID at
  2350. compile time in CFLAGS.
  2351. If you have a version of Unix that does not allow a process to switch
  2352. back and forth between its effective and real user and group ids
  2353. multiple times, you probably should not attempt to run Kermit setuid,
  2354. because once having given up its effective uid or gid (which it must do
  2355. in order to transfer files, fork a shell, etc) it can never get it
  2356. back, and so it can not use the original effective uid or gid to create
  2357. or delete uucp lockfiles. In this case, you'll either have to set the
  2358. permissions on your lockfile directory to make them publicly
  2359. read/writable, or dispense with locking altogether.
  2360. MORAL: Are you thoroughly sickened and/or frightened by all that you
  2361. have just read? You should be. What is the real answer? Simple. Serial
  2362. devices -- such as ttys and magnetic tapes -- in Unix should be opened
  2363. with exclusive access only, enforced by the Unix kernel. Shared access
  2364. has no conceivable purpose, legitimate or otherwise, except by
  2365. privileged system programs such as getty. The original design dates
  2366. from the late 1960s, when Unix was developed for laboratory use under a
  2367. philosophy of trust by people within shouting distance of each other --
  2368. but even then, no useful purpose was served by this particular form of
  2369. openness; it was probably more of a political statement. Since the
  2370. emergence of Unix from the laboratory into the commercial market, we
  2371. have seen every vestige of openness -- but this one -- stripped away.
  2372. I'd like to see some influential Unix maker take the bold step of
  2373. making the simple kernel change required to enforce exclusive access to
  2374. serial devices. (Well, perhaps not so simple when bidirectionality must
  2375. also be a goal -- but then other OS's like VMS solved this problem
  2376. decades ago.)
  2377. 12. CONFIGURING UNIX WORKSTATIONS
  2378. [ [341]Top ] [ [342]Contents ] [ [343]Next ] [ [344]Previous ]
  2379. On desktop workstations that are used by only the user at the console
  2380. keyboard, C-Kermit is always used in local mode. But as delivered,
  2381. C-Kermit runs in remote mode by default. To put it in local mode at
  2382. startup, you can put a SET LINE command in your .mykermrc.
  2383. You can also build C-Kermit to start up in local mode by default. To do
  2384. this, include the following in the CFLAGS in your makefile target:
  2385. -DDFTTY=\\\"/dev/ttyxx\\\"
  2386. where ttyxx is the name of the device you will be using for
  2387. communications. Presently there is no way of setting the default modem
  2388. type at compile time, so use this option only for direct lines.
  2389. C-Kermit does not work well on certain workstations if it is not run
  2390. from within a terminal window. For example, you cannot start C-Kermit
  2391. on a NeXT by launching it directly from NeXTstep. Similarly for Sun
  2392. workstations in the Open Windows environment. Run Kermit in a terminal
  2393. window.
  2394. 13. BIZARRE BEHAVIOR AT RUNTIME
  2395. [ [345]Top ] [ [346]Contents ] [ [347]Next ] [ [348]Previous ]
  2396. See the "beware file",
  2397. [349]ckubwr.txt, for hints about runtime misbehavior. This section
  2398. lists some runtime problems that can be cured by rebuilding C-Kermit.
  2399. The program starts, but there is no prompt, and certain operations
  2400. don't work (you see error messages like "Kermit command error in
  2401. background execution"). This is because Kermit thinks it is running in
  2402. the background. See conbgt() in [350]ckutio.c. Try rebuilding Kermit
  2403. with:
  2404. -DPID_T=pid_t
  2405. added to your CFLAGS. If that doesn't help, find out the actual data
  2406. type for pids (look in types.h or similar file) and use it in place of
  2407. "pid_t", for example:
  2408. -DPID_T=short
  2409. Unexplainable and inappropriate error messages ("Sockets not supported
  2410. on this device", etc) have been traced in at least one case to a lack
  2411. of agreement between the system header files and the actual kernel.
  2412. This happened because the GNU C compiler (gcc) was being used. gcc
  2413. wants to have ANSI-C-compliant header files, and so part of the
  2414. installation procedure for gcc is (or was) to run a shell script called
  2415. "fixincludes", which translates the system's header files into a
  2416. separate set of headers that gcc likes. So far so good. Later, a new
  2417. version of the operating system is installed and nobody remembers to
  2418. run fixincludes again. From that point, any program compiled with gcc
  2419. that makes use of header files (particularly ioctl.h) is very likely to
  2420. misbehave. Solution: run fixincludes again, or use your system's
  2421. regular C compiler, libraries, and header files instead of gcc.
  2422. 14. CRASHES AND CORE DUMPS
  2423. [ [351]Top ] [ [352]Contents ] [ [353]Next ] [ [354]Previous ]
  2424. If C-Kermit consistently dumps core at the beginning of a file
  2425. transfer, look in SHOW FEATURES for CKREALPATH. If found, rebuild with
  2426. -DNOREALPATH and see if that fixes the problem (some UNIXes have
  2427. realpath() but it doesn't work).
  2428. Total failure of the Kermit program can occur because of bad memory
  2429. references, bad system calls, or problems with dynamic memory
  2430. allocation. First, try to reproduce the problem with debugging turned
  2431. on: run Kermit with the -d command-line option (for example, "wermit
  2432. -d") and then examine the resulting debug.log file. The last entry
  2433. should be in the vicinity of the crash. In VMS, a crash automatically
  2434. produces a "stack dump" which shows the routine where the crash occurs.
  2435. In some versions of Unix, you can get a stack dump with "adb" -- just
  2436. type "adb wermit core" and then give the command "$c", then Ctrl-D to
  2437. quit (note: replace "wermit" by "kermit" or by the full pathname of the
  2438. executable that crashed if it is not in the current directory). Or use
  2439. gdb to get a backtrace, etc.
  2440. In edit 186, one implementation, UNISYS 5000/95 built with "make
  2441. sys5r3", has been reported to run out of memory very quickly (e.g.
  2442. while executing a short initialization file that contains a SET DIAL
  2443. DIRECTORY command). Debug logs show that malloc calls are failing,
  2444. reason unknown. For this and any other implementation that gives error
  2445. messages about "malloc failure" or "memory allocation failure", rebuild
  2446. the program *without* the -DDYNAMIC CFLAGS definition, for example:
  2447. make sys5r3 KFLAGS=-UDYNAMIC
  2448. As of edit 169, C-Kermit includes a malloc() debugging package which
  2449. you may link with the Kermit program to catch runtime malloc errors.
  2450. See the makefile entries for sunos41md and nextmd for examples of how
  2451. to select malloc debugging. Once you have linked Kermit with the malloc
  2452. debugger, it will halt with an informative message if a malloc-related
  2453. error occurs and, if possible, dump core. For this reason,
  2454. malloc-debugging versions of Kermit should be built without the "-s"
  2455. link option (which removes symbols, preventing analysis of the core
  2456. dump). You have several ways to track down the malloc error: Analyze
  2457. the core dump with adb. Or reproduce the problem with "log debug" and
  2458. then look at the code around the last debug.log entry. If you have gcc,
  2459. build the program with "-g" added to CFLAGS and then debug it with gdb,
  2460. e.g.
  2461. gdb wermit
  2462. break main
  2463. run
  2464. .. set other breakpoints or watchpoints
  2465. continue
  2466. Watchpoints are especially useful for finding memory leaks, but they
  2467. make the program run about a thousand times slower than usual, so don't
  2468. set them until the last possible moment. When a watchpoint is hit, you
  2469. can use the "where" command to find out which C-Kermit source statement
  2470. triggered it.
  2471. If you have the Pure Software Inc "Purify" product, see the sunos41cp
  2472. makefile entry for an example of how to use it to debug C-Kermit.
  2473. 15. SYSLOGGING
  2474. [ [355]Top ] [ [356]Contents ] [ [357]Next ] [ [358]Previous ]
  2475. "Syslogging" means recording selected information in the system log via
  2476. the Unix syslog() facility, which is available in most Unix versions.
  2477. Syslogging is not done unless C-Kermit is started with:
  2478. --syslog:n
  2479. on the command-line, where n is a number greater than 0 to indicate the
  2480. level of syslogging. See [359]Section 4.2 of the [360]IKSD
  2481. Administrator's Guide for details.
  2482. Obviously you can't depend on users to include --syslog:3 (or whatever)
  2483. on the command line every time they start C-Kermit, so if you want
  2484. certain kinds of records to be recorded in the system log, you can
  2485. build C-Kermit with forced syslogging at the desired level; for
  2486. example, to record logins and dialouts:
  2487. make linux KFLAGS=-DSYSLOGLEVEL=2
  2488. Levels 2 and 3 are the most likely candidates for this treatment. Level
  2489. 2 forces logging of all successful dialout calls (e.g. for checking
  2490. against or phone bills), and level 3 records all connections (SET LINE
  2491. or SET HOST / TELNET / RLOGIN, etc) so you can see who is connecting
  2492. out from your system, and to where, e.g. for security auditing.
  2493. Level 2 and 3 records are equivalent to those in the connection log;
  2494. see the [361]C-Kermit 7.0 Supplement) for a detailed description of the
  2495. connection log.
  2496. 16. BUILDING SECURE VERSIONS OF C-KERMIT 8.0
  2497. [ [362]Top ] [ [363]Contents ] [ [364]Next ] [ [365]Previous ]
  2498. C-Kermit 7.0 and later may be built with Kerberos(TM) and/or SRP(TM)
  2499. (Secure Remote Password) and/or SSL/TLS security for strong
  2500. authentication and encryption of Internet connections. These security
  2501. methods require external libraries that, in their binary forms, are
  2502. restricted from export by USA law. See the [366]Kermit Security
  2503. Reference) for details. C-Kermit binaries themselves are likewise
  2504. restricted; the C-Kermit binaries that are available for public
  2505. download on the Internet are not allowed to contain the security
  2506. options.
  2507. Sample makefile entries are provided for Linux and many other operating
  2508. systems. A list of secure makefile entries is included in the Makefile.
  2509. Complete instructions on building C-Kermit 8.0 with MIT Kerberos;
  2510. Secure Remote Password; and/or OpenSSL can be found in the [367]Kermit
  2511. Security Reference.
  2512. SSL/TLS and Kerberos builds are increasingly problematic with the
  2513. "deprecation" of DES. There is code to detect the presence or absence
  2514. of DES in the OpenSSL builds, but it doesn't always work because
  2515. sometimes the SSL libraries are present but routines are missing from
  2516. them.
  2517. * First of all remember that if your SSL and/or Kerberos header files
  2518. and libraries are not in the default place, you'll need to override
  2519. the assumed paths. To find out what the default places are type
  2520. "make show", e.g.:
  2521. [~/kermit] make show
  2522. prefix=/usr/local
  2523. srproot=/usr/local
  2524. sslroot=/usr/local
  2525. manroot=/usr/local
  2526. K4LIB=-L/usr/kerberos/lib
  2527. K4INC=-I/usr/kerberos/include
  2528. K5LIB=-L/usr/kerberos/lib
  2529. K5INC=-I/usr/kerberos/include
  2530. SRPLIB=-L/usr/local/lib
  2531. SRPINC=-I/usr/local/include
  2532. SSLLIB=-L/usr/local/ssl/lib
  2533. SSLINC=-I/usr/local/ssl/include
  2534. [~/kermit]
  2535. * You can override any or all of these by putting assignments on the
  2536. 'make' command line; examples:
  2537. make linux+krb5 \
  2538. "K5INC=-I/usr/include/" \
  2539. "K5LIB=-L/usr/lib64/"
  2540. make solaris9g+ssl \
  2541. "SSLLIB=-L/opt/openssl-0.9.8q/lib" \
  2542. "SSLINC=-I/opt/openssl-0.9.8q/include"
  2543. Or by setting and exporting environment variables prior to giving
  2544. the 'make' command, as in this example in which (after Beta.01 was
  2545. uploaded) C-Kermit was successfully linked with OpenSSL 1.0.0d,
  2546. which was installed alongside OpenSSL 0.9.8r on the same computer.
  2547. Note the use of the '-i' option instead of '-I' to force gcc to
  2548. include the right header files (thanks to Nelson Beebe for this):
  2549. export PATH=/usr/bin:$PATH
  2550. export SSLINC=-isystem/usr/include
  2551. export "SSLLIB=-L/usr/lib -Wl,-rpath,/usr/lib"
  2552. make linux+ssl
  2553. -i is explained in 'man gcc'; there is a change in what -I does
  2554. that could have ramifications for many makefile targets, not just
  2555. Kermit. And -Wl and -rpath are explained in 'man ld'; the idea is
  2556. build a binary from which useful reports can be obtained with ldd.
  2557. * Building with OpenSSL versions prior to 0.9.7 doesn't work, even
  2558. though C-Kermit is designed to work with both the old and new
  2559. versions. This could probably be fixed if anybody cares.
  2560. * If a Kerberos or SSL build fails at link time because
  2561. des_ecb3_encrypt, des_random_seed, and/or des_set_odd_parity come
  2562. up missing, redo the build with -UCK_DES:
  2563. make netbsd+krb5+ssl \
  2564. "K5INC=-I/usr/local/include" \
  2565. "K5LIB=-L/usr/local/kerblib" KFLAGS=-UCK_DES
  2566. I suppose all the SSL and Kerberos targets could be recoded to
  2567. figure this out automatically (i.e. that DES is installed but with
  2568. some entry points missing), but it wouldn't be pretty.
  2569. * Different Kerberos and OpenSSL distributions can be installed with
  2570. different options; certain libraries might be missing or named
  2571. differently (for example, libgssapi vs libgssapi_krb5). Some, but
  2572. not all, of the C-Kermit makefile targets have been fixed to take
  2573. some of these variations into account by testing for them, most
  2574. notably the linux ones, linux+ssl, linux+krb5, and linux+krb5+ssl.
  2575. Probably every target that builds with OpenSSL or Kerberos needs
  2576. the same treatment but I won't have time.
  2577. * Why doesn't C-Kermit just use Autoconf? Mainly because the makefile
  2578. is full of targets for platforms that don't have Autoconf or any
  2579. other tool like it. (Another reason is that I've always preferred
  2580. that Kermit have the least dependencies possible on external
  2581. toolsets.) Perhaps certain targets could be converted to use them,
  2582. especially Linux because there are so many variations among
  2583. distributions and versions. Anybody who wants to make, say, an
  2584. Autoconf-based Linux target, be my guest, but bear in mind that one
  2585. Linux target is supposed to work for all versions and distributions
  2586. of Linux on all platforms. Well, one target for Linux by itself,
  2587. another for Linux with OpenSSL, another for Linux with Kerberos 5,
  2588. and another for Linux with Kerberos 5 and OpenSSL. Each of these is
  2589. supposed to work on any Linux version with any version of
  2590. Kerberos 5 or OpenSSL.
  2591. Also note that Kerberos support is for the MIT version only, Heimdal
  2592. and others are not supported (never have been). Of course anybody can
  2593. pitch in and add or improve support for whatever they want.
  2594. 17. INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
  2595. [ [368]Top ] [ [369]Contents ] [ [370]Previous ]
  2596. This requires C-Kermit 8.0.206 or later and an SSH v2 server. If you
  2597. list C-Kermit as a Subsystem in the SSH v2 server configuration file
  2598. (as, for example, SFTP is listed), users can make SSH connections
  2599. direct to a Kermit server as explained here:
  2600. [371]http://www.columbia.edu/kermit/skermit.html
  2601. The name and location of the SSH server configuration file depends on
  2602. your platform, which SSH product(s) you have, etc. C-Kermit itself must
  2603. be referred to in this file as "kermit-sshsub". On the host, install
  2604. the C-Kermit 8.0.211 binary in the normal way. Then, in the same
  2605. directory as the C-Kermit binary, make a symbolic link:
  2606. ln -s kermit kermit-sshsub
  2607. (Note: the "make install" makefile target does this for you.) Then in
  2608. the sshd configuration file, add a line:
  2609. Subsystem kermit /some/path/kermit-sshsub
  2610. (where /some/path is the fully specified directory where the symlink
  2611. is.) This is similar to the line that sets up the SFTP subsystem.
  2612. Example:
  2613. Subsystem sftp /usr/local/libexec/sftp-server
  2614. Subsystem kermit /usr/local/bin/kermit-sshsub
  2615. The mechanics might vary for other SSH servers; "man sshd" for details.
  2616. The method shown here is used because the OpenSSH server does not
  2617. permit the subsystem invocation to include command-line options.
  2618. C-Kermit would have no way of knowing that it should enter Server mode
  2619. if it were not called by a special name.
  2620. [ [372]Top ] [ [373]Contents ] [ [374]C-Kermit Home ] [ [375]C-Kermit
  2621. 9.0 Overview ] [ [376]Kermit Home ]
  2622. __________________________________________________________________
  2623. C-Kermit 9.0 Unix Installation Instructions / The Kermit Project /
  2624. Columbia University / 30 June 2011
  2625. References
  2626. 1. http://www.columbia.edu/
  2627. 2. mailto:kermit@columbia.edu
  2628. 3. http://www.columbia.edu/kermit/index.html
  2629. 4. http://www.columbia.edu/kermit/k95.html
  2630. 5. http://www.columbia.edu/kermit/ckermit.html
  2631. 6. http://www.columbia.edu/kermit/ckscripts.html
  2632. 7. http://www.columbia.edu/kermit/current.html
  2633. 8. http://www.columbia.edu/kermit/whatsnew.html
  2634. 9. http://www.columbia.edu/kermit/faq.html
  2635. 10. http://www.columbia.edu/kermit/support.html
  2636. 11. http://www.columbia.edu/kermit/ckuins.html#contents
  2637. 12. http://www.columbia.edu/kermit/ckermit.html
  2638. 13. http://www.columbia.edu/kermit/index.html
  2639. 14. http://www.columbia.edu/kermit/ckuins.html
  2640. 15. http://www.columbia.edu/kermit/ckuins.html#x0
  2641. 16. http://www.columbia.edu/kermit/ckuins.html#x1
  2642. 17. http://www.columbia.edu/kermit/ckuins.html#x2
  2643. 18. http://www.columbia.edu/kermit/ckuins.html#x3
  2644. 19. http://www.columbia.edu/kermit/ckuins.html#x4
  2645. 20. http://www.columbia.edu/kermit/ckuins.html#x5
  2646. 21. http://www.columbia.edu/kermit/ckuins.html#x6
  2647. 22. http://www.columbia.edu/kermit/ckuins.html#x7
  2648. 23. http://www.columbia.edu/kermit/ckuins.html#x8
  2649. 24. http://www.columbia.edu/kermit/ckuins.html#x9
  2650. 25. http://www.columbia.edu/kermit/ckuins.html#x10
  2651. 26. http://www.columbia.edu/kermit/ckuins.html#x11
  2652. 27. http://www.columbia.edu/kermit/ckuins.html#x12
  2653. 28. http://www.columbia.edu/kermit/ckuins.html#x13
  2654. 29. http://www.columbia.edu/kermit/ckuins.html#x14
  2655. 30. http://www.columbia.edu/kermit/ckuins.html#x15
  2656. 31. http://www.columbia.edu/kermit/ckuins.html#x16
  2657. 32. http://www.columbia.edu/kermit/ckuins.html#x17
  2658. 33. http://www.columbia.edu/kermit/ckuins.html#top
  2659. 34. http://www.columbia.edu/kermit/ckuins.html#contents
  2660. 35. http://www.columbia.edu/kermit/ckuins.html#x1
  2661. 36. http://www.columbia.edu/kermit/ckccfg.html
  2662. 37. http://www.columbia.edu/kermit/ckcbwr.html
  2663. 38. http://www.columbia.edu/kermit/ckubwr.html
  2664. 39. http://www.columbia.edu/kermit/ckcplm.html
  2665. 40. http://www.columbia.edu/kermit/ckuins.html#x2
  2666. 41. http://www.columbia.edu/kermit/ckuins.html#x3
  2667. 42. http://www.columbia.edu/kermit/ckuins.html#x4
  2668. 43. http://www.columbia.edu/kermit/ckuins.html#top
  2669. 44. http://www.columbia.edu/kermit/ckuins.html#contents
  2670. 45. http://www.columbia.edu/kermit/ckuins.html#x2
  2671. 46. http://www.columbia.edu/kermit/ckuins.html#x0
  2672. 47. ftp://www.columbia.edu/kermit/archives/cku211.tar.Z
  2673. 48. ftp://www.columbia.edu/kermit/archives/cku211.tar.gz
  2674. 49. http://kermit.columbia.edu/ftp/archives/cku211.tar.Z
  2675. 50. http://kermit.columbia.edu/ftp/archives/cku211.tar.gz
  2676. 51. ftp://www.columbia.edu/kermit/archives/cku211.tar
  2677. 52. http://kermit.columbia.edu/ftp/archives/cku211.tar
  2678. 53. http://www.columbia.edu/kermit/ckuins.html#x7
  2679. 54. http://www.columbia.edu/kermit/ckuins.html#x5
  2680. 55. http://www.columbia.edu/kermit/ckuins.html#x5
  2681. 56. http://www.columbia.edu/kermit/ckuins.html#x16
  2682. 57. http://www.columbia.edu/kermit/ckuins.html#top
  2683. 58. http://www.columbia.edu/kermit/ckuins.html#contents
  2684. 59. http://www.columbia.edu/kermit/ckuins.html#x3
  2685. 60. http://www.columbia.edu/kermit/ckuins.html#x1
  2686. 61. http://www.columbia.edu/kermit/ckuins.html#x5
  2687. 62. http://www.columbia.edu/kermit/ckuins.html#X10
  2688. 63. http://www.columbia.edu/kermit/ckuins.html#x11
  2689. 64. http://www.columbia.edu/kermit/ckuins.html#x10
  2690. 65. http://www.columbia.edu/kermit/ckuins.html#x3
  2691. 66. http://www.columbia.edu/kermit/ck80packages.html
  2692. 67. http://www.columbia.edu/kermit/ckuins.html#x10
  2693. 68. http://www.columbia.edu/kermit/ckuins.html#top
  2694. 69. http://www.columbia.edu/kermit/ckuins.html#contents
  2695. 70. http://www.columbia.edu/kermit/ckuins.html#x4
  2696. 71. http://www.columbia.edu/kermit/ckuins.html#x2
  2697. 72. ftp://www.columbia.edu/kermit/bin/
  2698. 73. http://www.columbia.edu/kermit/ck80binaries.html
  2699. 74. http://www.columbia.edu/kermit/ckuins.html#x7
  2700. 75. http://www.columbia.edu/kermit/ckuins.html#build
  2701. 76. http://www.columbia.edu/kermit/ckuins.html#x5
  2702. 77. http://www.columbia.edu/kermit/ckuins.html#x4
  2703. 78. http://www.columbia.edu/kermit/ckfaq.html#version
  2704. 79. http://www.columbia.edu/kermit/ckuins.html#x4
  2705. 80. mailto:kermit@columbia.edu
  2706. 81. http://www.columbia.edu/kermit/ckuins.html#top
  2707. 82. http://www.columbia.edu/kermit/ckuins.html#contents
  2708. 83. http://www.columbia.edu/kermit/ckuins.html#x5
  2709. 84. http://www.columbia.edu/kermit/ckuins.html#x3
  2710. 85. http://www.columbia.edu/kermit/ckuins.html#x8
  2711. 86. http://www.columbia.edu/kermit/ckuins.html#x9
  2712. 87. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2713. 88. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
  2714. 89. ftp://kermit.columbia.edu/kermit/c-kermit/ckubsd.mak
  2715. 90. http://www.columbia.edu/kermit/ckuins.html#x5
  2716. 91. mailto:kermit-support@columbia.edu
  2717. 92. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2718. 93. http://www.columbia.edu/kermit/ckuins.html#x7
  2719. 94. mailto:kermit-support@columbia.edu
  2720. 95. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2721. 96. http://www.columbia.edu/kermit/ckuins.html#x5.4
  2722. 97. http://www.columbia.edu/kermit/ckuins.html#x10
  2723. 98. http://www.columbia.edu/kermit/ckuins.html#x11
  2724. 99. http://www.columbia.edu/kermit/ckuins.html#x5
  2725. 100. http://www.columbia.edu/kermit/iksd.html
  2726. 101. http://www.columbia.edu/kermit/ckuins.html#top
  2727. 102. http://www.columbia.edu/kermit/ckuins.html#contents
  2728. 103. http://www.columbia.edu/kermit/ckuins.html#x4.1
  2729. 104. http://www.columbia.edu/kermit/ckccfg.html
  2730. 105. http://www.columbia.edu/kermit/ckuins.html#x4.1
  2731. 106. http://www.columbia.edu/kermit/ckuins.html#x4.2
  2732. 107. http://www.columbia.edu/kermit/ckuins.html#x4.3
  2733. 108. http://www.columbia.edu/kermit/ckuins.html#x4.4
  2734. 109. http://www.columbia.edu/kermit/ckuins.html#x4.5
  2735. 110. http://www.columbia.edu/kermit/ckccfg.html
  2736. 111. http://www.columbia.edu/kermit/ckccfg.html#x8
  2737. 112. http://www.columbia.edu/kermit/iksd.html
  2738. 113. http://www.columbia.edu/kermit/iksd.html
  2739. 114. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2740. 115. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2741. 116. mailto:kermit-support@columbia.edu
  2742. 117. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
  2743. 118. http://www.columbia.edu/kermit/ckuins.html#x15
  2744. 119. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2745. 120. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2746. 121. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2747. 122. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2748. 123. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
  2749. 124. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
  2750. 125. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2751. 126. ftp://kermit.columbia.edu/kermit/c-kermit/ckcuni.c
  2752. 127. mailto:kermit-support@columbia.edu
  2753. 128. http://www.columbia.edu/kermit/ckuins.html#top
  2754. 129. http://www.columbia.edu/kermit/ckuins.html#contents
  2755. 130. http://www.columbia.edu/kermit/ckuins.html#x4
  2756. 131. http://www.columbia.edu/kermit/ckuins.html#x4.2
  2757. 132. http://www.columbia.edu/kermit/ckuins.html#x4.0
  2758. 133. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2759. 134. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
  2760. 135. http://www.columbia.edu/kermit/ckubwr.html
  2761. 136. ftp://kermit.columbia.edu/kermit/c-kermit/ckwart.c
  2762. 137. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
  2763. 138. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.c
  2764. 139. http://www.columbia.edu/kermit/ckuins.html#top
  2765. 140. http://www.columbia.edu/kermit/ckuins.html#contents
  2766. 141. http://www.columbia.edu/kermit/ckuins.html#x4
  2767. 142. http://www.columbia.edu/kermit/ckuins.html#x4.3
  2768. 143. http://www.columbia.edu/kermit/ckuins.html#x4.1
  2769. 144. http://www.columbia.edu/kermit/ckuins.html#x5
  2770. 145. http://www.columbia.edu/kermit/ckuins.html#top
  2771. 146. http://www.columbia.edu/kermit/ckuins.html#contents
  2772. 147. http://www.columbia.edu/kermit/ckuins.html#x4
  2773. 148. http://www.columbia.edu/kermit/ckuins.html#x4.4
  2774. 149. http://www.columbia.edu/kermit/ckuins.html#x4.2
  2775. 150. http://www.columbia.edu/kermit/ckuins.html#top
  2776. 151. http://www.columbia.edu/kermit/ckuins.html#contents
  2777. 152. http://www.columbia.edu/kermit/ckuins.html#x4
  2778. 153. http://www.columbia.edu/kermit/ckuins.html#x4.5
  2779. 154. http://www.columbia.edu/kermit/ckuins.html#x4.3
  2780. 155. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
  2781. 156. http://www.columbia.edu/kermit/ckuins.html#top
  2782. 157. http://www.columbia.edu/kermit/ckuins.html#contents
  2783. 158. http://www.columbia.edu/kermit/ckuins.html#x4
  2784. 159. http://www.columbia.edu/kermit/ckuins.html#x4.4
  2785. 160. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2786. 161. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2787. 162. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
  2788. 163. http://www.columbia.edu/kermit/ckuins.html#top
  2789. 164. http://www.columbia.edu/kermit/ckuins.html#contents
  2790. 165. http://www.columbia.edu/kermit/ckuins.html#x6
  2791. 166. http://www.columbia.edu/kermit/ckuins.html#x4
  2792. 167. http://www.columbia.edu/kermit/ckuins.html#x5.1
  2793. 168. http://www.columbia.edu/kermit/ckuins.html#x5.2
  2794. 169. http://www.columbia.edu/kermit/ckuins.html#x5.3
  2795. 170. http://www.columbia.edu/kermit/ckuins.html#x5.4
  2796. 171. http://www.columbia.edu/kermit/
  2797. 172. http://www.columbia.edu/kermit/ckuins.html#x5.4
  2798. 173. http://www.columbia.edu/kermit/ckuins.html#x5.3
  2799. 174. ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
  2800. 175. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit.ini
  2801. 176. http://www.columbia.edu/kermit/ckuins.html#x5.1
  2802. 177. ftp://kermit.columbia.edu/kermit/c-kermit/ckermod.ini
  2803. 178. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit70.txt
  2804. 179. http://www.columbia.edu/kermit/ck60manual.html
  2805. 180. http://www.columbia.edu/kermit/ckermit70.html
  2806. 181. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit80.txt
  2807. 182. http://www.columbia.edu/kermit/ck60manual.html
  2808. 183. http://www.columbia.edu/kermit/ckermit80.html
  2809. 184. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit90.txt
  2810. 185. http://www.columbia.edu/kermit/ck60manual.html
  2811. 186. http://www.columbia.edu/kermit/ckermit90.html
  2812. 187. ftp://kermit.columbia.edu/kermit/c-kermit/ckcbwr.txt
  2813. 188. http://www.columbia.edu/kermit/ckcbwr.html
  2814. 189. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
  2815. 190. http://www.columbia.edu/kermit/ckubwr.html
  2816. 191. ftp://kermit.columbia.edu/kermit/c-kermit/ckuins.txt
  2817. 192. http://www.columbia.edu/kermit/ckuins.html
  2818. 193. ftp://kermit.columbia.edu/kermit/c-kermit/ckccfg.txt
  2819. 194. http://www.columbia.edu/kermit/ckccfg.html
  2820. 195. ftp://kermit.columbia.edu/kermit/c-kermit/ckcplm.txt
  2821. 196. http://www.columbia.edu/kermit/ckcplm.html
  2822. 197. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
  2823. 198. http://www.columbia.edu/kermit/ckuins.html#x16"
  2824. 199. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
  2825. 200. http://www.columbia.edu/kermit/ckuins.html#x?
  2826. 201. http://www.columbia.edu/kermit/ckuins.html#x11
  2827. 202. http://www.columbia.edu/kermit/ckuins.html#x5.2
  2828. 203. http://www.columbia.edu/kermit/ckermit.html#download
  2829. 204. http://www.columbia.edu/kermit/ckbinaries.html
  2830. 205. http://www.columbia.edu/kermit/ckermit.html#download
  2831. 206. http://www.columbia.edu/kermit/ckuins.html#top
  2832. 207. http://www.columbia.edu/kermit/ckuins.html#contents
  2833. 208. http://www.columbia.edu/kermit/ckuins.html#x7
  2834. 209. http://www.columbia.edu/kermit/ckuins.html#x5
  2835. 210. http://www.columbia.edu/kermit/ckuins.html#top
  2836. 211. http://www.columbia.edu/kermit/ckuins.html#contents
  2837. 212. http://www.columbia.edu/kermit/ckuins.html#x8
  2838. 213. http://www.columbia.edu/kermit/ckuins.html#x6
  2839. 214. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2840. 215. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2841. 216. http://www.columbia.edu/kermit/ckuins.html#x4.0
  2842. 217. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  2843. 218. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2844. 219. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2845. 220. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2846. 221. http://www.columbia.edu/kermit/ckuins.html#x10
  2847. 222. http://www.columbia.edu/kermit/ckccfg.html#x2
  2848. 223. http://www.columbia.edu/kermit/ckccfg.html
  2849. 224. http://www.columbia.edu/kermit/ckuins.html#x4
  2850. 225. http://www.columbia.edu/kermit/ckuins.html#x10
  2851. 226. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2852. 227. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2853. 228. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2854. 229. http://www.columbia.edu/kermit/ckuins.html#x9.4
  2855. 230. mailto:kermit-support@columbia.edu
  2856. 231. http://www.columbia.edu/kermit/ckuins.html#top
  2857. 232. http://www.columbia.edu/kermit/ckuins.html#contents
  2858. 233. http://www.columbia.edu/kermit/ckuins.html#x9
  2859. 234. http://www.columbia.edu/kermit/ckuins.html#x7
  2860. 235. http://www.columbia.edu/kermit/ckccfg.html
  2861. 236. http://www.columbia.edu/kermit/ckccfg.html
  2862. 237. http://www.columbia.edu/kermit/ckuins.html#top
  2863. 238. http://www.columbia.edu/kermit/ckuins.html#contents
  2864. 239. http://www.columbia.edu/kermit/ckuins.html#x10
  2865. 240. http://www.columbia.edu/kermit/ckuins.html#x8
  2866. 241. http://www.columbia.edu/kermit/ckuins.html#x9.1
  2867. 242. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  2868. 243. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
  2869. 244. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
  2870. 245. http://www.columbia.edu/kermit/ckuins.html#x9.2
  2871. 246. http://www.columbia.edu/kermit/ckuins.html#x9.3
  2872. 247. http://www.columbia.edu/kermit/ckuins.html#x9.4
  2873. 248. http://www.columbia.edu/kermit/ckuins.html#x9.5
  2874. 249. http://www.columbia.edu/kermit/ckuins.html#x9.6
  2875. 250. http://www.columbia.edu/kermit/ckuins.html#x9.7
  2876. 251. http://www.columbia.edu/kermit/ckuins.html#x9.8
  2877. 252. http://www.columbia.edu/kermit/ckuins.html#x9.9
  2878. 253. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2879. 254. http://www.columbia.edu/kermit/ckuins.html#top
  2880. 255. http://www.columbia.edu/kermit/ckuins.html#x9
  2881. 256. http://www.columbia.edu/kermit/ckuins.html#contents
  2882. 257. http://www.columbia.edu/kermit/ckuins.html#x9.2
  2883. 258. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  2884. 259. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
  2885. 260. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
  2886. 261. http://www.columbia.edu/kermit/ckuins.html#top
  2887. 262. http://www.columbia.edu/kermit/ckuins.html#contents
  2888. 263. http://www.columbia.edu/kermit/ckuins.html#x9
  2889. 264. http://www.columbia.edu/kermit/ckuins.html#x9.1
  2890. 265. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
  2891. 266. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  2892. 267. http://www.columbia.edu/kermit/ckuins.html#top
  2893. 268. http://www.columbia.edu/kermit/ckuins.html#contents
  2894. 269. http://www.columbia.edu/kermit/ckuins.html#x9
  2895. 270. http://www.columbia.edu/kermit/ckuins.html#x9.1
  2896. 271. http://www.columbia.edu/kermit/ckuins.html#x9.2
  2897. 272. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
  2898. 273. http://www.opengroup.org/onlinepubs/007904975/
  2899. 274. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
  2900. 275. http://www.columbia.edu/kermit/ckuins.html#top
  2901. 276. http://www.columbia.edu/kermit/ckuins.html#contents
  2902. 277. http://www.columbia.edu/kermit/ckuins.html#x9
  2903. 278. http://www.columbia.edu/kermit/ckuins.html#x9.1
  2904. 279. http://www.columbia.edu/kermit/ckuins.html#x9.3
  2905. 280. http://www.columbia.edu/kermit/ckuins.html#x9.1
  2906. 281. http://www.columbia.edu/kermit/ckuins.html#top
  2907. 282. http://www.columbia.edu/kermit/ckuins.html#contents
  2908. 283. http://www.columbia.edu/kermit/ckuins.html#x9
  2909. 284. http://www.columbia.edu/kermit/ckuins.html#x9.4
  2910. 285. http://www.columbia.edu/kermit/ckuins.html#x9.2
  2911. 286. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2912. 287. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2913. 288. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2914. 289. http://www.columbia.edu/kermit/ckuins.html#top
  2915. 290. http://www.columbia.edu/kermit/ckuins.html#contents
  2916. 291. http://www.columbia.edu/kermit/ckuins.html#x9
  2917. 292. http://www.columbia.edu/kermit/ckuins.html#x9.5
  2918. 293. http://www.columbia.edu/kermit/ckuins.html#x9.3
  2919. 294. http://www.columbia.edu/kermit/cable.html
  2920. 295. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2921. 296. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  2922. 297. http://www.columbia.edu/kermit/ckuins.html#top
  2923. 298. http://www.columbia.edu/kermit/ckuins.html#contents
  2924. 299. http://www.columbia.edu/kermit/ckuins.html#x9
  2925. 300. http://www.columbia.edu/kermit/ckuins.html#x9.6
  2926. 301. http://www.columbia.edu/kermit/ckuins.html#x9.4
  2927. 302. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  2928. 303. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c
  2929. 304. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2930. 305. http://www.columbia.edu/kermit/ckuins.html#top
  2931. 306. http://www.columbia.edu/kermit/ckuins.html#contents
  2932. 307. http://www.columbia.edu/kermit/ckuins.html#x9
  2933. 308. http://www.columbia.edu/kermit/ckuins.html#x9.7
  2934. 309. http://www.columbia.edu/kermit/ckuins.html#x9.5
  2935. 310. http://www.columbia.edu/kermit/ckuins.html#top
  2936. 311. http://www.columbia.edu/kermit/ckuins.html#contents
  2937. 312. http://www.columbia.edu/kermit/ckuins.html#x9
  2938. 313. http://www.columbia.edu/kermit/ckuins.html#x9.8
  2939. 314. http://www.columbia.edu/kermit/ckuins.html#x9.6
  2940. 315. http://www.columbia.edu/kermit/ckuins.html#top
  2941. 316. http://www.columbia.edu/kermit/ckuins.html#contents
  2942. 317. http://www.columbia.edu/kermit/ckuins.html#x9
  2943. 318. http://www.columbia.edu/kermit/ckuins.html#x9.9
  2944. 319. http://www.columbia.edu/kermit/ckuins.html#x9.7
  2945. 320. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2946. 321. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2947. 322. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
  2948. 323. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2949. 324. http://www.columbia.edu/kermit/ckuins.html#top
  2950. 325. http://www.columbia.edu/kermit/ckuins.html#contents
  2951. 326. http://www.columbia.edu/kermit/ckuins.html#x9
  2952. 327. http://www.columbia.edu/kermit/ckuins.html#x10
  2953. 328. http://www.columbia.edu/kermit/ckuins.html#x9.8
  2954. 329. http://www.columbia.edu/kermit/ckuins.html#top
  2955. 330. http://www.columbia.edu/kermit/ckuins.html#contents
  2956. 331. http://www.columbia.edu/kermit/ckuins.html#x11
  2957. 332. http://www.columbia.edu/kermit/ckuins.html#x9
  2958. 333. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2959. 334. http://www.columbia.edu/kermit/ckuins.html#x11
  2960. 335. http://www.columbia.edu/kermit/ckuins.html#top
  2961. 336. http://www.columbia.edu/kermit/ckuins.html#contents
  2962. 337. http://www.columbia.edu/kermit/ckuins.html#x12
  2963. 338. http://www.columbia.edu/kermit/ckuins.html#x10
  2964. 339. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2965. 340. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
  2966. 341. http://www.columbia.edu/kermit/ckuins.html#top
  2967. 342. http://www.columbia.edu/kermit/ckuins.html#contents
  2968. 343. http://www.columbia.edu/kermit/ckuins.html#x13
  2969. 344. http://www.columbia.edu/kermit/ckuins.html#x11
  2970. 345. http://www.columbia.edu/kermit/ckuins.html#top
  2971. 346. http://www.columbia.edu/kermit/ckuins.html#contents
  2972. 347. http://www.columbia.edu/kermit/ckuins.html#x14
  2973. 348. http://www.columbia.edu/kermit/ckuins.html#x12
  2974. 349. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
  2975. 350. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
  2976. 351. http://www.columbia.edu/kermit/ckuins.html#top
  2977. 352. http://www.columbia.edu/kermit/ckuins.html#contents
  2978. 353. http://www.columbia.edu/kermit/ckuins.html#x15
  2979. 354. http://www.columbia.edu/kermit/ckuins.html#x13
  2980. 355. http://www.columbia.edu/kermit/ckuins.html#top
  2981. 356. http://www.columbia.edu/kermit/ckuins.html#contents
  2982. 357. http://www.columbia.edu/kermit/ckuins.html#x16
  2983. 358. http://www.columbia.edu/kermit/ckuins.html#x14
  2984. 359. http://www.columbia.edu/kermit/uiksd.html#x4.2
  2985. 360. http://www.columbia.edu/kermit/uiksd.html
  2986. 361. http://www.columbia.edu/kermit/ckermit2.html
  2987. 362. http://www.columbia.edu/kermit/ckuins.html#top
  2988. 363. http://www.columbia.edu/kermit/ckuins.html#contents
  2989. 364. http://www.columbia.edu/kermit/ckuins.html#x17
  2990. 365. http://www.columbia.edu/kermit/ckuins.html#x15
  2991. 366. http://www.columbia.edu/kermit/security.html
  2992. 367. http://www.columbia.edu/kermit/security80.html
  2993. 368. http://www.columbia.edu/kermit/ckuins.html#top
  2994. 369. http://www.columbia.edu/kermit/ckuins.html#contents
  2995. 370. http://www.columbia.edu/kermit/ckuins.html#x16
  2996. 371. http://www.columbia.edu/kermit/skermit.html
  2997. 372. http://www.columbia.edu/kermit/ckuins.html#top
  2998. 373. http://www.columbia.edu/kermit/ckuins.html#contents
  2999. 374. http://www.columbia.edu/kermit/ckermit.html
  3000. 375. http://www.columbia.edu/kermit/ck90updates.html
  3001. 376. http://www.columbia.edu/kermit/index.html