home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit4f / ckuker.bwr < prev    next >
Text File  |  2020-01-01  |  36KB  |  912 lines

  1. C-Kermit Version 4F(091):
  2. Status, Bugs, and Problems
  3. As of: Sat Aug  5 16:47:20 1989
  4.  
  5. See the file ckuker.upd for a history of the changes that were made and
  6. bugs that were fixed in each release.
  7.  
  8.  
  9. BUILDING C-KERMIT
  10.  
  11. See the file ckuker.mak for instructions on building C-Kermit for different
  12. UNIX systems.  To use the ckuker.mak file, rename it to "makefile" or
  13. "Makefile", and give the UNIX command "make xxx", where "xxx" designates which
  14. kind of system you want to build C-Kermit for, e.g. "make bsd", "make xenix".
  15.  
  16. ON PC's...  If you have received C-Kermit on MS-DOS format diskettes (such as
  17. those distributed by Columbia), you should make sure that your DOS-to-UNIX
  18. conversion utility both: (1) changes line terminators in all files from
  19. carriage-return linefeed (CRLF) to just linefeed (LF) and remove any Ctrl-Z's,
  20. and (2) that all filenames are converted from uppercase to lowercase.  You
  21. can use the following shell script to do this:
  22. ---(cut here)---
  23. #!/bin/sh
  24. #
  25. # Shell script to convert C-Kermit DOS-format files into Unix format.
  26. # Lowercases the filenames, strips out carriage returns and Ctrl-Z's.
  27. #
  28. x=$1    # the name of the source directory
  29. y=$2    # the name of the target directory
  30. if [ $# -lt 2 ]; then
  31.   echo "usage: $0 source-directory target-directory"
  32.   exit 1
  33. fi
  34. if cd $1 ; then
  35.   echo "Converting $1 files into $2"
  36. else
  37.   echo "$0: cannot cd to $1"
  38.   exit 1
  39. fi
  40. for i in *; do
  41.   j=`echo $i | tr 'A-Z' 'a-z'`
  42.   echo $x/$i =\> $y/$j
  43.   tr -d '\015\032' < $i > $y/$j
  44. done
  45. ---(cut here)---
  46. Cut out this shell script, save it as "convert.sh" (or any other name you
  47. prefer), then "chmod +x convert.sh".  Then, create a new, empty directory
  48. to put the converted files in, and then "convert.sh /xxx /yyy" where /xxx
  49. is the name of the directory where the PC-format files are, and /yyy is the
  50. name of the new, empty directory.  The converted files will appear in the
  51. new directory.
  52.  
  53. ------------------------------
  54.  
  55. Date: Wed, 26 Jul 89 21:32:01 MDT
  56. From: b-davis%cai@cs.utah.edu (Brad Davis)
  57. To: fdc@watsun.cc.columbia.edu
  58. Subject: Minor fix to C-Kermit 4F(085).
  59.  
  60. Doing a make bsd43, I had to comment out the extra #include's in ckutio.c
  61. marked below.  Both files seem to be included somewhere else.
  62.  
  63. /* Whether to #include <sys/file.h>... */
  64. #ifndef PROVX1
  65. #ifndef aegis
  66. #ifndef XENIX
  67. #ifndef unos
  68. #include <sys/file.h>                   /* File information */
  69. #endif /* unos */
  70. #endif /* xenix */
  71. #endif /* aegis */
  72. #endif /* provx1 */
  73.  
  74. #ifdef aegis
  75. /* #include <sys/file.h> */
  76. #include <fcntl.h>
  77. #endif /* aegis */
  78.  
  79. #ifdef BSD4
  80. /*#include <sys/file.h>*/        ------ Remove ------
  81. /*#include <fcntl.h>*/            ------ Remove ------
  82. #endif /* BSD4 */
  83.  
  84. Brad Davis
  85. University of Utah
  86.  
  87. ------------------------------
  88.  
  89. C-Kermit can also be built for VAX/VMS -- see the files ckv*.com and
  90. ckvker.bwr for further information.  Similarly for the Apple Macintosh
  91. (ckm*.*), Commodore Amiga (cki*.*), Data General AOS/VS (ckd*.*), etc.  This
  92. file applies only to the UNIX versions.
  93.  
  94. Following are hints, beyond what might be found in ckuker.mak, about building
  95. C-Kermit for various UNIX systems.
  96.  
  97. HP Integral PC -- "make sys3", but either remove code that sets up lock files,
  98. or have the lock files put in a directory that is guaranteed to be there,
  99. like /tmp.  Some problems reported when running under csh.
  100.  
  101. Most System V or System III based systems can build a working Kermit with
  102. "make sys3" or "make sys3nid" or "make att3bx" or (for Sys 5 R3) "make
  103. sys5r3".
  104.  
  105. Xenix variations of System III/V have their own makefile entries, "make
  106. xenix", "make sco286", etc.
  107.  
  108. AT&T System V R3 has redefined the type of the signal() function.  Use
  109. "make sys5r3".  If that doesn't work (as reportedly it does not on certain
  110. recent Xenix systems), "make sys3" or "make xenix".
  111.  
  112. AT&T 7300 has its own make option, "make sys3upc" as of 4E(068), to allow
  113. operation with its internal modem and system support thereof.
  114.  
  115. PDP-11's running a System III or V based Unix and which have no I & D space
  116. should use "make sys3nid".
  117.  
  118. DEC Pro-350 or -380 with Pro/Venix V2 (not V1) -- uses the regular "make sys3"
  119. or "make sys3nid", but the file ckufio.c might have to be edited first to
  120. reduce the value of MAXWLD and/or SSPACE.  See below under HINTS for details.
  121.  
  122. Valid Scaldstar CAD system -- There's a "make valid" in the makefile, but
  123. reportedly one thing is still lacking: ckutio.c needs to #include<sys/file.h>.
  124.  
  125. -- HINTS --
  126.  
  127. - If the program dies with a message like "malloc fails in splitpath()"
  128.   whenever it tries to parse a filename (as in the "send" command), then
  129.   the amount of space allocated for filename expansion in the module
  130.   ckufio.c must be reduced.  This can be done by changing the #defines
  131.   for MAXWLD (the maximum number of filenames) and SSPACE (the size of
  132.   static string space) to make the numbers smaller.
  133.  
  134. - When modifying or writing Kermit code, do not pass to a function
  135.   (e.g., "signal") the address of a static function.  Doing so may
  136.   break VENIX code mapping.  If you must pass the address of the
  137.   function, make it global and pick a "non-generic" name for it that
  138.   will hopefully be unique and yet informative.
  139.  
  140.  
  141. -- BUG LIST --
  142.  
  143. *** 4F(089) is a field test, not formally released ***
  144.  
  145. Specific problems with 4F(089):
  146.  
  147. The block check option is negotiated and used correctly, but is incorrectly
  148. reported by the SHOW command after a file transfer.
  149.  
  150. -----------
  151.  
  152. First, a disclaimer must be made.  C-Kermit attempts to support all post-V6
  153. Unix variations on all machines.  This is a tall order, and requires careful
  154. attention to certain details.  As changes are made (and C-Kermit is still in
  155. stage of fairly rapid development), there is always the chance that a change
  156. -- made to introduce a new feature or fix a bug -- will not work as intended
  157. on some systems, even though it was tested successfully on others.  The main
  158. area to watch out for is not system differences (which are handled fairly well
  159. in the system-dependent ck?[ft]io modules), but in compiler differences,
  160. especially signed/unsigned int/char confusion.  Characters should be stored in
  161. variables of type char, not int, and char/int conversion should be avoided
  162. because of problems introduced by sign extension.  And i/o should not be used
  163. to read characters into int variables, because the way in which the system
  164. stores the character in an int varies from system to system (e.g. 68000s put
  165. them on the left, the VAX on the right).
  166.  
  167. If you have received a C-Kermit release that does not work correctly (except
  168. for the bugs & restrictions noted below), it is not because the release was
  169. not thoroughly tested -- it was -- but because it was not tested on your system
  170. since the last time changes were made, because of a lack of such a system to
  171. test it on.  If this happens to you, please try to track down the problem and
  172. report as specifically as possible back to Columbia.
  173.  
  174.  
  175. General problems:
  176.  
  177. - The program is too big, with too many features; source is too large to fit on
  178.   some disks.  Needs to be reorganized so that a minimal Kermit can be built
  179.   for any system, and then frills can be added on if desired -- interactive
  180.   command parser, help strings, dial command, script command, etc.
  181.  
  182. - There's not a full enough set of features available from command line
  183.   invocation.  Commands like "bye" are missing.  This is mainly to keep the
  184.   "kermit -h" help message small enough to fit on one screen.
  185.  
  186. - Conditionalizations are not done clearly.  In some cases it might be
  187.   better to have compile-time flags for features, rather than systems, or
  188.   generic system names, rather than specific vendor/machine names, to
  189.   avoid excessive nesting or repitition of compile-time variables.
  190.   Constructions like "#ifdef FOO | BAR" are avoided because many compilers
  191.   don't understand them; the alternative is to repeat code under different
  192.   conditionals (to accomplish an OR) or to include it within nested
  193.   conditionals (AND), sometimes applying De Morgan's law to achieve the
  194.   desired result... 
  195.  
  196. - Program's return code might be wrong in some cases (in 4.0, it was always
  197.   zero; in 4C some attempt is made to return correct codes for failure and
  198.   success).  Actually, no attempt has been made to correlate return codes
  199.   with success or failure of file transfer -- a bad return code only reflects
  200.   a fatal error.
  201.  
  202. - On some systems (e.g. TRS-80 Model 16 with Xenix V7, or HP-9000 HP-UX)
  203.   C-Kermit reportedly runs VERY SLOWLY.  The program could certainly do with
  204.   some tuning -- but not at the expense of modularity and transportability! --
  205.   but in the meantime, it can probably be sped up a lot by removing the
  206.   -DDEBUG from the makefile, eliminating hundreds of function calls, many of
  207.   them in critical code (one user reported a 1250% improvement doing this on 
  208.   the TRS-80 Model 16, with an earlier Kermit version.).
  209.  
  210. - In reality, TANDEM flow control (XON/XOFF) is not really done on most
  211.   systems, because Kermit opens the communication line in rawmode, which
  212.   has the side effect of disabling flow control.  Rawmode is used in order
  213.   to allow 8-bit data.  Using cooked mode & CRMOD would be possible for
  214.   text files, but 8th-bit prefixing would be required for 8-bit binary
  215.   files.  But at least this would allow in-band flow control to take place.
  216.   Allegedly, 4.3BSD and Sys 5 R3 allow XON/XOFF and rawmode to coexist,
  217.   but this hasn't been verified.  It doesn't seem to happen on Ultrix 2.0.
  218.  
  219. - The timeout interval is not automatically adjusted according to the
  220.   packet length.
  221.  
  222. - The program could be a little bit less cavalier in its treatment of files.
  223.   For instance, when receiving a file (with "warning" turned off) it will
  224.   overwrite any existing file of the same name.  That's ok, but what if the
  225.   user types ^F or ^B to interrupt the transfer?  This does not save the
  226.   existing file -- it's already been destroyed by the open() of the new copy,
  227.   which in turn is discarded as a result of the interruption.  Maybe Kermit
  228.   should always make a temporary, unique name for incoming files, and then
  229.   rename them to their real names only after the transfer is complete.  But
  230.   that's no good on systems (like the Macintosh) that don't have disk space
  231.   to burn.
  232.  
  233. - Local versus remote mode is not, and probably can not, be determined
  234.   automatically upon startup.  For instance, if you build Kermit with
  235.   "make sys3" on a 3B20 and a 3B2, the program has no way of knowing whether
  236.   it's running on a timesharing system (the 3B20, where it should be remote
  237.   by default) or a workstation (the 3B2, where it should be local by default).
  238.   If you find that Kermit comes up on your system in the wrong mode, you can
  239.   put the appropriate "set line" command in your .kermrc file -- "set line
  240.   /dev/tty" SHOULD always put you in remote mode.  (Actually, problems have
  241.   been reported for this on some systems that support incoming X.25 connections
  242.   on pseudoterminals.)
  243.  
  244. - If the program crashes or is halted (killed) from outside while it has the
  245.   terminal in a not-normal mode during command parsing or file transfer, the
  246.   terminal mode is not restored, and lock files are not cleaned up.  There can
  247.   be no fix for this within C-Kermit itself.  Subsequent Kermit runs may still
  248.   fail because the device is already opened by "another process" (you have
  249.   to log out & log in again to clear this one up).
  250.  
  251. - The shell's interrupt, delete, and kill characters may interfere or
  252.   conflict with those used by the Kermit command parser.  In any case, there
  253.   is no way to change Kermit's editing characters to conform to user's taste.
  254.  
  255. - "!" command requires a space after, contrary to the Unix user's normal
  256.   expectation.
  257.  
  258. - Many people have asked for a system-wide startup file similar to
  259.   the user's .kermrc file, perhaps with a conditional way to escape from
  260.   it if the user has her own .kermrc file.  This notion might be extended
  261.   to include the entire hierarchy system -- home -- current directory.
  262.  
  263. - Some users report that it would be more desirable to have an error during
  264.   execution of a take file return directly to command level, rather than
  265.   pop to the invoking take file, in case the error in question is of such
  266.   severity that it would cause all subsequent commands in the stack of TAKE
  267.   files to fail.  Best to have a SET command to control this behavior.
  268.   (This desired behavior does occur -- or at least should occur -- when the
  269.   program is in the background.)
  270.  
  271. - Some users report that the program should make no internal distinction
  272.   between running in foreground or background, so that program exit codes
  273.   are consistent, making it easier to debug shell scripts that invoke Kermit.
  274.  
  275. - Speaking of background, not all systems seem to define it the same way.
  276.   If your prompt disappears, you probably have one of those systems.  See
  277.   function conint() in ckutio.c, and try to figure out what's amiss.
  278.  
  279. - Since Kermit opens and closes the communication line with each command line
  280.   invocation, it is not convenient to use it in scripts in which it is
  281.   repeatedly invoked (e.g. a print spooler).
  282.  
  283. - Opening & closing a comm line selected with 'set line' involves the use
  284.   of UUCP "lock files", whose use is inconsistent from one Unix variation to
  285.   another, and from site to site and system to system.  The lack of a
  286.   consistent, reliable way to guarantee exclusive access to a communication
  287.   line is one of Unix's biggest shortcomings. 
  288.  
  289. - There is very little provision in the program (as yet) for running setuid.
  290.   Nor for dealing with bidirectional terminal lines.  Nor with system-provided
  291.   dialer programs.  Every system does these things differently.
  292.  
  293. - Variable names are sometimes confusing, especially the send/receive parameter
  294.   pairs (spsiz/rpsize, mystch/stchr, npad/mypadn, rtimo/timint, etc).  This
  295.   is mostly history... they tend to agree with the names used in other Kermit
  296.   programs.  Still, they should probably be changed.  Ditto for some of the
  297.   procedure names.
  298.  
  299. - Some C compilers do not support variable names longer than 6, nor function
  300.   names longer than 5, and some are not case sensitive (one DEC-20 C compiler
  301.   has all these restrictions, and the V6 Unix C compiler has some of them).
  302.   To ensure the widest possible portability, all identifiers should comply
  303.   with these restrictions -- currently many do not.
  304.  
  305. - When the C-Kermit server is given a host command (or even some generic
  306.   commands like 'space'), it might have to think for a long time before
  307.   returning output.  In this case, it should set a timer while waiting for
  308.   input from the fork and whenever the timer goes off, it should send a null
  309.   data packet to prevent the other Kermit from timing out.
  310.  
  311. - When connecting back to C-Kermit after a transaction, or after finishing
  312.   the server, it may be necessary to type a ^Q to clear up an XOFF deadlock.
  313.   There's not much the Kermit program can do about this...
  314.  
  315. - When interrupting a send with ^F or ^B, an appropriate message does not
  316.   seem to make it into the transaction log.
  317.  
  318. - There should be a nonverbose transaction log, in the Unix tradition,
  319.   which can be read by another program.  For instance, if Kermit is
  320.   used to 'send *', but only certain of the files make across successfully,
  321.   another program could read the list of those files and do something to
  322.   them (like (re)move them), or making a list of unsent files for Kermit to
  323.   send next time.
  324.  
  325. - The program should be interruptable at any point -- in interactive command
  326.   mode, during file transfer (but not during CONNECT), by Ctrl-C, which should
  327.   return you to the command prompt, rather than always exiting.
  328.  
  329. - Don't try to run Kermit in remote mode while running the "screen" virtual
  330.   terminal manager.   Screen (by default) uses Ctrl-A as its hot key, and this
  331.   conflicts with the Kermit protocol  Either change screen's hot key, or
  332.   change Kermit's start-of-packet character to some other control character.
  333.  
  334. ckucmd.c:
  335.  
  336. - Interactive Kermit commands that come in from a pipe (as in
  337.   "cat foo | kermit") are echoed.  Some people think they should not be.
  338.   The fix can be made (at some expense) in getwd() by adding a line to
  339.   the first if () {} block, "if (!isatty(0)) echof = 1;".
  340.   (Not sure if this is still true...)
  341.  
  342. ckufio.c:
  343.  
  344. - ckufio currently goes to a lot of trouble to traverse the directory in
  345.   order to expand "*" and "?" in wildcards.  Maybe it should just fork the
  346.   user's customary shell and have it do the expansion.  This would allow
  347.   fancier filespecs to be given, like "~/ck*.[cwh]".  But it would slow down
  348.   features like filename completion and menus in the interactive command
  349.   parser.  (Find out how Unix FTP does it...)
  350.  
  351.   Another solution to the interactive command parsing problems would be to use
  352.   the CCMD package (which grew out of Kermit's interactive command parser),
  353.   but CCMD has not been adapted to VMS, Data General, and other environments
  354.   that Kermit runs in.
  355.  
  356. ckutio.c:
  357.  
  358. - There's no good way to select baud rates higher than 9600.  Most Unix systems
  359.   don't supply symbols for them (unless you use EXTA, EXTB), and even when they
  360.   do, the program has no way of knowing whether a specific port serial
  361.   controller supports those rates.  (This was partially addressed in 4E(071).)
  362.  
  363. - On some systems, there is an undesired interaction between the various
  364.   open() modes, fnctl(), and ioctl() invocations when modem-control lines
  365.   are involved.  Some of this due to bugs in some Unix implementations or to
  366.   inconsistencies between them (e.g. as to the behavior of TIOCEXCL, etc).
  367.   In particular, the whole business about opening modem-controlled lines
  368.   with O_NDELAY before dialing and then switching modes after causes no end of
  369.   confusion and trouble (addressed to some degree in 4E(072-074).
  370.  
  371. - The Sys III/V code in tthang() is confusing, and possibly incorrect --
  372.   the closing and reopening of the ttyfd.  Often produces an annoying message
  373.   "Problem hanging up phone".
  374.  
  375. ckudia.c:
  376.  
  377. - Some systems do not allow users to manipulate dialers directly.
  378. - Should support a "phone book" (this would actually go in ckuus*.c).
  379. - Pro/Venix V2 (and some other Sys V-based systems) are having DTR-dropping
  380.   problems when dialing.  With Pro/Venix V2, a workaround is to get the system
  381.   to ignore the modem control signals and treat the line as a direct line by
  382.   issuing a "setline -d xxx" command, where "xxx" is the device node (e.g.
  383.   com1), rather than "setline -m xxx".
  384. - Should do "demon dialing" (keep trying till there's a connection).
  385.  
  386. ckuus*.c:
  387.  
  388. - When an alternate filename is given for an incoming file name, and the
  389.   alternate name is uppercase, the name is lowercased.  Alternate names
  390.   should be taken literally.
  391.  
  392. - Baud rate selection currently requires user to type a number, which is
  393.   then verified against a system-dependent table.  Better to have a baud rate
  394.   keyword (cmkey) table defined in the system-dependent module, so user
  395.   can abbreviate (e.g. '9' for '9600').  Also, it's a pain having parallel
  396.   tables in ckuus3.c, ckutio.c, etc.  Should consolidate this.
  397.  
  398. - No way to put trailing comments on commands.
  399.  
  400. - ckuus2.c reportedly makes the C optimizer run out of space under PC/IX and
  401.   some other systems.  C compilers just don't like strings...
  402.  
  403. Protocol (ckcpro.w, ckcfn*.c):
  404.  
  405. - No way to interrupt a protocol transaction until after it starts
  406.   successfully.  For instance, no way to interrupt the timeouts and
  407.   retransmissions of the initial packet when the other side is not
  408.   responding, except for killing the whole program.  Cure: check for
  409.   keyboard "interrupts" during the send-init process, set c[xz]seen.
  410.   But doing this will make the state table a lot more complicated...
  411.   Maybe change ^C trap to get back to command mode rather than exit
  412.   the program.
  413.  
  414. ckucon.c:
  415.  
  416. - Doesn't do any particular kind of terminal emulation.  It wasn't meant to.
  417.   Filters can be used for this.  Or a replacement module can be written
  418.   (as has been done for the Macintosh, or OS/2).
  419.  
  420. - When sending BREAK, should clear output buffer first (this is done in BSD,
  421.   should be added for other systems to ttsndb() in ckutio.c).
  422.  
  423. - Performance is poor on systems that can't check the input buffer or
  424.   do nonblocking read() calls.  See the horrendous code that was added for V7
  425.   to get around this (peeking into tty buffers in kernel memory).
  426.  
  427. - As structured, connect mode can't include commands to toggle logging on
  428.   and off or to change settings, because the fork that reads keyboard input
  429.   doesn't share variables with the fork that does port i/o.
  430.  
  431. - Reportedly, a control-S typed at the keyboard doesn't always seem to "take"
  432.   when doing terminal emulation under Pro/Venix V2 (DEC micros, terminals,
  433.   devices, systems are notorious for their insistence on doing XON/XOFF and
  434.   attendant problems.  Remember the VT180?)
  435.  
  436. - Should have a shell escape ("push").
  437.  
  438. ------------------------------
  439.  
  440. KNOWN BUGS
  441.  
  442. Ctrl-C out of dialing sometimes results in "longjump botch" and core dump, at
  443. least on VAX/Ultrix with "set modem rolm".  (Cure: interrupt handler should
  444. not use longjmp's, but instead should set a flag and return, the way it's done
  445. in the transmit() function as of 4F(089).
  446.  
  447. ------------------------------
  448.  
  449. COLLECTED COMMENTS AND HINTS FROM USERS AND DEVELOPERS:
  450.  
  451. Date: Sun, 24 Nov 85 04:16:02 CST
  452. From: Stan Barber <neuro1!sob@rice.ARPA>
  453. Subject: more notes on C-kermit 4C(057)
  454. Organization: Neurophysiology, Baylor College of Medicine, Houston, Tx
  455.  
  456. One more suggestion:
  457.  
  458. I would provide some mechanism to allow SYSIII compatible sites to 
  459. configure what signal that might like to use to allow the child and
  460. parent to notify each other of problems. At my site, SIGUSR1 can not
  461. be used by kermit, so I modify ckucon.c by replacing SIGUSR1 with
  462. SIGUSR2. That fixes everything just fine.
  463.  
  464. At least a warning should be noted somewhere (in the .bwr file, I guess)
  465. so that people will know to change it.
  466.  
  467. Alternatively, I would suggest a unique name (SIGKERMIT) that the
  468. installer can define in the makefile (e.g. -DSIGKERMIT=SIGUSR2) to
  469. keep people from mucking in the source file.
  470.  
  471. ------------------------------
  472.  
  473. Date:  9 Apr 1986 1105-EST (Wednesday)
  474. From: Vic Abell <abe@purdue-asc.arpa>
  475. Subject: Kermit and 4.xBSD rlogin
  476.  
  477. There is an undocumented option on the 4.xBSD rlogin call that must be used
  478. when C Kermit is at the end of a TCP/IP rlogin connection.  The option is "-8"
  479. and should be used in the following fashion:
  480.  
  481.     % rlogin hostname -8
  482.     % kermit
  483.  
  484. Vic Abell, Purdue University Computing Center
  485. abe@asc.purdue.edu, ...!pur-ee!pucc-j!abe
  486.  
  487. ------------------------------
  488.  
  489. Date: Fri 5 Sep 86 13:59:44-EDT
  490. From: Fred Wang <OP.FRED@CU20B.COLUMBIA.EDU>
  491. Subject: problem compiling kermit on the 3b2/310
  492.  
  493. If Mr. Ray's 3b2/310 is running the new C compiler (CFP+) he will run into
  494. problems when he issues the 'make att3bx' command.  CFP+ uses the 'fpcc'
  495. rather than the conventional 'cc' to compile C programs.
  496.  
  497. My suggestion to Mr. Ray's problem (if indeed he has CFP+) is to substitute
  498. fpcc for cc in the variables CC and CC2 in the makefile text. This worked fine
  499. for my 3b2/310 running Unix System V 2.0.4 with CFP+ C compiler.
  500.  
  501. ------------------------------
  502.  
  503. Date: Wed 19 Jul 89 22:03:23-MDT
  504. From: "Nelson H.F. Beebe" <Beebe@science.utah.edu>
  505. Subject: C-Kermit Makefile
  506.  
  507. The "make wermit" steps do not pass on any macros except
  508. the CFLAGS; they should.  Otherwise, things like "make
  509. sunos4 CC=gcc" fail to work as expected.  All of the "make
  510. wermit" lines in the Makefile should be extended with things
  511. like "CC=$(CC)" etc.
  512.  
  513. ------------------------------
  514.  
  515. Date: Fri, 17 Oct 86 15:17:14 EDT
  516. From: Chris Maio <chris@columbia.edu>
  517. To: sy.fdc@cu20b.columbia.edu
  518. Subject: telnetd "fix"
  519.  
  520. [Ed. - The following fix allows C-Kermit to work with 4.3BSD systems which are
  521. accessed via TCP/IP-based terminal servers.  The fix is to TELNET, not Kermit.
  522. Thanks to Chris Maio of the Columbia University Computer Science Department for
  523. tracking down the problem and providing a workaround.]
  524.  
  525. This fix for /etc/telnetd in 4.3 BSD is really only a workaround, designed
  526. to allow kermit, uucp, emacs, and other programs to receive carriage-return
  527. chararacters over a "netascii mode" telnet connection where the client is
  528. mapping carriage return to CRLFs (what I suspect to be the most common
  529. case for terminal servers and non-UNIX telnet implementations).  The real
  530. solution is to use telnet binary mode connections, but not all telnet clients
  531. allow the user to negotiate this.
  532.  
  533. In /usr/src/etc/telnetd.c, routine telrcv(), line 640, replace
  534.  
  535.             c = '\n';
  536. with
  537.             c = '\r';
  538.  
  539. This fix is inappropriate if you have telnet clients which map CR into CR NUL,
  540. and LF into CR LF, since those clients will then be unable to generate send the
  541. linefeed character through to the application when CRMOD is turned off.  See
  542. RFC 854 for more details.
  543.  
  544. The basic problem is that any program that manipulates the terminal will
  545. generally only work right if the telnet connection is "binary mode" (remember
  546. those odd commands you have to give to a TAC?).  Many telnet user interfaces,
  547. including the terminal concentrators we use, don't provide a way for the user
  548. to specify binary mode instead of netascii mode.  TOPS-20 is a lot smarter
  549. about this kind of thing, e.g. it negotiates telnet binary mode when a program
  550. running on a TVT specifies binary input from its controlling terminal, but
  551. I'm sure there are still bugs in TOPS-20's implementation.
  552.  
  553.                         Chris
  554.  
  555. ------------------------------
  556.  
  557. Date: 13 Sep 87 17:22:26 GMT
  558. From: warren@pluto.UUCP (Warren Burstein)
  559. Subject: patches to ckermit
  560. Organization: Industrial Automation Systems - New York, NY
  561.  
  562. These patches add to ckermit a "set phone" command.  Aliases are recognized in
  563. the "dial" command.  My .kermrc is now full of set phone commands.
  564.  
  565. The new command looks like
  566.    set phone pacx 280-8050
  567. After this command, I can say
  568.    dial pacx
  569.  
  570. I don't know how to make a "patch" file so here is a shar of all the diffs.
  571.  
  572. I am leaving the net in two days, I hope to be back on in a while and pick up
  573. my mail from this machine.
  574.  
  575. I didn't use any fancy methods to store phone numbers, it didn't seem worth
  576. the effort.
  577.  
  578. ---------------
  579. # This is a shell archive.  Remove anything before this line, then
  580. # unpack it by saving it in a file and typing "sh file".  (Files
  581. # unpacked will be owned by you and have default permissions.)
  582. #
  583. # This archive contains:
  584. # ckudia.diff ckuus3.diff ckuusr.diff ckuusrh.diff
  585.  
  586. echo x - ckudia.diff
  587. cat > "ckudia.diff" << '//E*O*F ckudia.diff//'
  588. 73,75d72
  589. <  *
  590. <  *   6-May-87  Support for phone aliases
  591. <  *                            -- Warren Burstein
  592. 126d122
  593. < char *malloc(), *strcpy();
  594. 422,431d417
  595. < /*
  596. <  * Array of phone aliases, unsorted
  597. <  */
  598. < #define MAXPHONES 100
  599. < struct phones {
  600. <     char *name, *number;
  601. < } phones[MAXPHONES];
  602. 528d513
  603. <     struct phones *lookup_phone(), *p;
  604. 530,537d514
  605. <     if ( !isdigit(*telnbr))
  606. <         if (p = lookup_phone(telnbr))
  607. <           telnbr = p->number;
  608. <         else {
  609. <             printf("I don't recognize that system\n");
  610. <             return -2;
  611. <         }
  612. 866,927d842
  613. < }
  614. < /*
  615. <  * Following code added by WB for phone aliases.
  616. <  */
  617. < /*
  618. <  * Add a phone alias.
  619. <  */
  620. < add_phone(name, number)
  621. < char *name, *number;
  622. < {
  623. <     struct phones *p;
  624. <     /*
  625. <      * If name is in use, redefine its number.
  626. <      */
  627. <     if (p = lookup_phone(name)) {
  628. <         free(p->number);
  629. <         p->number = malloc(strlen(number) + 1);
  630. <         (void) strcpy(p->number, number);
  631. <         return;
  632. <     }
  633. <     /*
  634. <      * Find a vacancy in the table.
  635. <      */
  636. <     for (p = phones; p < &phones[MAXPHONES]; p++)
  637. <       if ( !p->name) {
  638. <           p->name = malloc(strlen(name) + 1);
  639. <           (void) strcpy(p->name, name);
  640. <           p->number = malloc(strlen(number) + 1);
  641. <           (void) strcpy(p->number, number);
  642. <           return;
  643. <       }
  644. <     printf("There are too many phone aliases.\n");
  645. < }
  646. < /*
  647. <  * Returns phone number to use, or NULL if phone number could not be found.
  648. <  */
  649. < struct phones *lookup_phone(name)
  650. < char *name;
  651. < {
  652. <     struct phones *p;
  653. <     for (p = phones; p < &phones[MAXPHONES]; p++)
  654. <         if (p->name && !strcmp(p->name, name))
  655. <             return p;
  656. <     return (struct phones *) 0;
  657. < }
  658. < shphones() {
  659. <     struct phones *p;
  660. <     for (p = phones; p < &phones[MAXPHONES]; p++)
  661. <       if (p->name)
  662. <         printf("%s %s\n", p->name, p->number);
  663. //E*O*F ckudia.diff//
  664.  
  665. echo x - ckuus3.diff
  666. cat > "ckuus3.diff" << '//E*O*F ckuus3.diff//'
  667. 268,280d267
  668. <   case XYPHONE:
  669. <     {
  670. <         char name[30], number[30];
  671. <         if ( (x = cmfld("name of phone alias", "", &s)) < 0) return x;
  672. <         (void) strcpy(name, s);
  673. <         if ( (x = cmfld("phone number", "", &s)) < 0) return x;
  674. <         (void) strcpy(number, s);
  675. <         add_phone(name, number);
  676. <     }
  677. <     break;
  678. //E*O*F ckuus3.diff//
  679.  
  680. echo x - ckuusr.diff
  681. cat > "ckuusr.diff" << '//E*O*F ckuusr.diff//'
  682. 436d435
  683. <     "phone-number",     XYPHONE, 0,
  684. 473,474c472
  685. < #define SHPHONE 2            /* phone numbers */
  686. ---
  687. >  
  688. 477d474
  689. <     "phone-aliases",   SHPHONE, 0,
  690. 1085,1089c1082
  691. <     case SHPHONE:
  692. <         shphones();
  693. <         break;
  694. ---
  695. >  
  696. //E*O*F ckuusr.diff//
  697.  
  698. echo x - ckuusrh.diff
  699. cat > "ckuusrh.diff" << '//E*O*F ckuusrh.diff//'
  700. 104c104
  701. < #define XYPHONE 33                /* set phone alias - WB */
  702. ---
  703. >  
  704. //E*O*F ckuusrh.diff//
  705.  
  706. exit 0
  707.  
  708. ------------------------------
  709.  
  710. Date: Tue, 3 Nov 87 08:20:38 CST
  711. From: munnari!adl.austek.oz.au!rsharpe@uunet.UU.NET
  712.  (Richard Sharpe--Apprentice Sorcerer)
  713. Subject: CKermit under Unix ...
  714.  
  715. We are having problems with ckermit on an Ultrix system (approx 4.3BSD).
  716.  
  717. We have kermit installed setuid and setgid to uucp to allow access to the UUCP
  718. spool directory (to write the lock files). However, whenever kermit tries to
  719. write files in the user's directories (perhaps because the user is running
  720. kermit on the VAX in server mode and doing a send from a pc--mskermit), it
  721. fails saying that it cannot open the file. If the user sets their directory to
  722. world write, then ckermit on the VAX is happy.
  723.  
  724. Now, this seems to be an interaction between the way we have kermit installed
  725. and what it is trying to do, but I cannot see any other way to set up kermit
  726. so that it can reliably access the UUCP spool directory.
  727.  
  728. So, I checked out the code, and found that zopeno in ckufio.c just does an
  729. open of the file that it is opening for output and then does a chown to the
  730. real user and real group. I added the following code, and all seems to work:
  731.  
  732.    1. First pick up the real and effective UIDs.
  733.  
  734.    2. Then, just before the file open, set effective UID to back to our real
  735.       UID. 
  736.  
  737.    3. Then, just after the file open, set our effective UID back to what it
  738.       was just before we changed it.
  739.  
  740.    Here is the code fragment that does it (lines with a * in col 1 are mine):
  741.  
  742.    zopeno(n,name) int n; char *name; {
  743. *      int uid, euid;
  744.        debug(F111," zopeno",name,n);
  745.        if (chkfn(n) != 0) return(0);
  746.        if ((n == ZCTERM) || (n == ZSTDIO)) {  /* Terminal or standard output */
  747.        fp[ZOFILE] = stdout;
  748.        debug(F101," fp[]=stdout", "", (int) fp[n]);
  749.        return(1);
  750.        }
  751. *      uid = getuid(); euid = geteuid();
  752. *      seteuid(uid);        /* Set us back to who is running kermit */
  753.        fp[n] = fopen(name,"w");        /* A real file, try to open */
  754. *      seteuid(euid);       /* And set things back to our SUID value */
  755.        if (fp[n] == NULL) {
  756.        perror("zopeno can't open");
  757.        } else {
  758.        chown(name, getuid(), getgid());     /* In case set[gu]id */
  759.        if (n == ZDFILE) setbuf(fp[n],NULL); /* Debugging file unbuffered */
  760.        }
  761.        debug(F101, " fp[n]", "", (int) fp[n]);
  762.        return((fp[n] != NULL) ? 1 : 0);
  763.    }
  764.  
  765.   Now, as I say, this works, but I wonder if there is not a simpler way to get
  766. this done, like only have kermit setgid to uucp. Would that be sufficient?
  767.  
  768.   BTW, this fragment came from version 4c(029) of ckufio.c. I also have
  769. another version (ckcmai 4d(061) 8-Sep-86 and ckufio 4c(033) 8-Sep-86) but
  770. there seems to be no changes in routine zopeno.
  771.  
  772.   Hope you can help me here.
  773.  
  774. Regards
  775. Richard Sharpe
  776. rsharpe%adl.austek.oz@uunet.uu.net
  777.  
  778. ------------------------------
  779.  
  780. Date: Wed, 4 Nov 87 09:54:09 CST
  781. From: munnari!adl.austek.oz.au!rsharpe@uunet.UU.NET
  782.  (Richard Sharpe--Apprentice Sorcerer)
  783. Subject: CKermit under Unix ...
  784.  
  785. I have found problems with my solution that are to do with the differences
  786. between sysV and 4.2 (I read about this setuid stuff in Bach's book), so I am
  787. going to fix it up properly for SysV and 4.2/Ultrix. I also have access to a
  788. MicroPort 2.2 system, so I will try to get it working on that system as well.
  789. Finally, across the road is an NCR Tower, so I will try to get it running on
  790. that. 
  791.  
  792. When I do, I will ship you a copy of the changes. I may also try to fix the
  793. problem where you wipe out the existing file if a send is aborted. However,
  794. let me know if someone has already fixed this.
  795.  
  796. Regards
  797. Richard
  798.  
  799. ------------------------------
  800.  
  801. Date:     Mon, 1 Feb 88 15:23:59 EST
  802. From:     Gary P Standorf <standorf@CECOM-2.ARPA>
  803. Subject:  #ifdef problem with ckuus3.c
  804.  
  805. When I tried compiling C-Kermit 4E(070) on an Intel-310 running
  806. SCO Xenix 3.4 it blew up in the ckuus3.c module.  It doesn't like the
  807. #include <termio.h> line which follows the #ifdef UXIII in ckuus3.c.
  808. I added an #ifndef XENIX before the include for termio.h and then it
  809. compiled ok.
  810.  
  811. PS.  I hope that doing an #ifndef was the proper thing to do, since I'm not
  812. sure what other versions of XENIX need.
  813.  
  814. Thanks,
  815.  
  816. Gary Standorf
  817. <standorf@cecom-2.arpa>
  818.  
  819. -------
  820.  
  821. Date: 10 Feb 88 23:09:57 EST (Wed)
  822. From: ames!netsys!len@ll-xn.ARPA (Len Rose)
  823. Subject: C-Kermit 4E(070) Sys V R3 vs ATT 3Bx
  824.  
  825. One little note to people setting up this on an ATT 3B2 running under
  826. SYSVR3...  They have two options in the makefile that sort of clash when you
  827. are bringing up this software.. You either have to choose:
  828.  
  829. make att3bx or make sys5r3
  830.  
  831. If you don't choose att3bx,the code does not look for the LCK..ttyxx in
  832. /usr/spool/locks ... However if you choose att3bx,it does not handle signals
  833. correctly...  All I did to defeat this was just put a #define in ckutio.c for
  834. att3bx...  Just thought I'd pass this on, no big deal with it...
  835.  
  836. ------------------------------
  837.  
  838. Organization: SMART HOUSE Limited Partnership
  839. Phone: +1 301 249 6000
  840. Subject: C-Kermit 4F(085) on Xenix/386
  841. Date: 21 Jul 89 12:10:05 EDT (Fri)
  842. From: john@jetson.upma.md.us (John Owens)
  843.  
  844. I've tried out C-Kermit 4F(085) on SCO Xenix System V/386 2.2.3, and,
  845. with one exception, haven't had any problems.  I've tried it in remote
  846. and local mode, with extended-length packets, against itself and
  847. MS-Kermit 2.32.
  848.  
  849. The one problem I had was with the disposition attribute handling:
  850. Xenix doesn't have "unix" as a predefined symbol, and the mail/lpr
  851. code is conditional on "#ifdef unix".  My quick fix is to add -Dunix
  852. to all the XENIX makefile entries....  (I also vaguely remember either
  853. POSIX or ANSI C having trouble with predefining "unix"; perhaps it's
  854. the ANSI C draft that requires all predefined identifiers to have a
  855. particular prefix.)  If you follow your note and move the routines
  856. into a cku*.c file, this problem will go away.
  857.  
  858. Also, I'd like to suggest that, instead of receiving the file to be
  859. mailed/printed then deleting it, that you open a pipe and receive into
  860. it.  (I ran into this testing the "mail" feature while my current
  861. directory happened to be one with mode 555!)
  862.  
  863. Oh, here's a note you might want to add to the .bwr file or something:
  864.  
  865. To use kermit with modems enabled for dialin under Xenix 2.2 (at
  866. least), use the following procedure.  This example uses tty1A/tty1a
  867. (the same device, with and without modem control).
  868.  
  869. % /usr/lib/uucp/ungetty /dev/tty1A
  870. % kermit -l /dev/tty1a ...
  871.  ...
  872. % /usr/lib/uucp/ungetty -r /dev/tty1A
  873.  
  874. To do this one step better, find out (from your L-devices file) the
  875. dialer program used for this device.  For example, if it were
  876. /usr/lib/uucp/dialHA24 (the Hayes 2400 dialer), use:
  877.  
  878. % /usr/lib/uucp/ungetty /dev/tty1A
  879. % kermit -l /dev/tty1a ...
  880.  ...
  881. % /usr/lib/uucp/dialHA24 -h /dev/tty1A 2400
  882.  
  883. (The dialHA24 program and friends do the ungetty -r for you.)
  884.  
  885.     Thanks for all the work you've put into this over the years....
  886.     -John
  887.  
  888. ------------------------------
  889.  
  890.