From: Ian Beckwith Date: Sat, 28 Jan 2012 18:51:52 +0000 (+0000) Subject: Imported Upstream version 302 X-Git-Tag: upstream/302^0 X-Git-Url: http://erislabs.net/gitweb/?p=ckermit.git;a=commitdiff_plain;h=f8f3c6ea3c71351899c834c2d2a821ee20f62aaf Imported Upstream version 302 --- diff --git a/ck_crp.c b/ck_crp.c index ec99cdf..593d0b4 100644 --- a/ck_crp.c +++ b/ck_crp.c @@ -411,6 +411,10 @@ int des_new_random_key(Block B) { int rc=0; + /* WARNING: + This might need to have the "rc = " removed because this + is VOID in later, and maybe even all, versions. + */ rc = des_random_key(B); return(rc); } @@ -481,6 +485,8 @@ des_new_random_key(Block B) * These function pointers point to the current routines * for encrypting and decrypting data. */ +/* NOTE: These next two might need to have the "static " removed */ + static VOID (*encrypt_output) P((unsigned char *, int)); static int (*decrypt_input) P((int)); diff --git a/ckaaaa.txt b/ckaaaa.txt index 51a7a5b..335ec7d 100644 --- a/ckaaaa.txt +++ b/ckaaaa.txt @@ -1,6 +1,6 @@ -ckaaaa.txt June 2011 +ckaaaa.txt July 2011 - C-KERMIT VERSION 9.0.300 + C-KERMIT VERSION 9.0.301 OVERVIEW OF FILES Communications software for UNIX and (Open)VMS. @@ -26,7 +26,7 @@ DOCUMENTATION C-Kermit is documented in the book "Using C-Kermit", Second Edition, by Frank da Cruz and Christine M. Gianone, Digital Press, ISBN 1-55558-164-1, - supplementated by Web-based updates for C-Kermit 7.0, 8.0, and 9.0. + supplemented by Web-based updates for C-Kermit 7.0, 8.0, and 9.0. PLATFORMS Security @@ -229,7 +229,7 @@ BINARIES If you have FTP access to kermit.columbia.edu (also known as kermit.cc.columbia.edu, ftp.cc.columbia.edu), you can also retrieve various -C-Kermit binaries from the directory kermit/bin/ck*.*, or more conventiently +C-Kermit binaries from the directory kermit/bin/ck*.*, or more conveniently from the web page: http://www.columbia.edu/kermit/ck80binaries.html @@ -355,7 +355,7 @@ otherwise mistake them for Microsoft Word or Windows Help documents. cns: CONNECT command (UNIX only - version that uses select(), not fork()) deb: Debug/Transaction Log formats, Typedefs dia: Modem/Dialer control - fio: System-depdendent File I/O + fio: System-dependent File I/O fns: Protocol support functions fn2: More protocol support functions (and FN3, ...) lib: Common library routines module diff --git a/ckc301.txt b/ckc301.txt deleted file mode 100644 index 41b7385..0000000 --- a/ckc301.txt +++ /dev/null @@ -1,7841 +0,0 @@ -C-KERMIT 9.0 CHANGE LOG (Changes since 8.0.207 / K95 2.1.3 January 2003) - - Chronological order. - Go to the bottom to find the newest edits. - - F. da Cruz, The Kermit Project, Columbia University, NYC. - Last update: 28 June 2011. - -FTP USER, FTP ACCOUNT, plus the various prompts and switches for FTP username, -password, and account all neglected to strip quotes, and in most cases quotes -are necessary to specify a username that contains spaces. ckcftp.c, -15 Jan 2003. - -FTP MPUT f1 f2 f3... gets a parse error if any of the fn's do not match an -existing file. This is bad for scripts. In doftpput(), cmfdb() looks for -keywords (switches) or CMIFI. When it hits CMIFI, it exits from the initial -parse loop and then does additional cmifi()s in a loop until done. The most -obvious fix is to parse each field with cmfdb(CMIFI,CMFLD), i.e. fall back to -CMFLD if CMIFI doesn't match anything. Then if CMFLD was used, we don't add -the filespec to the list. This is a rather big change but it seems to work. -No error messages or failures happen for non-matching fields, but an error -message is printed (and the MPUT command fails) if none of the fields match -any files. This fix got in too late for 2.1.3; workaround: use C-Shell -like wildcard list (ftp mput "{*.abc,foo.*}"). ckcftp.c, 16 Jan 2003. - -GREP did not pass its pattern through the expander, thus variables could -not be used for patterns. This must have been an oversight -- I can't find -anything in my notes about it. Fixed in dogrep(): ckuus6.c, 24 Jan 2003. - -New makefile target for HP-UX 11.xx with OpenSSL from Tapani Tarvainen. -makefile, 31 Jan 2003. - -From Jeff: - . Avoid core dump when dereferencing tnc_get_signature(): ckuus4.c. - . Bump version numbers to 8.0.208, 2.1.4: ckcmai.c. - -Added /NOLOGIN to FTP [OPEN]. ckcftp.c, 10 Feb 2003. - -Don't dump core if FTP DEBUG is ON and FTP OPEN does not include a service. -openftp(): ckcftp.c, 10 Feb 2003. - -HELP PATTERN text incorrectly identified commands and functions with -floating and anchored patterns. The corrected lists are: -Floating: GREP, TYPE /MATCH:, /EXCEPT: patterns, \farraylook(), -Anchored: IF MATCH, file-matching wildcards, \fsearch(), \frsearch() -ckuus2.c, 10 Feb 2003. - -INPUT n \fpattern(xxx) did not work for case-independent comparisons. -Fixed in doinput(): ckuus4.c, 10 Feb 2003. - -It seems \fpattern() didn't work with MINPUT at all. There was no code to -handle \fpattern() in the MINPUT parse loop, so it never worked. The code -had to be totally rewritten to use cmfld() in a loop, rather than cmtxt() -and then cksplit(). Furthermore, whenever any of the fields was an -\fjoin(), this had to be split. ckuusr.c, 10 Feb 2003. - -Macro replacement via \m() and \fdefinition() does not work as advertised -(i.e. case sensitively) for associative array elements; e.g. \m(xxx) is -treated the same as \m(xxx), contrary to section 7.10.10 of the C-Kermit -7.0 update notes, and to the fact that the two really do exist separately. -Fixed by adding a static function isaarray(s) which succeeds if s is an -associative array reference and fails otherwise, and then having \m() -and \fdef() call mxxlook() (case-sensitive lookup) if isaarray(), otherwise -(as before) mxlook()). ckuus4.c, 11 Feb 2003. - -Fixed FTP OPEN to allow the /USER switch to override SET FTP AUTOLOGIN OFF, -just as /NOLOGIN overrides SET FTP AUTOLOGIN ON. ckcftp.c, 11 Feb 2003. - -In K95, "set key \1234 \27H" (any SET KEY command in which the first char of -the definition was backslash, and the ONLY character after the backslash -quantity was an uppercase letter, that letter would be lowercased). Diagnosis: -xlookup() poking its argument (see notes from July 2000). Jeff sent a fix. -ckucmd.c, 15 Feb 2003. - -Ran my S-Expression torture test to make sure Sexps still worked. They do, -except the bitwise & and | operators were broken, e.g. (& 7 2) and (| 1 2 4) -get "Invalid operand" errors. Jeff's code had added an early failure return -from the lookup loop when when a single-byte keyword matched a keyword that -started with the same byte but was more than one byte long. So "&" would hit -"&&" and fail instead of continuing its search (xlookup tables aren't sorted -so there can be no early return). Fixed in xlookup(): ckucmd.c, 16 Feb 2003. - -Got rid of "krbmit" target from makefile. It's still there, but we don't -use it any more. All secure targets now use "xermit", and produce a binary -called wermit, just like the regular ones do (except the old ckucon.c ones). -Non-secure targets, since they don't define any of the security symbols, -wind up compiling and linking to (mostly) empty security modules. makefile, -15 Feb 2003. - -Added \fcvtdate(xxx,3) to format its result in MDTM format (yyyymmddhhmmss, -all numeric, no spaces or punctuation). Of course these numeric strings -are too big to be 32-bit numbers and are useless for arithmetic, but they're -useful for lexical comparison, etc. ckuus[24].c, 16 Feb 2003. - -The following FTP commands did not set FAILURE when they failed: RMDIR, -CD, CDUP, Fixed in the corresponding doftpblah() routines. ckcftp.c, -16 Feb 2003. - -RENAME would sometimes not print an error message when it failed, e.g. in K95 -when the destination file already existed. ckuus6.c, 17 Feb 2003. - -Fixed COPY error messages, which did not come out in standard format when -/LIST was not included. ckuus6.c, 17 Feb 2003. - -Fixed #ifdefs in ck_crp.c to allow nonsecure builds on old platforms like -System V/68 R3. 19 Feb 2003. - -Similar treatment for ck_ssl.c. 20 Feb 2003. - -From Jeff, 21 Feb 2003: - . AIX53 and AIX52 symbols for ckcdeb.h, makefile. - . New gcc targets for various AIX 4.x/5.x versions: makefile. - . Copyright date updates: ck_crp.c, ck_ssl.c. - . ENABLE/DISABLE QUERY broken because keyword table out of order: ckuusr.c. - . Fixed the use of HTTP proxies for HTTP [RE]OPEN for Unix: ckcnet.c. - -Also for K95 only: Allow file transfer when K95 is invoked on the remote end -of a connection to a Pragma Systems Terminal Server connection; automatically -SET EXIT HANGUP OFF when invoked with open port handle ("k95 -l nnnn"). - -"cd a*" failed even when "a*" matched only one directory. Fixed in cmifi(): -ckucmd.c, 21 Feb 2003. - -In the Unix version, replace "extern int errno;" with "#include " -if __GLIBC__ is defined, since glibc now defines a thread-specific errno. -ckcdeb.h, 26 Feb 2003. - -Added #ifdefs to skip compilation of ckuath.c in nonsecure builds. Tested -by building both secure and regular versions in Linux. ckuath.c, 26 Feb 2003. - -Ran the build-in-84-different-configurations script on Linux to make sure it -still builds with all different combinations of feature selection options. -All OK. 26 Feb 2003. - -Built on VMS. Needed to add a prototype for mxxlook*() to ckuusr.h; built -OK otherwise. 26 Feb 2003. - -From Jeff: More #ifdef shuffling for nonsecure builds: ckuath.c, ck_ssl.c, -27 Feb 2003. - -Added code to ensure \v(download) ends in a directory separator in Unix, -Windows, and OS/2. ckuus7.c, 27 Feb 2003. - -Added code to K95 zfnqfp() to tack on directory separator when returning -a directory name. ckofio.c, 27 Feb 2003. - -Somehow an old copy of ckuath.c popped to replace the new one. Put the new -one back. 28 Feb 2003. - -From Jeff: Fix typo in my K95 zfnqfp() code from yesterday; fixes for handling -UNCs uniformly, no matter which way their slashes are leaning. ckofio.c, -28 Feb 2003. - -At Jeff Mezei's suggestion, separate text and binary mode open sequences -for VMS session log. ckvfio.c, 28 Feb 2003. - -Added freebsd48 target for FreeBSD 4.8. makefile, 1 Mar 2003. - -Changed Mac OS X entries to include -DUSE_STRERROR. makefile, 2 Mar 2003. - -Fixed GETOK /GUI to evaluate its text argument. ckuus6.c, 3 Mar 2003. - -Jeff fixed the K95 Dialer QUICK dialog to (a) allow templates, and (b) have -a Save-As option. 3 Mar 2003. - -Jeff fixed a problem with the Xmodem-CRC checksum being crunched whenever -there was a retransmission. 7 Mar 2003. - -Added target/banner for Tru64 5.1B. makefile, ckuver.h, 5 Mar 2003. - -In Unix, the zcopy() routine (used by the COPY command) reset the user's umask -to 0 for the remainder of the Kermit process lifetime. The bug was in -ckufio.c 8.0.194, 24 Oct 2002, and is fixed in ckufio.c 8.0.195, 6 Mar 2003. -Of course this happened after building 155 C-Kermit 8.0.208 binaries. (But -before officially releasing 8.0.208.) - -In the VMS version, changed: - - while ((n--) && xx_inc(2) > -1) ; -to: - while ((n--) && xx_inc(2) >= 0) ; - -to suppress the "...is being compared with a relational operator to a constant -whose value is not greater than zero" warning. ckvtio.c, 7 Mar 2002. - -Added a debug call to dologend in hopes of catching overzealous Locus -switching, which seems to happen only in K95. ckuus3.c, 7 Mar 2002. - -Rebuilt binaries for some of the more current Unix releases: AIX 4.3.3-5.1, -Solaris 7-9 , Red Hat 7.0-8.0, Slackware 8.1, Freebsd 4.7-4.8, NetBSD 1.6, -OpenBSD 3.2, Unixware 7.1.3, Open Unix 8, OSR5.0.6a, etc. A Unix binary with -COPY umask fix shows a 6 Mar 2003 date for "UNIX File support" in SHOW -VERSIONS; a binary without the fix shows 24 Oct 2002. - -C-Kermit 8.0.208 dated 14 March 2003 released on 10 March 2003. - ----8.0.208--- - -From Jeff 13 Mar 2003: - . Updated SSL module allows importation of tickets from host. - . freebsd50+openssl target: makefile. - . FTP PUT /PERMISSIONS error message for K95: ckcftp.c. - -Fixed MINPUT to strip quotes or braces from around targets (this was broken -on Feb 10th). Thanks to Jason Heskett for discovering and reporting this -(killer) bug. ckuusr.c, 14 Mar 2003. - -Changed version number to 209 Dev.00. ckcmai.c, 14 Mar 2003. - -While debugging the alphapage script, I found that the command "minput 8 \6\13 -\21\13 \13\27\4\13 \30\13" gets "?Not confirmed" in 8.0.208 and 8.0.209, but -not in 206 and earlier. This problem too was introduced on Feb 10th by -changing MINPUT parsing from cmtxt() followed by cksplit() to cmfld() in a -loop. cmfld() uses setatm() to return its result and of course setatm() -breaks on \13. Changing setatm() not to do this would break everything else. -But cmfld() has no arguments that let us tell it to do anything different in -this case. Changing the API would be a disaster. The only solution is to add -an "MINPUT ACTIVE" (minputactive) global variable that tells cmfld() to tell -setatm() not to break on CR. Now MINPUT with braced targets containing CR -and/or LF works in 209, 206, and 201 (but not 208). ckucmd.c, ckuusr.c, -ckuus5.c, 15 Mar 2003. - -MINPUT n \fjoin(&a) works OK if all the members of \&a[] are text strings, but -if they are strings of control chars (as above), they don't get separated by -the spaces. For example in: - - dcl \&a[] = "\4\5" "\6\7" xxx - minput 10 \fjoin(&a) - -MINPUT gets two targets: "aaa" and "\4\5 \6\7 xxx". The bug was in the -cksplit() call in the \fjoin() case of MINPUT: it needed to specify an -include set consisting of all the control characters except NUL. ckuusr.c, -16 Mar 2003. - -But there's still a problem: - - dcl \&a[] = "\4\5\13\10" "\6\7" "xxx" - -creates an array whose first member is "^D^E (one doublequote included). But -if braces are used instead, there's no problem. Same deal as MINPUT: cmfld() -breaks on CR or LF, thus the end quote is lost. If I set minputactive for -DECLARE initializers too, that fixes it. Is there any reason not to do this? -Can't think of any (famous last words)... ckuusr.c, 16 Mar 2003. - -Since it has multiple applications, changed the flag's name from minputactive -to keepallchars. ckucmd.c, ckuus[r5].c, 16 Mar 2003. - -\v(exedir) wasn't being set correctly (it included the program name as well -as the directory). Fixed in getexedir(): ckuus4.c, 16 Mar 2003. - -SET CARRIER-WATCH "auto matic" (spurious space in supplied keyword). -Cosmetic only; it still worked. Fixed in setdcd(): ckuus3.c, 16 Mar 2003. - -"directory a b c" listed too many files -- all files whose names END WITH a, -b, or c, rather than the files whose names WERE a, b, or c. Diagnosis: The -filespec is changed into a pattern: {a,b,c}, which is the correct form. It is -passed to nzxpand(), which goes through the directory getting filenames and -sending each one to ckmatch() with the given pattern. ckmatch() receives the -correct pattern but then prepends a "*" -- that's not right. It's not just -in filename matching either. The following succeeds when it shouldn't: - - if match xxxxc {{a,b,c}} - -Changing ckmatch() to not prepend the "*" to each segment fixes the command -above but breaks lots of others. Running through the "match" torture-test -script shows the problem occurs only when the {a,b,c} list is the entire -pattern, and not embedded within a larger pattern. Testing for this case -fixed the problem. ckmatch(): ckclib.c, 16 Mar 2003. - -Fixed FTP MODTIME to not print anything if QUIET ON. ckcftp.c, 16 Mar 2003. - -Picked up a new ckuath.c from Jeff, not sure what the changes are. 16 Mar 2003. - -Did a few regular and secure builds to make sure I didn't wreck anything. - -Changed version number to 209 (final). ckcmai.c, 16 Mar 2003. - -Jason Heskett found another bug: if you define a macro FOO inside the -definition of another macro BAR, and FOO's definition includes an odd number -of doublequotes (such as 1), FOO's definition absorbs the rest of BAR's -definition. Example: - - def TEST { - .foo = {X"} - sho mac foo - } - do test - sho mac foo - -Results in: - - foo = {X"}, sho mac foo - -Diagnosis: the TEST definition becomes: - - def TEST .foo = {X"}, sho mac foo - -and the macro reader is erroneously treating the doublequote as an open -quote, and then automatically closes the quote at the end of the definition. -The error is that a doublequote should be significant only at the beginning of -a field. But the macro reader isn't a command parser; it doesn't know what -a field is -- it's just looking for commas and skipping over quoted ones. -First we have to fix an oversight: SET COMMAND DOUBLEQUOTING OFF should have -worked here, but it wasn't tested in this case. Fixed in getncm(): ckuus5.c, -17 Mar 2003. - -There are only certain cases where it makes sense to treat doublequotes as -signicant: - - . An open quote must be at the beginning or preceded by a space. - . A close quote is only at the end or else followed by a space. - -This too was fixed in getncm(): ckuus5.c, 17 Mar 2003. - -A fix from Jeff SSL/TLS FTP data decoding. ckcftp.c, 18 Mar 2003. - -Tried building C-Kermit on a Cray Y-MP with UNICOS 9.0. "int suspend", -declared in ckcmai.c and used in many modules, conflicts with: - - unistd.h:extern int suspend __((int _Category, int _Id)); - -The "=Dsuspend=xsuspend" trick doesn't work for this; there is no way around -the conflict other than to rename the variable: ckcmai.c, ckutio.c, -ckuus[35xy].c. 26 Mar 2003. VMS and K95 not affected. - -OK that gets us past ckcmai.c... Then in ckutio.c I had to add a new #ifdef -around the LFDEVNO setting, because the Cray didn't have mkdev.h. Could not -find a Cray-specific manifest symbol, so I made a new makefile target (cray9) -that sets this symbol. Having done this I have no idea what kind of lockfile -would be created, but I also doubt if anybody dials out from a Cray. The -binary should run a C90, J90, or Y-MP. makefile, 26 Mar 2003. - -Added a target for SCO OSR5.0.7. makefile, ckuver.h, 30 Mar 2003. - -Changed since 208: -makefile ckuver.h ckcmai.c ckclib.c ckcftp.c ckucmd.c ckuus*.c ckutio.c. - ----8.0.209--- - -From Mark Sapiro, a fix for the March 17th doubleqote fix, getncm(): ckuus5.c, -4 Apr 2003. - -From Jeff, 29 Apr 2003: - . Corrected target for HP-UX 11.00 + OpenSSL: makefile, - . Do not allow WILL AUTH before WONT START_TLS: ckctel.h ckctel.c - . Add hooks for SFTP and SET/SHOW SFTP: ckcdeb.h ckuusr.h ckuusr.c ckuus3.c - . Add SKERMIT ckuusr.h ckuusr.c - . Add ADM-5 terminal emulation: ckuus7.c, ckuus5.c - . Uncomment and update HELP SET SSH V2 AUTO-REKEY: ckuus2.c - . Enable IF TERMINAL-MACRO and IF STARTED-FROM-DIALER for C-Kermit: ckuus6.c - . Fix conflicting NOSCROLL keyword definition: ckuusr.h - . Set ttname when I_AM_SSH: ckuusy.c - . Add extended arg parsing for SSH, Rlogin, Telnet: ckuusy.c, ckuus4.c - . Security updates: ckuath.c, ck_ssl.c - . Change K95 version number to 2.2.0: ckcmai.c - . Save K95 term i/o state before executing keyboard macro: ckuus4.c - . Add tests for SSH Subsystem active during INPUT/OUTPUT/CONNECT: ckuus[45].c - . Enable K95 SET SSH V2 AUTO-REKEY: ckuus3.c - -SFTP and SET SFTP subcommands are implemented up to the case statements. - -Files of mine that Jeff hadn't picked up: - ckuver.h ckcftp.c ckutio.c ckuusx.c (just minor changes for last build-all) - -On 4 Jan 2003, SET RECEIVE MOVE-TO was changed to convert is argument to an -absolute path, which made it impossible to specify a relative path, then -move to different directories and have it apply relatively to each directory. -Changed this as follows: - - . Parser uses cmtxt() rather than cmdir() so it won't fail at parse time. - . If path is absolute, we fail at parse time if directory doesn't exist. - . In reof() we run the the path through xxstring (again, in case deferred - evaluation of variables is desired) and then, if not null, use it. - . If the directory doesn't exist, rename() fails and reof() returns -4, - resulting in a protocol error (this is not a change). We do NOT create - the directory on the fly. - -I also fixed SET SEND/RECEIVE RENAME-TO to parse with cmtxt() rather than -cmdir(), since it's parsing a text template, not a directory name, e.g. -"set receive rename-to file-\v(time)-v(date)-\v(pid)". This was totally -broken, since when I don't know. We don't call xxstring() in this parse, so -evaluation is always deferred -- I'd better not change this. ckuus7.c, -ckcfns.c, 1 May 2003. - -From Jeff, Sat May 3 14:15:23 2003: - . Pick up the right isascii definition for K95: ckctel.c - . malloc... ckuath.c (new safe malloc routines for K95) - . Add author listing: ckuus5.c - . SSH Heartbeat support (K95 only): ckuus[23].c - . Prescan --height and --width to avoid window resizing at startup: ckuusy.c - . Add checks for fatal() or doexit() called from sysinit(): ckuusx.c - . Move some K95-specific definitions to ckoker.h: ckcdeb.h - . Add support for ON_CD macro in zchdir(): ckufio.c - . Add a command to let FTP client authenticate with SSLv2: ckcftp.c - . Fix parsing of FTP file facts like "UNIX.mode": ckcftp.c - -ON_CD will need some explaining (to be done). It's implemented for Unix, -VMS, WIndows, and OS/2. - -The FTP file facts fix came from first exposure to the new OpenBSD FTP -server: ftp://ftp7.usa.openbsd.org/pub/os/OpenBSD/3.3/i386/ -The period in "UNIX.mode" caused an erroneous word break, adding junk to -the filename. - -About the malloc changes, Jeff says "K95 is not behaving well in low memory -environments. I'm not sure that C-Kermit does much better. The program does -not crash but it certainly does not behave the way the user expects it to. -I'm beginning to think that any malloc() error should be treated as fatal." - -Not visible in these changes because it's in K95-specific modules: Jeff made -SET ATTRIBUTES OFF and SET ATTRIBUTES DATE OFF apply to XYZMODEM transfers. - -From Jeff, 11 May 2003: - . Add support for SSH Keepalive to relevant SET command (K95): ckuus3.c - . Reduce max overlapped i/o requests from 30 to 7 (K95): ckuus7.c - . Don't call sysinit() in fatal(): ckuusx.c. - . Some new conditionalizations for SSL module: ck_ssl.c - -The doublequote-parsing fixes from March and April broke the SWITCH statement, -which is implemented by internally defining, then executing, a macro. If I -drop back to the old dumb handling of doublequotes, everything is fixed except -the problem of March 17th. But can we really expect getncm() to pre-guess -what the parser is going to do? getncm()'s only job is to find command -boundaries, which are represented by commas. Commas, however, is needed IN -commands too. We take a comma literally if it is quoted with \, or is inside -a matched pair of braces, parens, or doublequotes. It is not unreasonable to -require a doublequote in a macro definition to be prefixed by \ when it is to -be taken literally. The proper response to Jason Heskett's complaint of March -17th should have been to leave the code alone and recommand an appropriate -form of quoting: - - def TEST { - .foo = {X\"} - sho mac foo - } - -And this is what I have done. Another reason for sticking with the old method -is that it's explainable. The "improved" method, even if it worked, would be -be impossible to explain. Btw, in testing this I noticed that the switch-test -script made 8.0.201 dump core. Today's version is fine. The problem with -quoted strings inside of IF {...} clauses and FOR and WHILE loops is fixed -too. Perhaps "unbroken" would be a better word. ckuus5.c, 11 May 2003. - -Vace discovered that FTP MGET /EXCEPT:{... (with an unterminated /EXCEPT list) -could crash Kermit. Fixed in ckcftp.c, 11 May 2003. - -CONTINUE should not affect SUCCESS/FAILURE status. ckuusr.c, 11 May 2003. - -Fixed an oversight that goes back 15 years. While \{123} is allowed for -decimal codes, \x{12} and \o{123} were never handled. ckucmd.c, 11 May 2003. - -Added support for Red Hat and /usr/sbin/lockdev. Supposedly this -allows Kermit to be installed without setuid or setgid bits and still be able -to lock and use the serial device. Compiles and starts, but not tested. -ckcdeb.h, makefile, ckutio.c, ckuus5.c, 16 May 2003. - -From Jeff: FTP ASCII send data to host when FTP /SSL was in use was broken. -ftp_dpl is set to Clear when FTP /SSL is in use. This was causing the data to -be written to the socket with send() instead of the OpenSSL routines. -ckcftp.c, ckuath.c, 21 May 2003. - -From Jeff: Stuff for Kerberos 524: ckcdeb.h. Fixes for FTP; "FTP ASCII send -data did not properly compute the end of line translations. On Unix (and -similar platforms) the end of line was correct for no character sets but -incorrect when character sets were specified. On Windows/OS2, the end of line -was correct when character sets were specified and incorrect when they were -not. On MAC, both were broken. Also, FTP Send Byte counts were incorrect -when character sets were specified." ckcftp.c. 17 Jun 2003. - -From Jeff: fixes to HTTP /AGENT: and /USER: switch action: ckcnet.c ckuus3.c -ck_crp.c ckcftp.c ckuus2.c ckuusy.c ckuusr.c ckcnet.h, 21 Jun 2003. - -From Jeff: Fix SET DIALER BACKSPACE so it can override a previous SET KEY -(e.g. from INI file): ckuus7.c. Some SSL/TLS updates: ck_ssl.c. HTTP support -for VMS and other VMS improvements (e.g. a way to not have to hardwire the -C-Kermit version number into the build script) from Martin Vorlaender: -ckcnet.h, ckuus[r3].c, ckcdeb.h, ckvtio.c, ckcnet.c, ckvker.com. Built on -Solaris (gcc/ansi) and SunOS (cc/k&r). The new VMS script tests the VMS -version and includes HTTP support only for VMS 6.2 or later. 2 Jul 2003. - -Tried to build on our last VMS system but it seems to be dead. Looks like a -head crash (makes really loud noises, boot says DKA0 not recognized) (fooey, I -just paid good money to renew the VMS license). Tried building at another -site with: - - Process Software MultiNet V4.3 Rev A-X, - Compaq AlphaServer ES40, OpenVMS AXP V7.3 - Compaq C V6.4-008 on OpenVMS Alpha V7.3 - -Had to make a few corrections to ckvker.com. But still, compilation of -ckcnet.c bombs, indicating that the SELECT definition somehow got lost -somewhere since the 209 release (i.e. no SELECT type is defined so it falls -thru to "SELECT is required for this code"). But I don't see anything in -ckcdeb.h or ckcnet.[ch] that would explain this. Not ckvker.com either -(putting the old one back gives the same result). OK, I give up, maybe it's -just that I haven't tried building it on MultiNet recently. What about UCX? -Aha, builds fine there except for warnings about mlook, dodo, and parser in -ckvfio.c (because of ON_CD) -- I suppose I have #include ... (done) -Anyhow it builds OK and the HTTP code is active and almost works (HTTP OPEN -works; HTTP GET seems to succeed but creates an empty file every time). Tried -building under MultiNet at another installation; same bad result. - -OK so why won't it build for MultiNet? Comparing ckcnet.c with the 209 -version, not a single #ifdef or #include is changed. Tried building with -p3="NOHTTP" -- builds OK, aha. Where's the problem? Not ckcnet.h... -Not ckcdeb.h... OK I give up, will revisit this next time I get time to -do anything with the code. - -Later Jeff said "Martin did not implement VMS networking for the HTTP code. -All he did was activate the #define HTTP which happens to work because his -connections are using SSL/TLS connections. http_inc(), http_tol(), etc have -no support for VMS networking regardless of whether it is UCX or MULTINET. -The vast majority of HTTP connections are not secured by SSL/TLS. It makes no -sense to support HTTP on VMS until someone is willing to either do the work or -pay have the work done to implement VMS networking in that code base." So the -fix is to not enable HTTP for VMS after all. Removed the CKHTTP definition -for VMS from ckcdeb.h, 6 Jul 2003. - -Fixed ckvfio.c to #include (instead of ) to pick up -missing prototypes. 6 Jul 2003. - -From Arthur Marsh: solaris2xg+openssl+zlib+srp+pam+shadow and the corresponding -Solaris 7 target. makefile, 6 Jul 2003. - -Remove duplicate #includes for , , and from -ckcftp.c. 6 Jul 2003. - -Add -DUSE_MEMCPY to Motorola SV/68 targets because of shuffled #includes in -ckcftp.c. 8 Jul 2003. - -From Jeff: Fix problems mixing SSL and SRP without Kerberos. Plus a few minor -#define comment changes and a reshuffling of #defines in ckcdeb.h to allow me -to build on X86 Windows without Kerberos. ckcdeb.h, ck_crp.c, ckuath.c, -10 Jul 2003. - -From Jeff: updated ckuat2.h and ckuath.c, 29 Jul 2003. - -Mats Peterson noticed that a very small Latin-1 file would be incorrectly -identified as UCS-2 by scanfile(). Fixed in ckuusx.c, 29 Jul 2003. - -Fixed ACCESS macro definition to account for the fact that FIND is now a -built-in command. ckermit.ini, 30 Jul 2003. - -From Jeff: Fix for typo in urlparse() (svc/hos): ckuusy.c, 18 Aug 2003. - -From Jeff: Redhat9 makefile targets (needed for for OpenSSL 0.9.7): -makefile, 19 Aug 2003. - -GREP /NOLIST and /COUNT did too much magic, with some undesirable fallout: -"GREP /NOLIST /COUNT:x args" printed "file:count" for each file. "GREP -/COUNT:x /NOLIST args" did not print "file:count", but neither did it set the -count variable. Removed the magic. Also one of the GREP switches, -/LINENUMBERS, was out of order. Fixed in ckuus6.c, 20 Aug 2003. - -From Jeff: "Reorganizing code to enable building with different subsets of -options; a few typos corrected as well." ckcdeb.h, ckuver.h (for RH9), -ckcnet.c, ckuus7.c, ckuus3.c: 24 Aug 2003. - -Scanfile misidentified a big PDF file as text because the first 800K of it -*was* text (most other PDF files were correctly tagged as binary). Fixed -by adding a check for the PDF signature at the beginning of the file. -scanfile(): ckuusx.c, 25 Aug 2003. - -Ditto for PostScript files, but conservatively. Signature at beginning of -file must begin with "%!PS-Ado". If it's just "%!" (or something nonstandard -like "%%Creator: Windows PSCRIPT") we do a regular scan. Also added "*.ps" -to all binary filename patterns. ckuusx.c, 4 Sep 2003. - -Ditto (but within #ifndef NOPCLSCAN) for PCL (E) and PJL (%) files, -but no binpatterns (note: ".PCL" is the extension for TOPS-20 EXEC scripts). -ckuusx.c, 4 Sep 2003. - -Added comments about OpenSSL 0.9.7 to all linux+openssl targets. -makefile, 4 Sep 2003. - -From Jeff: Added - #define ALLOW_KRB_3DES_ENCRYPT. When this symbol is defined -at compilation Kermit will allow non-DES session keys to be used during Telnet -Auth. These session keys can then be used for Telnet Encrypt. The reason -this is not compiled on by default is that the MIT Kerberos Telnet does not -follow the RFC for constructing keys for ENCRYPT DES when the keys are longer -than 8 bytes in length. ckuath.c, ckuus5.c, 4 Sep 2003. - -"ftp mget a b c" succeeded if one or more of the files did not exist, even -with "set ftp error-action proceed". This is because the server's NLST file -list does not include any files that don't exist, so the client never even -tries to get them. Fortunately, the way the code is structured, this one was -easy to fix. ckcftp.c, 14 Sep 2003. - -From Jeff: Corrected code in ckcnet.c to ensure that Reverse DNS Lookups are -not performed if tcp_rdns is OFF. Fixed ck_krb5_getrealm() to actually return -the realm of the credentials cache and not the default realm specified in the -krb5.conf file. Previously krb5_cc_get_principal() was not being called. -Fixed ck_krb5_is_tgt_valid() to test the TGT in the current ccache and not the -TGT constructed from the default realm. ckcnet.c, ckuath.c, 14 Sep 2003. - -Marco Bernardi noticed that IF DIRECTORY could produce a false positive if -the argument directory had previously been referenced but then removed. This -is because of the clever isdir() cache that was added to speed up recursion -through big directory trees. Changed IF DIRECTORY to make a second check -(definitive but more expensive) if isdir() succeeds, and changed the -directory-deleting routine, ckmkdir(), to flush the directory cache (UNIX -only -- this also should be done in K95 but it's not critical). This was -done by adding a routine, clrdircache() to ckufio.c, which sets prevstat -to -1 and prevpath[0] to NUL. ckcfn3.c, ckuus6.c, ckufio.c, 18 Sep 2003. - -Marco reported the second fix still didn't work for him (even though it did -for me). Rather than try to figure out why, I concluded that the directory -cache is just not safe: a directory found a second ago might have been deleted -or renamed not only by Kermit but by some other process. Why did I add this -in the first place? The log says: - - Some debug logs showed that isdir() is often called twice in a row on the - same file. Rather than try to sort out clients, I added a 1-element cache - to Unix isdir(). ckufio.c, 24 Apr 2000. - -Experimentation with DIR and DIR /RECURSIVE does not show this happening at -all. So I #ifdef'd out the directory cache (see #ifdef ISDIRCACHE in ckufio.c; -ISDIRCACHE is not defined) and backed off the previous changes: ckufio.c, -ckcfn3.c, ckuus6.c, 28 Sep 2003. - -From Jeff: Replace the compile time ALLOW_KRB_3DES_ENCRYPT with a run-time -command SET TELNET BUG AUTH-KRB5-DES which defaults to ON: ckctel.[ch], -ckuus[234].c, ck_crp.c, ckuath.c. 4 Oct 2003. - -Allow DIAL RETRIES to be any positive number, and catch negative ones. -Also added code to check for atoi() errors (e.g. truncation). At least on -some platforms (e.g. Solaris) atoi() is supposed to set errno, but it -doesn't. ckuus3.c, ckucmd.c, 4 Oct 2003. - -Added /DEFAULT: to ASK-class commands (ASK, ASKQ, GETOK): - - . For popups: no way to send defaults to popup_readtext() or popup_readpass(). - . For GUI ASK[Q], pass default to gui_txt_dialog(). - . For GUI GETOK, convert "yes" "ok" or "no" default to number for uq_ok(). - . For Text GETOK, add default to cmkey(). - . For Text ASK[Q], add default to cmtxt(). - . For GETC, GETKEY, and READ: no changes. - -GETOK, ASK, and ASKQ with /TIMEOUT: no longer fail when the timer goes off -if a /DEFAULT was supplied. The GUI functions (uq_blah) don't seem to -support timeouts. Only the text version has been tested. ckuus[26].c, -4 Oct 2003. - -From Jeff: add /DEFAULT: for popups. ckuus6.c. 6 Oct 2003. - -Change SET DIAL INTERVAL to be like SET DIAL RETRIES. ckuus[34].c, 6 Oct 2003. - -Added target for HP-UX 10/11 + OpenSSL built with gcc, from Chris Cheney. -Makefile, 12 Oct 2003. - -From Jeff, 6 Nov 2003: - . #ifdef adjustments: ckcftp.c, ckcdeb.h - . Fix spurious consumption of first byte(s) on Telnet connection: ckctel.c - . Another HP PJL test for scanfile: ckuusx.c. - . K95: Recognize DG4xx protected fields in DG2xx emulation: ckuus7.c. - . Add SSLeay version display to SHOW AUTH command: ckuus7.c - . Improved SET MOUSE CLEAR help text: ckuus2.c. - . Improved Kverbs help text: ckuus2.c (+ new IBM-3151 Kverbs). - . Some changes to ck_ssl.c, ckuath.c. - -From PeterE, 10 Nov 2003: - . Improved HP-UX 10/11 makefile targets for OpenSSL. - . #ifdef fix for OpenSSL on HP-UX: ck_ssl.c. - -Another new makefile from PeterE with improved and integrated HP-UX targets. -12 Nov 2003. - -A couple fixes to the solaris9g+krb5+krb4+openssl+shadow+pam+zlib target -from Jeff. Added a solaris9g+openssl+shadow+pam+zlib target. makefile, -21 Nov 2003. - -From Jeff, 30 Nov 2003: - . Fix SEND /MOVE-TO: ckuusr.c. - . Fix K95 SET TITLE to allow quotes/braces around text: ckuus7.c. - . Improved "set term autodownload ?" response: ckuus5.c. - . Fix SHOW FEATURES to specify the protocol for encryption: ckuus5.c - . Make {SEND, RECEIVE} {MOVE-TO, RENAME-TO} work for XYZMODEM (K95 only). - -From Jeff: 7 Jan 2004: - . At one point Frank started to add a timer parameter to the - uq_txt() function but he only did it for the non-ANSI - compilers. I added it for the ANSI compilers, fixed the - prototypes and provided a default value easily changed - DEFAULT_UQ_TIMEOUT: ckcker.h, ckuus[36].c, ck_ssl.c, ckcftp.c, ckuath.c. - . Fixed SET TERMINAL DEBUG ON (typo in variable name): ckuus7.c. - . Fixed BEEP INFORMATION; previously it made no sound, now uses - MB_ICONQUESTION. ckuusx.c. - -From Ian Beckwith (Debianization), 7 Jan 2004: - . Search dir/ckermit for docs, as well as dir/kermit in cmdini(): ckuus5.c. - . New linux+krb5+krb4+openssl+shadow+pam target (kitchen sink minus SRP, - which Debian does not distribute): makefile. - ? Mangles the DESTDIR support in makefile to install into a staging area: - makefile (I didn't take this one yet). - -Updated copyright notices for 2004, all modules. 7 Jan 2004. - -Added INPUT /NOMATCH, allowing INPUT to be used for a fixed amount of time -without attempting to match any text or patterns, so it's no longer -necessary to "input 600 STRING_THAT_WILL_NEVER_COME". If /NOMATCH is -included, INPUT succeeds if the timeout expires, with \v(instatus) = 1 -(meaning "timed out"); fails upon interruption or i/o error. ckuusr.h, -ckuus[r24].c, 7 Jan 2004. - -Added SET INPUT SCALE-FACTOR . This scales all INPUT timeouts by the -given factor, allowing time-sensitive scripts to be adjusted to changing -conditions such as congested networks or different-speed modems without -having to change each INPUT-class command. This affects only those timeouts -that are given in seconds, not as wall-clock times. Although the scale -factor can have a fractional part, the INPUT timeout is still an integer. -Added this to SHOW INPUT, and added a \v(inscale) variable for it. -ckuusr.h, ckuus[r257].c, 7 Jan 2004. - -undef \%a, \fverify(abc,\%a) returns 0, which makes it look as if \%a is a -string composed of a's, b's, and/or c's, when in fact it contains nothing. -Changed \fverify() to return -1 in this case. ckuus4.c, 12 Jan 2004. - -\fcode(xxx) returned an empty string if its argument string was empty. This -makes it unsafe to use in arithmetic or boolean expressions. Changed it to -return 0 if its argument was missing, null, or empty. ckuus4.c, 12 Jan 2004. - -Updated \verify() and \fcode() help text. ckuus2.c, 12 Jan 2004. - -While setting up IKSD, Ian Beckwith noticed that including the --initfile: -option caused Kermit to start parsing its own Copyright string as if it were -the command line, and eventually crash. I couldn't reproduce on Solaris / -Sparc but I could in Linux / i386 (what Ian is using) -- a change from Jeff -on 28 Apr 2003 set the command-line arg pointer to a literal empty string in -prescan() about line 1740 of of ckuus4.c; the pointer is incremented next -time thru the loop, resulting in random memory being referenced. Fixed by -setting the pointer to NULL instead of "". ckuus4.c, 12 Jan 2004. - -declare \&a[999999999999999] would dump core on some platforms. atoi() -or whatever would truncate the dimension to maxint. When we add 1 to the -result, we get a negative number, which is used as an index, loop test, etc. -Fixed both dodcl() and dclarray() to check for (n+1 < 0). ckuus[r5].c, -12 Jan 2004. - -Unix zchki() would fail on /dev/tty, which is unreasonable. This prevented -FOPEN /READ from reading from the terminal. zchki() already allowed for -/dev/null, so I added /dev/tty to the list of specials. Ditto for FOPEN -/WRITE and zchko(). ckufio.c 13 Jan 2004. - -Added untabify() routine to ckclib.[ch], 13 Jan 2004. -Added FREAD /TRIM and /UNTABIFY. ckuus[27].c, 13 Jan 2004. -Added \funtabify(). ckuusr.h, ckuus[24].c, 13 Jan 2004. - -Dat Nguyen noticed that (setq u 'p') followed by (u) dumped core. This was -caused by an over-clever optimization that skipped mallocs for short -literals, but then went on later to try to free one that hadn't been -malloc'd. Fixed in dosexp(): ckuus3.c, 14 Jan 2004. - -Catch another copyright date. ckuus5.c, 14 Jan 2004. - -Fixed SWITCH to work even when SET COMMAND DOUBLEQUOTE OFF (from Mark -Sapiro). ckuus5.c, 15 Jan 2004. - -Changed version to 8.0.211 so scripts can test for recently added features. -ckcmai.c, 15 Jan 2004. - -Fixed a glitch in K95 "help set port". ckuus2.c, 20 Jan 2004. - -Fix from Jeff: Connections to a TLS-aware protocol which require a reconnect -upon certificate verification failure could not reconnect if the connection -was initiated from the command line or via a URL. ckctel.c ckcmai.c -ckuusr.c ckuus7.c ckuusy.c, 20 Jan 2004. - -From Alex Lewin: makefile target and #ifdef for Mac OS X 10.3 (Panther): -makefile, ckcnet.c, 7 Feb 2004. - -Added KFLAGS to sco32v507 targets to make PTY and SSH commands work. The -same flags could probably also be added to earlier OSR5 targets but they -have not been tested there. makefile, 7 Feb 2004. - -Checked a complaint that "LOCAL &a" did not make array \&a[] local. Indeed -it did not, and can not. You have to use the full syntax in the LOCAL -command, "LOCAL \&a[]", or else it doesn't know it's not a macro named &a. -7 Feb 2004. - -Fixed some confusion in creating IKSD database file and temp-file names. -I was calling zfnqfp() without remembering that the path member of the -returned struct included the filename, so to get just the directory name, -I needed to strip the filename from the right. ckuusy.c, 2 Mar 2004. - -New ckuath.c, ck_ssl.c from Jeff. 2 Mar 2004. - -Updated Jeff's affiliation in VERSION command text. ckuusr.c, 2 Mar 2004. - -Designation changed from Dev.00 to Beta.01. ckcmai.c, 2 Mar 2004. - -Fixed zrename() syslogging -- it had success and failure reversed. -Beta.02: ckufio.c, 4 Mar 2004. - -Problem: when accessing IKSD via a kermit:// or iksd:// URL, and a user ID -is given but no password, doxarg() set the password to "" instead of leaving -it NULL, but all the tests in dourl() are for NULL. Fixed in doxarg(): -ckuusy.c, 5 Mar 2004. - -The logic in dourl() about which macro to construct (login and connect, -login and get directory listing, or login and fetch a file) was a bit off, -so all three cases were not handled. ckcmai.c, 5 Mar 2004. - -Trial Beta builds: - . HP-UX B.11.11 PA-RISC - . HP-UX B.11.23 IA64 - . Tru64 4.0G Alpha - . Tru64 5.1B Alpha - . Debian 3.0 i386 - . Red Hat ES 2.1 i386 - . Slackware 9.1 i386 - . VMS 7.3-1 Alpha + UCX 5.3 - . VMS 7.3-1 Alpha no TCP/IP - . VMS 7.3 Alpha MultiNet 4.3 A-X - . SCO UnixWare 7.1.4 i386 - . SCO OSR5.0.7 i386 - . Solaris 9 Sparc - -Fixed compiler warning in doxarg() caused by typo (NULL instead of NUL) in -the 5 March doxarg() edit. ckuusy.c, 9 Mar 2004. - -IKSD (kermit://) command-line URLs did not work right if the client had -already preauthenticated with Kerberos or somesuch because they tried to log -in again with REMOTE LOGIN. The macros constructed in doxarg() needed to -check \v(authstate) before attempting REMOTE LOGIN. ckcmai.c, 10 Mar 2004. - -Added ckuker.nr to x.sh (ckdaily upload) and updated ckuker.nr with current -version number and dates. 10 Mar 2004. - -Replaced hardwired references to /usr/local in makefile with $(prefix) -(which defaults to /usr/local, but can be overridden on the command line), -suggested by Nelson Beebe for use with Configure. 10 Mar 2004. - -From Nelson Beebe: In the Kermit makefile in the install target commands, -line 981 reads: - - cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\ - -Could you please add this line before it: - - rm -f $(DESTDIR)$(BINDIR)/kermit;\ - -Some sites (mine included) keep multiple versions of software around, -with hard links between $(prefix)/progname and $(prefix)/progname-x.y.z. -Failure to remove the $(prefix)/progname at "make install" time then -replaces the old $(prefix)/progname-x.y.z with the new one, destroying -an old version that the site wanted to be preserved. makefile, 10 Mar 2004. - -Minor syntax and typo fixes (mostly prototypes): ckcdeb.h, ckcfns.c, -ckclib.c, ckufio.c, ckuusr.h, ckuusx.c, 10 Mar 2004. (I still have a few -more to do.) - -Added CC=$(CC) CC2=$(CC2) to many (but not all) makefile targets that -reference other makefile targets. On some platforms (notably AIX, Solaris, -SunOS) there are specific targets for different compilers, so I skipped -those. makefile, 10 Mar 2004. - -Added error checking to kermit:// URL macros, so they don't plow ahead -after the connection is closed. ckcmai.c, 11 Mar 2004. - -Added FreeBSD 4.9 and 5.1 targets (only the herald is affected). -makefile, ckuver.h, 11 Mar 2004. - -Added "LIBS=-lcrypt" to bsd44 targets since nowadays crypt is almost always -unbundled from libc. Also added explanatory notes. makefile, 11 Mar 2004. - -Changed MANDIR to default to $(manroot)/man/man1, and manroot to default -to $(prefix). More adding of CC=$(CC) clauses: {Free,Net,Open}BSD, 4.4BSD. -makefile, 11 Mar 2004. - -Miscellaneous cleanups: ckuusx.c, ckcnet.c, ckufio.c, 11 Mar 2004. - -Corrected the check in the linux target to see if /usr/include/crypt.h -exists, and if so to define HAVE_CRYPT_H, which is used in ckcdeb.h to -#include to get the prototype for crypt() and prevent bogus -conversions on its return type on 64-bit platforms (the previous test wasn't -quite right and the resulting symbol wasn't spelled right). makefile, -12 Mar 2004. - -From Jeff, 14 Mar 2004: - . Initialize localuidbuf[] in tn_snenv(): ckctel.c. - . Remove remote-mode checks in hupok() for K95G only (why?): ckuus3.c. - . Add help text for new K95-only TYPE /GUI switches: ckuus2.c. - . TYPE /GUI parsing, ...: ckuusr.c. - . TYPE /GUI action, dotype(): ckuus6.c - . Change Jeff's affiliation: most modules. - -20 Mar 2004: Looked into adding long file support, i.e. handling files more -than 2GB (or 4GB) long. Discovered very quickly this would be a major -project. Each platform has a different API, or environment, or transition -plan, or whatever -- a nightmare to handle in portable code. At the very -least we'll need to convert a lot of Kermit variables from long or unsigned -long to some new Kermit type, which in turn is #defined or typedef'd -appropriately for each platform (to off_t or size_t or whatever). Then we -have to worry about the details of open() vs fopen(); printf() formats (%lld -vs %Ld vs %"PRId64"...), platforms like HP-UX where you might have to use -different APIs for different file systems on the same computer, etc. We'll -need to confront this soon, but let's get a good stable 8.0.211 release out -first! Meanwhile, for future reference, here are a few articles: - -General: http://freshmeat.net/articles/view/709/ -Linux: http://www.ece.utexas.edu/~luo/linux_lfs.html -HP-UX: http://devrsrc1.external.hp.com/STK/partner/lg_files.pdf -Solaris: http://wwws.sun.com/software/whitepapers/wp-largefiles/largefiles.pdf - -Looked into FTP timeouts. It appears I can just call empty() (which is -nothing more than a front end for select()) with the desired timeout before -any kind of network read. If it returns <= 0, we have a timeout. This is -not quite the same as using alarm() / signal() around a recv() (which could -get stuck) but alarm() / signal() are not not used in the FTP module and are -not naturally portable to Windows, but select() is already in use in the FTP -module for both Unix and Windows. This form of timeout could be used -portably for both command response and data reads. What about writes to the -command or data socket? They can get stuck for hours and hours without -returning too, but the select() approach won't help here -- we need the -actual send() or recv() to time out, or be wrapped in an alarm()/signal() -kind of mechanism. But if we can do that for sends, we can also do it for -receives. Better check with Jeff before I start programming anything. -20 Mar 2004. - -Later: Decided to postpone the above two projects (ditto IPv6) until after -8.0.211 is released because both will have major impacts on portability. -Grumble: all i/o APIs should have been designed from the beginning with a -timeout parameter. To this day, hardly any have this feature. - -3-4 Apr 2004: More 8.0.211 Beta.02+ test builds: - - . FreeBSD 3.3 - . FreeBSD 4.4 - . Linux Debian 2.1 - . Linux RH 6.1 - . Linux RH 7.1 - . Linux RH 7.2 - . Linux RH 9 (with 84 different combinations of feature selection) - . Linux SuSE 6.4 - . Linux SuSE 7.0 - . NetBSD 1.4.1 - . NetBSD 1.5.2 - . OpenBSD 2.5 - . OpenBSD 3.0 - . QNX 4.25 - . SCO UnixWare 2.1.3 - . SCO UnixWare 7.1.4 - . SCO OpenServer 5.0.7 - . SCO XENIX 2.3.4 (no TCP) - -Changes needed: None. - -Problem: SCO XENIX 2.3.4 network build failed in the FTP module with -header-file syntax and conflicting-definitions trouble. I'm not going to -try to fix it; 8.0.209 built OK with FTP, so we'll just keep that one -available. - -Got access to VMS 8.1 on IA64. Building the nonet version of C-Kermit -required minor modifications to ckvvms.h, ckv[ft]io.c, and ckvcon.c, to -account for a third architecture. Also to SHOW FEATURES in ckuus5.c. Once -that was done, the UCX 5.5 version built OK too. Starts OK, makes Telnet -connection OK, sends files. Has some obvious glitches though -- "stat" -after a file transfer reports 0 elapsed time (in fact it was 00:09:48) and -1219174400 cps (when in fact it was 10364). This doesn't happen on the -Alpha. Btw, the IA64 binary is twice as big as the Alpha one. Changed -to Beta.03. 5 Apr 2004. - -Fixed the ckdaily script to include the makefile and man page in the Zip -file (they were not included because the Zip file was intended mainly for -VMS users, but some Unix users prefer Zip to tar.gz). 6 Apr 2004. - -Traced problems in VMS/IA64 statistics report to rftimer()/gftimer() in -ckvtio.c, which use sys$ and lib$ calls to figure elapsed time. These work -on VAX and Alpha but not IA64. Sent a report to the chief engineer of the -IA64 VMS port; he says it's probably a bug in VMS 8.1 (which is not a real -release); he'll make sure it's fixed in 8.2. As an experiment, tried -swapping in the Unix versions of these routines (which call gettimeofday() -etc). They seem work just fine (it hung a couple times but I think that's -because the underlying system hung too; trying it later on a new connection, -it was fine; however I noticed a BIG discrepancy in throughput between -sending and receiving). Moved definitions for VMS64BIT and VMSI64 to -ckcdeb.h so all modules can use them and added them to the SHOW FEATURES -display. Added VMSV80 definition to build procedure. Beta.03+. ckcdeb.h, -ckcuus5.c, ckcvvms.h, ckvtio.c, ckvker.com, 6 Apr 2004. - -While doing the build-all, I noticed the VMS version did not build with -Multinet or older UCX versions, always with the same errors -- undeclared -variables, undefined symbols, all TCP/IP related. This didn't happen a -couple weeks ago... Somehow the order of #includes was messed up -- -ckuusr.h depended on symbols that are defined in ckcnet.h, but ckcnet.h -was being included after ckuusr.h... this was compounded by two missing -commas in ckvker.com. 11 Apr 2004. - -Removed Beta designation, released as 8.0.211, 10 Apr 2004. - -I had somehow lost the edit to ckutio.c that changed the UUCP lockfile for -Mac OS X from /var/spool/uucp to /var/spool/lock. So I slipped it in and -re-uploaded version 8.0.211. You can tell the difference because SHOW -VERSIONS has 17 Apr 2004 for the Communications I/O module. Also the 10.3 -executable now has a designer banner: "Mac OS X 10.3". makefile, ckuver.h, -ckutio.c, ckuus[45].c, 17 Apr 2004. - ----8.0.211--- - -Removed "wermit" from "make clean" (how did it get there?). makefile. - -From Jeff, applied 10 May 2004. - . Rearrange #ifdefs that define OS/2-only features. ckcdeb.h. - . Fix two strncat()s that should have been ckstrncat()s. ckuus7.c. - . Fix two strncat()s that should have been ckstrncat()s. ckuus4.c. - . Fix one strncat(). ckcfns.c. - . SET FTP CHAR ON used backwards byte order when output to screen. ckcfns.c. - . Fix two strncat()s. ckuus3.c. - . Add SET NETWORK TYPE NAMED-PIPE for K95. ckuus3.c. - . Add "No active connections" message to hupok(). ckuus3.c. - . Fix many strncat()s. ckcnet.c. - . Fix some strncat()s. ckcftp.c - . Make FTP port unsigned short for 16383 < port < 65536. ckcftp.c. - . Improvements to FTP USER command. ckcftp.c. - . Fix FEAT parsing to allow for various forms of whitespace. ckcftp.c. - -S-Expression (AND FOO BAR) would not short-circuit if FOO's value was 0, -even though short-circuiting code has been there since Day 1. Similarly for -(OR BAR FOO). Turns out the first operand was a special case that bypassed -the short-circuit check. Fixed in dosexp(): ckuus3.c, 10 May 2004. - -Red Hat 7.3 (and maybe others) referenced open() without first -ensuring it was declared. The declaration is in , which is after - in ckutio.c series of #includes. Made a special case for this. -ckutio.c (see comments), 10 May 2004. - -If the local Kermit's parity is set to SPACE and then a file arrives via -autodownload, automatic parity detection improperly switches it to NONE. -Fixed in rpack() by switching parity automatically only if parchk() returns -> 0 (rather than > -1), since NONE and SPACE are indistinguishable. A -bigger problem still remains: autodownload does not work at all if the -sender is using actual parity bits (even, odd, or mark) and the receiver's -parity is NONE. ckcfn2.c, 10 May 2004. - -When a DIAL MACRO is defined and the phone number is comprised of more than -one "word" (i.e. contains spaces), the dial macro loses the second and -subsequent words after the first call. Fixed in xdial() by inserting quotes -around phone number before passing it to xdial(). ckuus6.c, 10 May 2004. - -DIAL MACRO fix was not right; the quotes were kept as part of the phone -number and sent to the modem. dodo() pokes its argument to separate the -macro argument string into its component arguments. xdial() is called -repeatedly on the same string, so after the first time, a NUL has been -deposited after the first word of the telephone number. The fix is to have -xdial() create a pokeable copy of its argument string before calling -dodo(dial-macro,args...). It might seem odd that dodo pokes its argument, -but making copies would be would be prohibitive in space and time. -ckuus6.c, 23 May 2004. - -FTP CD did not strip braces or quotes from around its argument. Fixed in -doftprmt(): ckcftp.c, 23 May 2004. - -Added client side of REMOTE MESSAGE/RMESSAGE/RMSG: ckuus[r27].c, 23 May 2004. - -Server side of REMOTE MESSAGE: ckcpro.w, 23 May 2004. - -From Dave Sneddon: an updated CKVKER.COM containing a fix where the -COMPAQ_SSL symbol was not defined but later referenced which generated an -undefined symbol error. ckvker.com, 5 Jan 2005. - -From Andy Tanenbaum (28 May 2005): - . Fix an errant prototype in ckcker.h and ckucmd.h - () instead of (void). - . Add support for MINIX 3.0. makefile, ckutio.c, ckufio.c, ckuver.h. - -Fixed messed-up sndhlp() call which apparently had been jiggered to -compensate for the bad prototype which has now been fixed, ckcpro.w, -12 Jun 2005. - -From Jeff (12 June 2005): - . Security updates. ck_ssl.c, ck_crp.c, ckuath.c. - . Fix bug in K95 SET PRINTER CHARACTER-SET. ckuus3.c. - . Add printer character-set to K95 SHOW PRINTER display. ckuus5,c - . Add SET MSKERMIT FILE-RENAMING to K95. ckuus7.c, ckuusr.h. - . Add help for K95 SET MSKERMIT. ckuus2.c. - . Add SET GUI CLOSE to K95. ckuusr.h, ckuus2.c, ckuus3.c - . Add help text for K95 SET GUI MENUBAR and TOOLBAR. ckuus2.c. - . Add --noclose command-line option for K95. ckuusy.c - . Add PAM support for Mac OS X. ckufio.c. - . Add GSSAPI support for Mac OS X. ckcftp.c. - . Pick up more URL options. ckcker.h, ckuusy.c. - . Fix bug in delta-time calculation across year boundary. ckucmd.c. - . Add Secure Endpoints to copyright notices. ckcmai.c. - . Fix FTP HELP to override unverbose setting. ckcftp.c. - . Fix assorted minor typos. - -From Matthias Kurz: automatic herald generation for NetBSD 2.0 and later, -"make netbsd2". ckuver.h, makefile, 12 Jun 2005. - -Added SET TERMINAL LF-DISPLAY, like CR-DISPLAY but for linefeed rather than -carriage return. ckuusr.h, ckuus[257x].c, 12 Jun 2005. - -Made a command-line option --unbuffered to do what the -DNONOSETBUF -compile-time option does, i.e. force unbuffered console i/o. Unix only. -ckuusr.h, ckuusy.c, ckutio.c, 12 Jun 2005. - -Fixed getiact() (which displays TERM IDLE-ACTION setting) to display -space as \{32}. ckuus7.c, 12 Jun 2005. - -Added LMV as a synonym for LRENAME, which is itself a synonym for LOCAL -RENAME. ckuusr.c, 12 Jun 2005. - -Put HELP SET TERMINAL DG-UNIX-MODE text where it belonged. ckuus2.c, -12 Jun 2005. - -Added IF LINK (Unix only) to test if a filename is a symlink. Uses the most -simpleminded possible method, calls readlink() to see if it succeeds or fails. -No other method is dependable across different Unixes. This code should be -portable because I already use readlink() elsewhere within exactly the same -#ifdefs. ckufio.c, ckuus2.c, ckuus6.c, 12 Jun 2005. - -Fixed a bug in which \fdir() wouldn't work when its argument was the nonwild -name of a directory file. zxpand(): ckufio.c, 12 Jun 2005. - -Made \fdirectory() a synonym for \fdirectories(). Made \fdir() an -acceptable abbreviation for these, even though it clashes with \fdirname(), -which still works as before. ckuus4.c, 12 Jun 2005. - -Added the long-needed \flopx() function, to return rightmost pieces of -strings, such as file extensions. \fstripx() and \flopx() are the -orthogonal functions we need to pick filenames apart from the right: -\stripx(foo.tar.gz) = foo.tar; flopx(foo.tar.gz) = gz. ckuusr.h, ckuusr.c, -ckuus2.c, 12 Jun 2005. - -Removed reference to defunct fax number, ckcmai.c, 12 Jun 2005. - -Added -DHAVE_PTMX to linux+krb5+openssl+zlib+shadow+pam. From Timothy Folks. -makefile, 12 Jun 2005. - -Built on Solaris 9 and NetBSD 2.0. - -From Jeff: New build target for Mac OS X 10.3 with Kerberos 5 and SSL. -makefile, 14 Jun 2005. - -Fixed error in ckuver.h NetBSD #ifdefs. 15 Jun 2005. - -Fixed SET TERMINAL IDLE-ACTION OUTPUT to work as documented, namely if the -output string is empty, to send a NUL. Previously there was no way to make -it send a NUL. ckuus7.c, 15 Jun 2005. - -Suppose (in Unix, for example) a filename contains wildcard characters, such -as {abc}.txt. When referring to such a file (e.g. in a SEND command), these -characters can be quoted, e.g. \{abc\}.txt. But if the file list has been -obtained programmatically, e.g. stored in an array, there is no way, short -of tedious, complicated, and error-prone string processing, to reference the -file. For this we need a way to disable wildcard processing. I added { ON, -OFF } choices for the SET WILD and SHOW FILE commands: ckuusr.h, ckuus[234].c. -{ ON, OFF } turns wildcarding off and on without affecting the { KERMIT, -SHELL } agent choice; it does this by setting a new and separate global -variable, wildena. Added semantics to ckufio.c. Crude but effective. It -might have been more Unixlike to add Yet Another form of quoting but we -have enough of that already (later maybe I'll add a \function() for this). -Needs to be propogated to Windows and VMS. 15 Jun 2005. - -Improved and fixed typos in HELP WILDCARD and HELP PATTERN. ckuus2.c, -15 Jun 2005. - -The GREP command, and probably anything else that uses ckmatch() for pattern -matching, failed on patterns like */[0-3]*.html. The [a-b] handler, when -failing to match at the current position, neglected to back up the pattern -and try again on the remainder of the string. I also fixed another case, in -which matching a literal string a*b?c against the pattern a[*?]*[?*]c caused -ckmatch() to recurse until it blew up. ckclib.c, 16 Jun 2005. - -Added builds and designer banner for Solaris 10. makefile, ckuver.h, -27 Jun 2005. - -Defined CKHTTP for NetBSD, the HTTP code builds and works fine there. -ckcdeb.h, 2 Jul 2005. - -Added #ifndef OSF40..#endif around definition of inet_aton() in ck_ssl() -to allow building in Tru64. Added tru64-51b+openssl to makefile. -15 Jul 2005. - -HTTP GET would fail if the URL contained any metacharacters, no matter how -much you quoted them. Although it uses cmfld() to parse the (partial) URL, -it then uses cmofi() to get the output filename, which by default is the -"filename" from the URL, which might be something like "rankem.asp?id=1639". -cmofi() refuses to accept unquoted metacharacters in "filenames" and that's -what happens in this case if the output filename is not specified. Worked -around this by disabling wildcard processing around HTTP GET using the new -"wildena" variable from June 15th. ckuusr.c, 18 Jul 2005. - -Fixed the June 16th fix to the pattern matcher. I fixed a real problem, but -I made an unrelated optimization that introduced new ones. ckclib.c, -18 Jul 2005. - -Added missing help text for \fb64encode() and \fb64decode(). ckuus2.c, -18 Jul 2005. - -Changed SET WILD OFF help text to warn that this setting prevents the -creation of backup files (later I'll have to see if something more useful -can be done about this). ckuus2.c, 18 Jul 2005. - -Built OK on Mac OS X 10.4.2 using macosx103 target (but with some -"signedness" warnings in ckcnet.c and ckcftp.c). Built on Unixware 7.1.4 -with uw7 target. 27-28 Jul 2005. - -Added -DCKHTTP to Mac OS X 10.3-.4 KFLAGS. Makefile, 4 Aug 2005. - -Built on BSDI 4.3.1. Added -DCKHTTP. - -Compact substring notation extended to accept not only start:length but also -start-end notation. Thus \s(foo[12:18]) means the substring of foo starting -at position 12 of length 18, and tne new \s(foo[12-18]) means the substring -of foo starting at position 12 and ending with position 18. Ditto for -\:(\%a), etc. ckuus4.c, 9 Aug 2005. - -See correspondence with Mark Sapiro, Nov 2003 and Sep 2004, about certain -variations on IF syntax having been broken by the introduction of "immediate -macros" circa 1999. It seems the problem -- variables not being expanded -- -always occurs in the ELSE part when (a) the IF condition is false; (b) the -ELSE command is "standalone", i.e. expressed as a separate command after the -IF command (original C-Kermit 5A syntax), and (c) its command list is a block. -This would suggest the problem is in the XXELS parser. - -Going back to 1999, I find this: - Fixed a problem Jim Whitby noticed with quoting in ELSE statements. This - problem was introduced when I unified IF and XIF, and occurs only when - ELSE begins on a line, followed by a { command list } rather than a single - command. The solution (gross) was to make a special version of pushcmd() - (called pushqcmd()) for this situation, which doubles backslashes while - copying, BUT ONLY IF it's a command list (i.e. starts with "{"); otherwise - we break lots of other stuff. Result passes Jim's test and still passes - ckedemo.ksc and iftest.ksc. ckucmd.c, ckuus6.c, 27 Sep 99. - -I undid this change and it made no difference to all the other IF -constructions (in fact, it fixed an urelated one that was broken, so now -iftest scores 54 out of 54, instead of 53). However, it does not fix the -ELSE problem; in fact it pushes it all the way in the other direction: - - The opposite occurs any time you try to execute an immediate macro inside a - macro or any other { block }: not only is the variable evaluated, it is - evaluated into nothing. It looks like this happens only in immediate - macros, i.e. *commands* that start with '{'. So maybe we really have two - isolated problems, that can each be fixed. - -The situation is illustrated by this simple script: - - def xx { - if false { echo \%1, echo \%2 } - else { echo \%3, echo \%4 } - } - xx one two three four - -With pushqcmd() it echoes the variable names literally; with pushcmd() it -echoes empty lines. Since ELSE, when its argument is a block, dispatches -to the immediate-macro handler, it seems we have unified the two problems, -so fixing one should fix the other. - -The problem is that we define a new temporary macro and then call dodo() to -execute it. But if the definition contains macro arguments, we have added a -new level of macro invocation, thus wiping out the current level of args. -The cure is to expand the variables in the immediate macro in the current -context, before executing it. This means simply changing the cmtxt() call -that reads the immediate macro to specify xxsting as its processing -function, rather than NULL, which is used for real macros to defer their -argument evaluation until after the macro entered. ckuusr.c, 11 Aug 2005. - -Added a new makefile target, macosx10.4, for Mac OS X 10.4. This one uses -an undocumented trick to get the otherwise unavailable-except-by-clicking -Mac OS X version number (in this case 10.4.2) and stuff it into the HERALD -string. makefile, 11 Aug 2005. - -Built OK on Solaris 9, Solaris 10 (with a few implicit declaration warnings -in ckuusx.c), Mac OS X 10.4.2 (with some warnings in ckcnet.c and ckcftp.c), -Mac OS X 10.3.9 (also using the macos10.4 entry, which gets the right -version number, and gets no warnings at all), RH Enterprise Linux AS4 on AMD -x86_64, Tru64 Unix 4.0F, SCO UnixWare 7.1.4 - -For docs and/or scriptlib: Unix C-Kermit can be a stdin/out filter. The -trick is to use the ASK, ASKQ, or GETC command for input, specifying no -prompt, and ECHO or XECHO for output, e.g.: - -while true { - ask line - if fail exit 0 - echo \freverse(\m(line)) -} -exit 0 - -FOPEN didn't do anything with the channel number if the open failed, so any -subsequent command that tried to reference it would get a parse error it was -undefined or non-numeric, not very helpful. Changed FOPEN to set the -channel number to -1 if the file can't be opened. Now subsequent operations -on the channel fail with "Channel -1: File not open". I also added two -magic channel numbers: -8 means that any FILE command (besides OPEN and -STATUS) on that channel is a noop that succeeds silently; -9 is a noop that -fails silently. So now it's possible to simply set a channel number to one -of these values to disable i/o to certain file without getting lots of error -messages. dofile(): ckuus7.c, 12 Aug 2005. - -Added automatic herald construction for UnixWare 7. makefile, 12 Aug 2005. - -Unix isdir() never allowed for arguments that started with tilde, so gave -incorrect results for ~/tmp/ or ~fdc. The problem was mainly invisible -since most commands that parsed file or directory names used cmifi(), cmdir(), -etc, which did the conversions themselves. But IF DIRECTORY was an exception, -since its operand had to be treated as just text, and then tested after it -was parsed. ckufio.c, 13 Aug 2005. - -Fixed the following: -"ckuusx.c", line 8959: warning: implicit function declaration: ckgetpeer -"ckufio.c", line 1869: warning: implicit function declaration: ttwait -"ckufio.c", line 2941: warning: implicit function declaration: mlook -"ckufio.c", line 2943: warning: implicit function declaration: dodo -"ckufio.c", line 2944: warning: implicit function declaration: parser -"ckcftp.c", line 2625: warning: implicit function declaration: delta2sec -"ckcftp.c", line 4071: warning: no explicit type given for parameter: prm -"ckcftp.c", line 8389: warning: no explicit type given for parameter: brief -ckuusx.c, ckufio.c, ckcftp.c, ckucmd.h. 13 Aug 2005. - -Unbuffered stdout code has never worked because the setbuf(stdout,NULL) call -has to occur before the stdout has been used. The reason it's needed is -that some Kermit code writes to stderr (which is unbuffered) and other code -writes to stdout, and therefore typescripts can come out jumbled. Robert -Simmons provided the needed clue when he insisted it -worked only when executed at the very beginning of main(). So I moved the -code to that spot. But since now we also want to make unbuffered a runtime -(command-line) option, I had to do a clunky by-hand pre-prescan inline in -main() to look thru argv[], even before prescan() was called. ckcmai.c, -ckutio.c, ckuusy.c, 13 Aug 2005. (Now that this works, it might be a good -idea to remove all use of stderr from Kermit.) - -Managed, after some finagling, to build a 64-bit version on Solaris 10 at -Utah Math with Sun cc. (Can't make any gcc builds at all, 32- or 64-bit, -they all blow up in .) New target: solaris10_64. makefile, -15 Aug 2005. - -The 64-bit Solaris 10 version compiles and links OK and transfers files in -remote mode. It can make FTP connections and use them, but Telnet connections -always fail with "network unreachable". This is with all default libs and -include files. Nelson has a separate set in /usr/local, which he references -explicitly in all his 64-bit builds, but using these makes no difference. -Some data type is wrong in ckcnet.c. But telnet works fine in 64-bit Linux -and Tru64 builds. Debug logs trace the difference to netopen() (of course), -the spot where we test the results of inet_addr(), which is already marked -suspicious for 64-bit builds. It seems that inet_addr() is of type in_addr_t, -which in turn is u_int32, i.e. an unsigned 32-bit int. Yet the man page says -that failure is indicated by returning -1. I guess this doesn't matter in -32-bit builds, but in the 64-bit world, the test for failure didn't work -right. I made a Solaris-specific workaround, and checked that it works in -both 32-bit and 64-builds. I really hate typedefs. ckcnet.c, 15 Aug 2005. - -Changed the plain-text version (as opposed to the popup or GUI version - the -GUI version, at least, already does this) of ASKQ to echo keystrokes -asterisks rather than simply not echo anything, so it's easier to see what -you're doing, the effects of editing, etc. Experimental; for now, there's -no way to disable this. Not sure if there needs to be. Anyway, to get this -working required a fair amount of cleaning up of gtword(), which was echoing -different ways in different places. ckuus6.c, ckucmd.c, 15 Aug 2005. - -Added a solaris9_64 target for building a 64-bit version on Solaris 9 with -Sun cc. Verified, using the DIR command and \fsize() function on a 4.4GB -file, that the Solaris 64-bit version of Kermit gets the size correctly, and -that it can copy such a file (thus its fopen/fread/fwrite/fclose interface -works right). Initiated a large-file transfer between here and Utah over -SSH and verified that it puts the correct file size in the A packet when -sending; the right quantites are shown on the file transfer display (file -size CPS, percent done, etc). But even at 5Mb/sec, it takes a good while to -transfer 4.4GB, more than 2 hours (not streaming; 30 window slots, 4K -packets, maybe it would go faster with streaming)... After an hour or so, -it filled up the partition and gave up (gracefully) before it reached the -2GB frontier (drained its pending packets, closed the partial file). -Restarted at 12:54, this time with streaming and 8K packets (the speed -wasn't significantly different). This time it transferred 95% of the file -(4187660288 bytes) before failing because the disk filled up. Went to Utah -and started a transfer between two Solaris 10/Sparc hosts; this goes about 8 -times faster. The transfer completed successfully after 17m41s. All fields -in the f.t. display looked right the whole time. Then I verified various -other 64-bit combinations transferring the same 4.4GB file: - - To................ - From Sol Amd i64 Tru - Sol OK OK OK OK Sol = Solaris 10 / Sparc - Amd OK Amd = AMD x86_64 RH Enterprise Linux AS4 - i64 OK i64 = Intel IA64, RH 2.1AS - Tru Tru = Tru64 Unix 4.0F Alpha - -(The other combinations are difficult to test for logistical reasons.) - -Tried sending the same long file with Kermit's FTP client. It chugged along -for a while until I stopped it; it would have taken hours to complete. -There is no indication that it wouldn't have worked, assuming the FTP server -could also handle long files, which who knows. Anyway, Kermit showed all -the right data on the display screen. 17 Aug 2005. - -On AMD x86_64 and IA64 native 64-bit Linux builds, the pty routines did not -work at all. ptsname() dumped core. If I commented out ptsname(), then the -next thing dumped core. The same code works on the other 64-bit builds. -Poking around, I see that this version of Linux has an openpty() function, -which I could try using instead of the current API -- grantpty(), etc. Then -I see that openpty() is already coded into Kermit's pty module, -conditionalized under HAVE_OPENPTY, which has never before been defined for -any build. I added a test to the makefile linux target (look for the -openpty() prototype in , if found define HAVE_OPENPTY as a CFLAG and -also add -lutil to LNKFLAGS). Works fine on the problem builds, and also -on previously working 32-bit builds. makefile, 17 Aug 2005. - -Fixed a bug in the ASKQ echo asterisks code, which made the VMS version of -C-Kermit always echo asterisks. Turns out that some code in the main parse -loop to reset command-specific flags was in the wrong place, which had other -effects too, for example ASKQ temporarily turns off debug logging as a -security measure, but the code to turn it back on was skipped in most cases. -Some other side effects related to the DIRECTORY and CD commands might have -been possible but I haven't seen them. ckuus[56].c, 23 Aug 2005. - -Problem reported when sending a file to VMS when the name in the F packet -starts with a device specification and does not include a directory field, -and PATHNAMES are RELATIVE. Example: dsk:foo.bar becomes f_oo.bar. The -code assumes that if there is a device field, it is followed by a directory -field, and it inserts a dot after the '[', which in this case is not there. -Later the dot becomes '_' because of the only-one-dot rule. Solution: only -insert the dot if there really is an opening bracket. nzrtol(): ckvfio.c, -23 Aug 2005. - -A report on the newsgroup complains that C-Kermit and K95 servers were -sending REMOTE DIR listings with only #J line terminators, rather than #M#J. -Yet all the other REMOTE xxx responses arrived with #M#J. snddir() was -neglecting to switch to text mode. ckcfns.c, 26 Aug 2005. - -Back to long files. What happens if 32-bit Kermit is sent a long file? -It gets an A-packet that looks like this: - - ^A_"A."U1""B8#120050815 18:28:03!'42920641*4395073536,#775-!7@ )CP - -The 32-bit receiver reacts like so: - - gattr length[4395073536]=100106240 - -the first number being the string from the A-packet, the second being the -value of the long int it was converted to by atol(). Clearly not equal in -this case. When this happens Kermit should reject the file instead of -accepting it and then getting a horrible error a long time later. Added -code to gattr() to convert the result of atol() back to a string and compare -it with the original string; if they're not equal, reject the file on the -assumption that the only reason this could happen is overflow. Also some -other code in case the sender sends the only LENGTHK attribute. Now files -whose lengths are too big for a long int are rejected right away, provided -the sender sends the length in an A packet ahead of the file itself. If -this new code should ever cause a problem, it can be bypassed with SET -ATTRIBUTE LENGTH OFF. ckcfn3.c, 26 Aug 2005. - -As I recall from when I was testing this a few weeks ago, when the too-big -length is not caught at A-packet time, the transfer fails more or less -gracefully when the first attempt is made to write past the limit. I went -to doublecheck this by sending a big file from the 64-bit Solaris10 version -to a 32-bit Mac OS X version that does not have today's code. The Mac -thinks the incoming file is 2GB long when it's really 4GB+. But in this -case, something new happens! Although the percent done and transfer rate go -negative, the file keeps coming. It would seem that Mac OS X lets us create -long files without using any special APIs. The transfer runs to completion. -Mac OS X Kermit says SUCCESS (but gets the byte count and cps wrong, of -course). But then a STATUS command says FAILURE. The file was, however, -transferred successfully; it is exactly the same length and compares byte -for byte with the original. This tells me that in the Mac OS X version -- -and how many others like it??? -- today's rejection code should not be -enabled. Meanwhile I put today's new code in #ifndef NOCHECKOVERFLOW..#endif, -and defined this symbol in the Mac OS X 10.4 target. Over time, I'll have -to find out what other platforms have this characteristic. And of course -I'll also have to do something about file-transfer display, statistics, and -status. makefile, ckcfn3.c, 26 Aug 2005. - -From now on I'm going to bump the Dev.xx number each time I upload a new -ckdaily. This one will be Dev.02. ckckmai.c, 26 Aug 2005. - -Got rid of all the extraneous FreeBSD 4 and 5 build targets. Now there's -one (freebsd) for all FreeBSD 4.1 and later. makefile, 27 Aug 2005. - -Mac OS X 10.4 (Tiger) is a 64-bit OS. Building C-Kermit 0n 10.4.2 without -any special switches stilll gives a 32-bit executable. Ditto building with --mpowerpc64. Further investigation turned up a tip sheet on MySQL that says -you have to include all of these: -mpowerpc64 -mcpu=G5 -mtune=G5 -arch -ppc64. That did the trick. New makefile target: macosx10.4_64. But the -10.4.2 system I tried did not have 64-bit [n]curses or resolv libs, so this -build has no -DNOCURSES -DNO_DNS_SRV. makefile, 27 Aug 2005. - -Created a symbol CK_64BIT to indicate true 64-bit builds at compile time. -Added 64-bit announcement to the startup herald and the VERSION text. -ckcdeb.h, ckuus[r5].c, 27 Aug 2005. - -Added a built-in variable \v(bits) to indicate the size of the build -(16, 32, 64, or whatever else sizeof() might report). ckuusr.h, ckuus4.c, -27 Aug 2005. - -Got rid of all the warnings in 64-bit Mac OS X about args to getsockopt(), -getsockname(), and getpeername(), and the comparisons on the return value -of inet_addr(). ckcnet.[ch], 27 Aug 2005. - -Now to check the effects on other builds... - Linux on AMD64: ok. - Linux on IA64: ok. - Linux on i386: ok. - Mac OS X 10.3.9 32-bit: ok. - Solaris 10 64-bit: ok. - Solaris 9 32-bit: ok. - Tru64 4.0F: ok. - FreeBSD 4.11: ok. - FreeBSD 5.4 ia64 (64-bit): ok. - FreeBSD 5.4 i386 (32-bit): ok. - -The Tru64 5.1B build totally blew up because they have their own unique -sockopt/etc length-argument data type (int!), so I had to roll back on using -socklen_t for this in all 64-bit builds. Checked to make sure it still -builds on Tru64 4.0F after this change (it does). ckcnet.h, 27 Aug 2005. - -The HP-UX 11i/ia64 build comes out to be 32-bit but thinks it's 64-bit. -CK_64BIT is set because __ia64 is defined. So how do I actually make a -64-bit HP-UX build? I tried adding +DD64 to CFLAGS, and this generates -64-bit object files but linking fails to find the needed 64-bit libs -(e.g. -lm). For now I added an exception for HPUX to the CK_64BIT -definition section. ckcdeb.h, 27 Aug 2005. - -Took the time to verify my recollection about the "graceful failure" on a -regular Pentium Linux system when receiving a too-big file... OK, it's not -exactly graceful. It gets a "File size limit exceeded" error; the message -is printed in the middle of the file-transfer display, apparently not by -Kermit, and Kermit exits immediately. Looks like a trap... Yup. "File -size limit exceeded" is SIGXFSZ (25). What happens if we set it to SIG_IGN? -Just the right thing: The receiver gets "Error writing data" at 2147483647 -bytes, sends E-packet to sender with this message, and recovers with total -grace (drains packet buffers, returns to prompt). ckutio.c, 27 Aug 2005. - -Backed off from rejecting a file because its announced size overflows a -long. Now instead, I set the file size to -2 (a negative size means the -size is unknown, but we have always used -1 for this; -2 means "unknown and -probably too big"). In this case, the f-t display says: - - File Size: POSSIBLY EXCEEDS LOCAL FILE SIZE LIMIT - -then the user can interrupt it with X or whatever, or can let it run and -see if maybe (as in the case of Mac OS X) it will be accepted anyway. This -way, we skip all the bogus calculations of percent done, time remaining, etc. -ckcfn3.c, ckuusx.c, 27 Aug 2005. - -Discovered that VMS C-Kermit on Alpha and IA64 is a 32-bit application; -sizeof(long) == sizeof(char *) == 4. Tried adding /POINTER_SIZE=64 to VMS -DECC builds on Alpha and IA64, but the results aren't great. Tons of -warnings about pointer size mismatches between Kermit pointers and RMS ones, -and the executable doesn't run. It appears that access to long files -would require a lot of hacking, similar to what's needed for 32-bit Linux. - ---- Dev.02: 27 Aug 2005 --- - -From Jeff, 28 Aug 2005. - . Fix SSH GLOBAL-KNOWN-HOSTS-FILE / USER-KNOWN-HOSTS-FILE parsing, ckuus3.c. - . Pick up K95STARTFLAGS from environment, ckuus4.c. - . Fix some typos in command-line processing (-q), ckuus4.c. - . Be sure to suppress herald if started with -q, ckuus7.c. - . Fix ssh command-line switches, ckuusy.c. - -Eric Smutz complained that HTTP POST was adding an extraneous blank line, -which prevented his application from successfully posting. RFC 2616 states -(in Section 4.1): - - In the interest of robustness, servers SHOULD ignore any empty - line(s) received where a Request-Line is expected. In other words, if - the server is reading the protocol stream at the beginning of a - message and receives a CRLF first, it should ignore the CRLF. - - Certain buggy HTTP/1.0 client implementations generate extra CRLF's - after a POST request. To restate what is explicitly forbidden by the - BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an - extra CRLF. - -This seems pretty clear. One section of code in http_post() (just above the -postopen: label) was appending a CRLF to a buffer whose last already was -terminated by CRLF, and then appended a second CRLF; thus two empty lines. -I removed the second one. ckcnet.c, 28 Aug 2005. - -I looked into the 64-bitness of NetBSD, it seems to be like Linux and -FreeBSD on 64-bit hardware, i.e. you just build it there and it works, at -least on Alpha and AMD64, going back to NetBSD 1.4 or 1.5. But I don't have -access to any of these for verification and documentation on the Web is -scanty. - -Checked PeterE's complaint again of warnings in ckutio.c about parameter -list of get[ug]id() and gete[ug]id(). When I "make hpux1100o" on HP-UX -11.11 (PA-RISC), there are definitely no warnings. He says the same thing -happens on 10.xx, but I don't have access to that any more. I also did -"make hpux1100o" on HP-UX 11.23 (11i v2) (PA-RISC), also no warnings. -(Except in both cases, a warning about a comment within a comment in -/usr/include/sys/ptyio.h). On HP-UX 11i v2 on Itanium, however, there are -TONS of warnings, mostly of the "variable set but never used" kind. Also -"dollar sign used in identifier". Tracking this last one down, I see it's -complaining about code that's in #ifdefs for other platforms, such as -Apollo Aegis. Is "aegis" defined in HP-UX 11i v2/IA64? No! (It would show -up in SHOW FEATURES if it was.) Some phase of the compiler is complaining -about code that it should be skipping (and that, in fact, it *is* skipping -it because the build is successful). It's as if cc is running lint for me -but not telling lint which macros are defined and which are not. - -Verified that 64-bit linking fails in the same way for HP-UX 11i v2 on both -IA64 and PA-RISC. Sent a query to HP. - -Compiling ckcnet.c and ckcftp.c got the familiar sockopt-related warnings on -HP-UX 11i v2; turns out it is just like Tru64 Unix in using an int for the -length argument. Added another special case and the warnings went away. -ckcnet.h, 28 Aug 2005. - -Added some stuff to SHOW FEATURES to see what kinds of macros are exposed -(e.g. INT_MAX, LONG_MAX, LLONG_MAX, etc) and also show sizeof(long long) and -sizeof(off_t). Building this code all over the place will give me an idea -of how widespread these data types are, and to what extent I can tell -whether they are available from clues in the header files. (At first -glance, it appears that I'm not picking up , but adding an -#include for it is just asking for trouble.) No complaints about long long -or off_t from Solaris 9 or recent Linuxes. ckuus5.c, 28 Aug 2005. - -Fixed a warning in HP-UX 10 and 11 stemming from some old-style prototypes -in ckutio.c for get[re][gu]id(). ckutio.c, 29 Aug 2005. - -Updated minix3 target from Andy Tanenbaum. makefile, 29 Aug 2005. - -PeterE confirms that "long long" and off_t are available in all HP-UX 10 and -11, and in HP-UX 9 on PA-RISC but not Motorola. 30 Aug 2005. - -Got 64-bit builds to work on HP-UX. According to my notes, John Bigg of HP -said (in 1999) that HP-UX 10.30 and later require PA-RISC 1.1, and do not -work on PA-RISC 1.0. But is PA 1.0 64-bit or what? Today, Alex McKale of -HP said "The 64-bit binaries will work on all machines that have the same or -later release of HP-UX (excluding PA-RISC 1.1 machines)". Still need -clarification... Maybe it's that all IA64 builds can be 64-bit but I need -dual builds for PA-RISC. Meanwhile I started transfer of a 4GB+ file from -Solaris to HP-UX 11i but it exceeded some quota on the HP long before it -approached the 2G point. It failed cleanly and up until then it was working -fine (numbers, stats, etc). 30 Aug 2005. - -Support of large files in 32-bit builds began in 10.20. 64-bit application -support began in 11.00, but not all machines that run 11.00 support 64 bits. -About long files, see HP /usr/share/doc/lg_files.txt. - -PeterE found that certain patterns can still make Kermit loop; example: - - if match T01011-00856-21-632-073 *[abc] { echo GOOD } else { echo BAD } - if match T01011-00856-21-632-073 *[a-z] { echo GOOD } else { echo BAD } - -The minimum offending pattern is * followed immediately by an [xxx] -construction, followed by anything else, including nothing. Previous -versions of Kermit handled this one correctly, without looping (but failed -certain matches that should have succeeded). The new section of code I -added on 15 June, upon failure to match, advances the string pointer and -backs up the pattern to the previous pattern, and starts again -(recursively). However, there needed to be a corresponding check at entry -for an empty target string. ckmatch(): ckclib.c, 12 Sep 2005. - -PeterE discovered that "kermit -y filethatdoesnotexit" gives an erroneous -error message that names the user's customization, rather than the name -given on the command line. doinit(): ckuus5.c, 12 Sep 2005. - -FREAD does not get an error if it tries to read a record or file or piece of -file that is too big for its buffer. In particular, FREAD /SIZE:xxx seems -to succeed even if less than xxx was read. It should fail unless, perhaps, -it successfully read up to the end of the file. Furthermore, if xxx is -bigger than the file buffer size, it should complain. The buffer is -line[LINBUFSIZ], 32K. The lack of failure was due to code in dofile() that -adjusted the given size silently if it was greater than the buffer size, -which I removed, and also added a check when parsing the /SIZE: switch. -dofile(): ckuus7.c, 12 Sep 2005. - -That still didn't help with FREAD /SIZE:n returning less than n bytes, even -when they were available. That's because the underlying routine, z_in(), -didn't check fread()'s return code, which is the number of bytes read. -If fread() has smaller buffers, it needs to be called in a loop. z_in(): -ckuus7.c, 12 Sep 2005. - -Flen() fails on strings of length 8192 or more. The limitation is in the -callers of zzstring, which seem to be specifying an 8K buffer, in this case -fneval(). The operable symbols are FNVALL (max length of value returned by -a function) and MAXARGLEN (maximum length of an argument to a function). I -changed both of these for BIGBUFOK builds to be CMDBL. Buffers can never be -infinite, there has to be a limit. It's important to make everything work -consistently within that limit, and to make something useful happen when the -limit is exceeded. At this point, I can probably also increase the limits -for modern 32-bit systems, and certainly for 64-bit ones. Also there's no -point in worrying about 16-bit platforms any more; earlier C-Kermit versions -can still be used on them if necessary. ckuusr.h, 12 Sep 2005. - -Special #ifdefs for finding resolv.h and nameser.h in MINIX3 from Andy -Tanenbaum. ckcnet.c, 20 Sep 2005. - -PeterE noticed that ckmatch(), even though it works pretty well now, does a -lot of extra and unnecessary recursion after determining the string and -pattern do not match, at least when the pattern is of the form *[abc]. -After several false starts I was able reduce this effect to a minor level -(but not eliminate it all together) by changing a while loop into a do loop. -ckmatch(): ckclib.c, 15 Oct 2005. - -Added -DNOLONGLONG to HP-UX 8.00 and earlier builds, and to Motorola-based -HP-UX 9.00 builds. This is simply to inhibit the test for whether "long -long" is supported by the compiler, since when it isn't, the module -containing the test won't compile. makefile, ckuus5.c, 16 Oct 2005. - -Making ASKQ always echo askterisks is a bad idea, because when it doesn't -echo, it's the perfect way to read silently from stdin, e.g. in a CGI script -(INPUT can also be used for this but it's not as straightforward). So I put -the default for ASKQ back to no echoing, then gave ASKQ its own switch -table, which is the same as for ASK with the addition of an /ECHO:x switch, -which tells what character to echo. ckucmd.c, ckuus[26].c, 17 Oct 2005. - -Fixed a bug in FTP GET /COMMAND filename commandname; it always dumped core -dereferencing a null string (the nonexistent local asname). ckcftp.c, -17 Oct 2005. - -For docs: if you don't like the funny business that happens when you type -an IF command at the prompt, use XIF instead and it won't happen. Also note -that commands like "if xxx { echo blah } else { echo blah blah }" don't -work when typed at the prompt; you have to use XIF for this. - -Back to ckmatch()... Under certain conditions (e.g. patterns like *[abc]) -failure to match would not stop the recursion because the string and pattern -arguments are on the stack, as they must be, so there was no way for level -n-1 to know that level n had detected a definitive nonmatch and that no -further attempts at matching were required. The right way to handle this is -to recode the whole thing as coroutines, the cheap way out is with a global -static flag. Works perfectly, in the sense that the match.ksc test results -are identical to what they were before and the extra backing up and -recursion are eliminated. (The Oct 15th fix wasn't really a fix, it broke -a couple of cases.) ckclib.c, 20 Oct 2005. - -ckuus7.c(2987): warning #267: the format string requires additional arguments -(in PURGE command); fixed 20 Oct 2005. - -From Andy Tanenbaum, final changes for MINIX3: #ifdef out the inline -definitions for gettimeofday() and readlink(). ckutio.c, 23 Oct 2005. - -From Jeff: struct gss_trials initializers changed from gss_mech_krb5 to -ck_gss_mech_krb5. ckcftp.c, 23 Oct 2005. - -From Jeff: some improvements to K95 GUI SHOW TERMINAL. ckuus5.c, 23 Oct 2005. - -Found and corrected some misplaced #ifdefs in shofeat(), ckuus5.c, 23 Oct 2005. - ---- Dev.03 --- - -Fixed a compiler warning in a debug() statement in zzstring() by adding -parens. ckuus4.c, 24 Oct 2005. - -Added -DNOLONGLONG to sv68r3v6 target, makefile, 25 Oct 2005. - -New makefile targets for HP-UX from PeterE to handle the 'long long' -situation. 26 Oct 2005. - -From Jeff: changes to support OpenSSL 0.9.8, ck_ssl.h. ckcasc.h has had -short names defined for ASCII control characters for 20-some years but now -they are causing conflicts, so EM becomes XEM (also for OpenSSL 0.9.8). -Changed K95's default terminal type from VT320 to VT220 because VT320 -termcaps/terminfos are disappearing from Unix hosts: ckuus7.c. Reorganize -the data-types section of SHOW FEATURES to add more macro tests for integral -sizes and to provide for the proper printf formatting in order to allow the -sizes to be output ("You are going to need to be careful because %llx is not -supported on all platforms. On Windows, it is the same as %lx, 32 bits"): -ckuus5.c, 26 Oct 2005. - -Defined NOLONGLONG ckcdeb.h for various old platforms where we know we are -never going to need 64-bit ints (even if they support a long long datatype, -chances are pretty slim they supported 64-bit file sizes). ckcdeb.h, -26 Oct 2005. - -PeterE noticed that GOTO targets can only be 50 characters long. This was -by design, a long time ago, on the assumption that nobody would make longer -labels. But in SWITCH statements, case labels can be variables that expand -to anything at all. If we chop them off at 50, we might execute the wrong -case. Changed the maximum label size to be 8K, and added code to dogoto() -to check when a label or target is too long and fail, to prevent spurious -GOTO or SWITCH results. ckuusr.h, ckuus[r6].c, 26 Oct 2005. - -Testing revealed there was still a problem with SWITCH case labels that were -variables that expanded into long strings. Turns out that I was being -too clever when I decided that, if the SWITCH macro was n1 characters long -and the case-label search target was n2 characters long, I only had to -search the first n1-n2+1 characters of the macro definition. That was true -before I allowed case labels to be variables, but not any more! Fixed in -dogoto(): ckuus5.c, 26 Oct 2005. - ---- Dev.04 --- - -Dev.04 didn't actually contain Jeff's data-type changes to shofeat(), -I think I saved the wrong buffer in EMACS... Fixed now. 27 Oct 2005. - -PeterE corrected a typo in the HP-UX 7.00 makefile target. 27 Oct 2005. - -PeterE had been reporting problems stress-testing the new SWITCH code, but -only on HP-UX 9, primarily stack overrun. Turns out to be the HP-UX 9 -optimizing compiler's fault. No optimization, no problems. - -PeterE found that even when dogoto() detects a string that is too long -and fails, this does not stop SWITCH from producing a result, which can not -possibly be trusted. Changed the part of dogoto() that handles this to -not just fail, but also to exit the script immediately and return to top -level. ckuus6.c, 28 Oct 2005. - -An idea popped into my head after having typed too many commands like "dir -ck[cuw]*.[cwh]" to check the list of matching files, and then having to -retype the same filespec in a SEND command: Why not unleash some unused -control character such as Ctrl-K to spit out the most recently entered input -filespec? It was easy, just a few lines in cmifi2() and gtword(), plus a -couple declarations. To see all the changes, search for "lastfile" (all the -new code is protected by #ifndef NOLASTFILE). ckucmd.c, 28 Oct 2005. - -I added a new variable \v(lastfilespec) that expands to the same last -filespec, for use in scripts. ckuusr.h, ckuus4.c, 28 Oct 2005. - -The Unix version of C-Kermit failed to put anything in the session log if -SET TERMINAL DEBUG ON. Rearranged the pertinent clause so logging happens -independent of TERMINAL DEBUG. For now, since the user who noticed this -wanted debug format to go into the session log, that's what I do. The -alternative would be to just log the raw incoming stream as usual, or to add -Yet Another SET Command to choose. ckucns.c, 11 Nov 2005. - -Fixed HELP INTRO text. ckuus2.c, 11 Nov 2005. - -Added NOLONGLONG for SV68. ckcdeb.h, 11 Nov 2005. - ---- Dev.05 --- - -Added a debug() statement in FTP secure_getbyte() to see what's going on -with Muhamad Taufiq Tajuddin's 205-byte-per-second FTP/SSL downloads. - ---- Dev.06 --- - -Result: nothing, SSL_get_error() does not report any errors. Suggested -testing SSL_read()'s return code, if 0 don't update the screen. - -Created a new data type CK_OFF_T in ckcdeb.h that will eventually resolve -to whatever each platform uses for file sizes and offsets. ckcdeb.h, -17 Nov 2005. - -Made a new library routine ckfstoa() that converts a file size or offset to -a string. This is to solve the problem with having to use different -printf() formats for different representations of file size (int, long, long -long, off_t, signed, unsigned, etc). Replaced a few printf("%l",size) with -printf("%s",ckfstoa(size)) with the expected results. This is just a start, -the definitions will need adjustment for many platforms, variables need to -be redeclared, and all the offending printf's (and printw's) will have to -hunted down and converted. ckclib.[ch], ckuus4.c, 17 Nov 2005. - -Built a minimal version on Linux with: -make linux "KFLAGS=-DNOLOCAL -DNOICP -DNOCSETS -DNODEBUG" -Worked fine, result was 260K on i686. 21 Nov 2005. - -Discovered that Kermit's date parser, contrary to the documentation, failed -to handle strings like "Wed, 13 Feb 2002 17:43:02 -0800 (PST)", which are -commonly found in email. This was because of an overzealous and misguided -check in the code; once removed, all was well. ckucmd.c, 26 Nov 2005. - -Added a new format code 4 to \fcvtdate() to emit asctime() format, used in -BSD-format email message envelopes (i.e. the "From " line). shuffledate(), -ckucmd.c, ckuus[24].c, 26 Nov 2005. - -Added a new function \femailaddress(). Given a From: or Sender: header line -from an RFC2822-format email address, extracts and returns the actual email -address, such as kermit@columbia.edu. ckuusr.h, ckuus[42].c, 26 Nov 2005. - -Using the new functions, I wrote a script to fetch mail from a POP3 server -over a TLS connection. But the line-at-a-time input (needed for changing -line terminators and byte-stuffing text lines that start with "From ") is -slow, 17 sec to read 29 messages totaling 175K. - -Added INPUT /CLEAR so INPUT can be started with a clean buffer without -requiring a sepearate CLEAR INPUT command. ckuusr.h, ckuus[r24].c, -27 Nov 2005. - -One thing that INPUT was never able to do well was read and save the -complete incoming data stream. That's because, while waiting for its -target, the buffer might overflow wrap around. Yet there was never a way to -tell it to stop when its buffer fills up and let me save it. I added a -/NOWRAP switch that does this. If the buffer fills up before any other -completion criterion is met, INPUT returns failure, but with \v(instatus) -set to 6 (the next available instatus value). Thus a program that wants to -read and save (say) an email message from a POP server, which could be any -length at all, and which terminates with . could do this: - - set flag off - while open connection { - input /nowrap 10 \13\10.\13\10 # Wait for . - if success { - frwrite /string \%o {\freplace(\v(input),\13\10.\13\10,\13\10)} - set flag on - break - } else if ( == \v(instatus) 6 || == \v(instatus) 1 ) { - frwrite /string \%o {\v(input)} - continue - } - break - } - if flag (handle success) - -Note carefully the braces around the FWRITE text; without them, trailing -spaces would be lost. - -Previously the only way to INPUT an entire data stream without losing -anything (assuming it was ordinary lines of text that were not "too long"), -was line-by-line: - - while open connection { - input /clear 10 \13\10 - if fail break - if eq "\v(input)" "$ \13\10" break - fwrite /string \%o {\freplace(\v(input),\13\10,\10)} - } - -The new code is 3 times faster using the default INPUT buffer length of 4K. -Raising it to 16K makes it 3.6 times faster (not worth it). Changing the -POP3 script to use INPUT /NOWRAP makes it about twice as fast (it does more; -it has to do all the byte-stuffing and unstuffing). 27 Nov 2005. - -Changed ssl_display_xxx() to just return if SET QUIET ON. Otherwise there -is no way to suppress the messages. Also protected a previously unprotected -printf("[SSL - OK]\r\n"); by if ( ssl_verbose_flag ). ck_ssl.c, -28 Nov 2005. - -Discovered that FOPEN /APPEND doesn't work if the file doesn't exist. It -uses cmiofi() which is a super-hokey front end to cmifi2(). I had code to -call it but for some reason it was commented out, with a note to the effect -it didn't work. I uncommented it but that didn't help much. So I wrote an -entirely new cmiofi() that works exactly as it should, using chained FDBs, -_CMIFI to _CMOFI (I think the original cmiofi() predated chained FDBs). -ckuus7.c, ckucmd.c, 29 Nov 2005. - -Getting rid of the awful hacks required to call cmiofi() meant I also had to -change the EDIT command, which is the only other place where it's used. -Unfortunately now it's no longer possible to give EDIT without a filename -(to just start an empty editor) but I doubt anyone will notice. ckuusr.c, -29 Nov 2005. - -IF KERBANG didn't always work right. If a kerbang script TAKEs another -kerbang script, the second one should have IF KERBANG false, but it didn't. -Added a check for \v(cmdlevel) == 1. Now you can write a wrapper that runs -a kerbang script in a loop, and the latter can use IF KERBANG to know -whether to EXIT (if called at top level) or END (if called by another -script, thus allowing -- in this case -- the loop to continue). ckuus6.c, -29 Nov 2005. - -Changed \flop() and flopx() functions to take a third argument, a number -signifying at which occurrence of the break character to lop, so: - - \flopx(sesame.cc.columbia.edu) = edu - \flopx(sesame.cc.columbia.edu,,2) = columbia.edu - -ckuus[24].c, 1 Dec 2005. - -Built OK on VMS 7.2-1 with MultiNet 4.4. Built with and without OpenSSL on -Linux OK, ditto Solaris 9. Built OK on RH Linux AS4 on X86_64 (64-bit); -"show var fsize" (using new ckfstoa()) works OK there. Also Mac OS X 10.3.9 -(32-bit), Tru64 UNIX 4.0F (64-bit), HP-UX 11iv2 (64-bit) (picky new compiler -spews out tons of useless warnings), FreeBSD 6.0 on ia64 (64-bit). - ---- Dev.07 --- - -Changed "make netbsd" to be a synonym for "make netbsd2" because the -original netbsd target was ancient. Renamed it to netbsd-old. makefile, -3 Dec 2005. - -Updated INPUT and MINPUT help text. ckuus2.c, 3 Dec 2005. - -Discovered that on a SET PORT /SSL connection, Kermit treats incoming -0xff data bytes (e.g. sent from the POP server) as IACs and goes into Telnet -negotiations. Jeff says "You will need to implement NP_SSLRAW and NP_TLSRAW -that do the same as NP_TCPRAW but negotiate SSL or TLS as appropriate." -This was not as easy as it sounded, because apparently a lot of the Telnet -code is used by SSL and TLS even when Telnet protocol is not being executed. -I wound up doing this as follows: I added /SSL-RAW and /TLS-RAW to the -switch table. Rather than disable Telnet, they do exactly what the /SSL and -/TLS switches do, but also set a special flag. This flag is checked in only -two place: netclos() (to prevent Kermit from sending TELNET LOGOUT when -closing the connection), and tn_doop() (to prevent Kermit from reacting to -incoming IACs; it makes tn_doop() return(3), which means "quoted IAC", which -causes the caller to keep the IAC as data). ckcnet.h, ckctel.h, ckctel.c, -ckuus7.c, 4 Dec 2005. - -The INPUT command did not account for tn_doop() returning 3. Fixed in -doinput(), ckuus4.c, 4 Dec 2005. - -Added another debug() statement in FTP secure_getbyte() to see what's going on -with Muhamad Taufiq Tajuddin's 205-byte-per-second FTP/SSL downloads, plus -new code to test SSL_read()'s return code (byte count); if 0 don't update -the screen. ckcftp.c, 4 Dec 2005. - ---- Dev.08 --- - -Fixed a typo in the non-ANSIC definition of ckfstoa(). ckclib.c, 7 Dec 2005. - -Our Ctrl-C trap (the ON_CTRLC macro) wasn't working for kerbang files. -Rearranged some code to make it work. ckcmai.c, 8 Dec 2005. - -Started converting code to use CK_OFF_T for file sizes and offsets, and -all [s]printf's to replace "%ld" or whatever with "%s", and the size -variable with a call to ckfstoa(). Since I haven't actually changed the -definition of CK_OFF_T from what all the size variables were to begin -with (i.e. long), it shouldn't do any harm. So far just ckcfn3.c -10 Dec 2005. - -An updated HP-UX 9.xx makefile target from PeterE to fix a core dump that -happens on that platform due to insufficient resources. 14 Dec 2005. - -Added debug() statements to http_blah() routines to tell whether the -connection is "chunked". There seems to be a bad performance problem. -ckcnet.c, 14 Dec 2005. - -PeterE complained about ugly DIRECTORY error message, ?No files match - -"{blah}". The braces are used internally in case the user typed more than -one filespec. I changed the error message to remove them. Ditto DELETE. -ckuus6.c, 15 Dec 2005. - -The problem with HTTP downloads is that Kermit always does single-character -read() or socket_read() calls (or the SSL equivalent); see http_inc(). I -added buffering code for non-SSL connections only but it's gross because it -has to swap ttyfd and httpfd before calling nettchk(). I tried making a -nettchk() clone that accepts a file descriptor as an argument but it didn't -work because too many other routines that are invoked directly or implicitly -by nettchk() (such as in_chk()) are still hardwired to use ttyfd. HTTP GETs -are now 20 times faster on the local network (the improvement is less -dramatic over a clogged Internet). ckcnet.[ch], 15 Dec 2005. - ---- Dev.09 --- - -HTTP file-descriptor swapping is not thread safe. Doing it right, of -course, is a big deal, so for now I just don't define HTTP_BUFFERING for -Windows. ckcnet.c, 15 Dec 2005. - -Noticed that HTTP not included in FreeBSD and OpenBSD builds. Fixed in -ckcdeb.h, 22 Dec 2005. - -Fleshed out 32/64-bit data type definitions and changed struct zattr -(file attribute structure) members length and lengthk to have the new -CK_OFF_T type. Changed final arguments of debug() and tlog() to be the new -LONGLONG type. ckcdeb.h, 22 Dec 2005. - -Changed ckfstoa() to return a signed number in string form, rather than an -unsigned one. That's because off_t is signed (thank goodness). Added the -inverse function, ckatofs() so we can convert file sizes and offsets back -and forth between binary number and string. ckclib.c, 22 Dec 2005. - -Changed Attribute Packet reader to convert incoming file size attribute -with ckatofs() rather than atol(). ckcfn3.c, 22 Dec 2005. - -Converted debug(), tlog(), ckscreen(), etc, to handle potentially "long long" -arguments by making their "n" argument CK_OFF_T. ckuusx.c, ckcdeb.h, -22 Dec 2005. - -Converted the rest of the source files to use CK_OFF_T for all file size -and offset and byte-count related variables, and converted all references to -these variables in printfs to go through ckfstoa(). Then I built it on -Linux/i386 with: - - make linux "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - -which makes off_t be 64 bits and magically makes all the regular file APIs -use 64-bit sizes and offsets without changing the API calls in the source -code. It's going to be a lot of work to get through all the kinks but I was -able to send a long file, do directory listings of long files, do -\fsize(longfile), etc. When it sends a file, the length is shown correctly -in the A packet. If the receiver does not support big numbers, it receives -the file OK anyway, without showing the size, the thermometer, or percent -done (and then will get an error when the file keeps coming after the 2G -mark). Kermit 95 actually refuses long files for "Size", but only if the -announced is less than 2^63 bytes. When today's Linux version receives a -file, it shows the length correctly in the file-transfer display, as well as -percent done, thermometer, etc. Also built this version on true 64-bit -Linux, and it worked fine. Many files changed, 22 Dec 2005. - -For the record, this API is specified in X/Open's Single UNIX Specification -Version 2, which is branded as UNIX 98. It is called Large File Support, or -LFS, and was developed at the Large File Summit. - -It looks like the operative feature-test macro in glibc for transitional -large file support is __USE_LARGEFILE64. So if this is defined, we can also -supply _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64 automatically for 32-bit -Linux builds. But there's a Catch-22, you don't know if this is defined -until you read the header files, but you have to define _LARGEFILE_SOURCE -and _FILE_OFFSET_BITS before you read the header files. Maybe it's good -enough to grep through for __USE_LARGEFILE64. makefile, -23 Dec 2005. - -Checked this on true 64-bit Linux. The same symbols are defined in CFLAGS, -but they do no harm; it builds without complaint and works fine. 24 Dec 2005. - -Built it on Red Hat Linux 6.1 from 1999. This picked up the long file -support too. Guess 6.1 isn't old enough to not have it! Kermit seems to -work OK on regular files but I don't have enough disk space to create a long -file, and my bigfile.c program (which creates a long file containing only 1 -byte) doesn't work ("fseeko: invalid argument"). It looks like parts of -this API were visible in Linux before they were actually working. -24 Dec 2005. - -Converted all fseek() and ftell() to macros that expand to fseek() and ftell() -or fseeko() and ftello() depending on whether _LARGEFILE_SOURCE is defined. -ckufio.c, ckuus7.c, ckuusx.c, 24 Dec 2005. - -Made a CK_OFF_T version of cmnum(). It would be a very big deal to just -change cmnum() to return a new type, so another idea is to rename cmnum() to -something else, cmnumw(), change its result argument to CK_OFF_T, and then -make a stub cmnum() to call it to get an int, then call cmnumw() explicitly -any time we need a big number. ckucmd.c, 24 Dec 2005. - -Calling cmnumw() directly requires changes to each routine that uses it. -The INCREMENT and DECREMENT commands, for example, required changes to -doincr(), varval(), and incvar(), and all references to them. ckuusr.[ch], -ckuus[56].c, 24 Dec 2005. - -Calling cmnumw() in chained FDBs required defining a new function code, -_CMNUW, adding a new member to the OFDB struct for returning wide results, -and adding a new case to cmfdb(). ckucmd.[ch], 24 Dec 2005. - -Changed FSEEK and FCOUNT to use the new chained FDB interface, now we can -seek and look past 2GB. ckuus7.c, 24 Dec 2005. - -Next come switches, which store their results in a struct stringint. This -struct was defined in each module where it was used (ckuus[r367].c, ckcftp.c). -I moved the definition to ckuusr.h and added a wval member, which can be -referenced by any switch-parsing code that calls cmnumw(). 24 Dec 2005. - -Changed SEND /CALIBRATE:n to allow big values of n. This makes it possible -to test the protocol aspects of long-file transfer without actually having a -long file handy. ckuusr.c, 24 Dec 2005. - -SEND /SMALLER-THAN:n, SEND /LARGER-THAN:n, and and SEND /START:n also now -allow large values of n. ckuusr.c, 24 Dec 2005. - -Changed the algebraic expression evaluator to use wide values. -ckuus5.c, 24 Dec 2005. - -Fixed ckfstoa() to handle the case when n is negative and (0 - n) is also -negative, which happens for numbers 2^(n-1) or greater, where n is the -number of bits in the word size we're dealing with, e.g. 64, in which case -2^63 has its sign bit set so seems to be negative. In such cases, ckfstoa() -returns "OVERFLOW" instead of a numeric string. We'll have to see how this -plays out but I think it's better to cause a parse error and stop things -dead than to return a spurious number. ckclib.c, 24 Dec 2005. - -Converted the S-Expression handler to use wide integers. ckuus3.c, 24 Dec 2005. - -Took all the LONGLONG stuff out of ckcdeb.h, we don't need it. - -All of these changes result in 64-bit arithmetic (more or less) on 32-bit -Linux, as well as on true 64-bit platforms. - -Rebuilt today's code on Solaris 9 in the 32-bit and 64-bit worlds, on Red -Hat 6.1, Red Hat AS4.2. I haven't bothered trying a 32/64 hybrid build for -Solaris, since I can build a pure 64-bit version there. Quick tests show -the large-number arithmetic works OK in all cases except, of course, on pure -32-bit builds (unfortunately I can't find a running Linux system old enough -to verify this for Linux, but it's true for other 32-bit platforms). -24 Dec 2005. - -Tried building a hybrid version on Solaris 9 after all since the LFS API is -ostensibly the same as for Linux: - - make solaris9 "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - -It built smoothly and the resulting binary is 2.5MB compared to 3.4MB for -the 100% 64-bit version. Looks like a keeper. For now, added solaris9lfs -and solaris10lfs entries to the makefile but if these work on PCs we can -make these the regular entries for Solaris 9 and 10. 27 Dec 2005. - -Built on Mac OS X 10.4 with the regular target. It seems that in that case, -off_t is 64 bits anyway. Noticed that a lot of stuff didn't work, like -exponentiation in S-Expressions. Tried building it as above, which worked, -and now CK_OFF_T is 64 bits instead of 32, but (^ 2 30) is still 2.0. In -fact 2-to-the-any-power is 2.0. It seems that the Mac OS X version did not -have FNFLOAT defined. It also seems that every test in dosexp() like: - - if (result != fpresult) fpflag++; - -should have been protected by #ifdef FNFLOAT..#endif /* FNFLOAT */ -- a -double-ended break, as they say in the nuclear power industry. ckuus3.c, -27 Dec 2005. - -Added GREP /EXCEPT:pattern. ckuus[26].c, 27 Dec 2005. - -Fixed a problem with uninitialized pv[].wval (switch-parsing parameter-value) -members that showed up on certain platforms or with certain compilers. Now -the Mac OS X 10.4 version works. ckuus[r367].c, ckcftp.c, 28 Dec 2005. - -Built on Unixware 7.1.1, a pure 32-bit build, seems fine. Rebuilt on Red -Hat AS 4.2 just to make sure I didn't break anything, it's OK. No testing -on HP-UX, etc, because HP testdrive file sytem is full, can't upload anything. -29 Dec 2005. - -Commented out the SHOW FEATURES section that displays constants like -INT_MAX, CHAR_MAX, etc, because printing each value in the appropriate -format is too tricky, and we don't need them anyway. ckuus5.c, 29 Dec 2005. - -Updated ckvfio.c to use CK_OFF_T for the relevant variables. Built and -tested on VMS/Alpha 7.2: file transfer in remote mode; making a Telnet -connection and then local-mode file transfer; S-Expressions, all OK. Also -built a no-net version OK. 29 Dec 2005. - -Built and tested on Red Hat AS4 AMD X86_64, used it to upload new sources to -FreeBSD 4.11. Built on FreeBSD 4.11/i386. Here's another one where off_t -is 64 bits, even though long is 32 bits. But it seems to work ok, not sure -why, when CK_OFF_T is 32 bits. There is no _LARGEFILE_SOURCE stuff in the -header files. 29 Dec 2005. - -Built on Mac OS X 10.3.9 using the new macosx10.4 target to pick up LFS. -Works fine. - -Built on Red Hat Linux 4WS on IA64 (64-bit). Now this one is odd, stat() -fails on big files. It happens also if I use the "linuxnolfs" target, which -does not define _USE_LARGEFILE or _FILE_OFFSET_BITS=64. DIRECTORY BIGFILE -shows the size as -1, but if "log debug", it says "no files match", i.e. -different behavior, observer effect. I hate when that happens. - -Let's see if that's an anomoly... Built on Tru64 Unix 4.0F (64-bit Alpha). -It sees long files just fine. Rebuilt and checked on x86_64 again... fine. -OK, let's not worry about IA64 yet. - -Another small fix to the HP-UX 9.0 target from PeterE. makefile, 29 Dec 2005. - ----Dev.10--- - -Code adjustments from Jeff, mainly to the SSL and TLS Raw mode code from -several weeks ago, plus changing some data types in the security code to -CK_OFF_T, plus a different data type for CK_OFF_T for K95 because Windows -size_T isn't signed. This presumably will allow large-number arithmetic but -it will not give large file access because that will require replacing all C -library file i/o calls (esp. in ckofio.c) with native Windows APIs. Build -on Solaris 9 with and without SSL and on Linux RH AS4.2 with and without -SSL. ck_crp.c, ck_ssl.c, ck_ssl.h, ckcdeb.h, ckcftp.c, ckcmai.c, ckcnet.c, -ckcnet.h, ckctel.c, ckuat2.h, ckuus4.c, ckuus7.c, ckuusr.c, 30 Dec 2005. - -It was reported that WRITE SESSION always returned a failure status, even -when it succeeded. The problem was that Unix versions of zsout() and -zsoutl(), for the session log only, were using write() and returning -write()'s return code, which is different from what zsout() and zsoutl() are -documented to return. Also plugged a couple potential holes in zsoutx() -that I noticed while I was in the neighborhood. ckufio.c, 30 Dec 2005. - -Added FSEEK /FIND:pattern. This form of FSEEK accepts all the other -switches and arguments and performs the desired seek. Then, if the seek was -successful, it starts from that point and reads through the file, line by -line, searching for the first line that contains the given string or matches -the given (unanchored) pattern and, if found, sets the file pointer to the -beginning of that line. Useful, e.g., for very long timestamped logs, where -you want to start processing at a certain date or time; searching for a -particular string is much faster than doing date comparisons on each line. -ckuus[27].c, 30 Dec 2005. - -It was annoying me that FILE STATUS (FSTATUS) required a channel number to -be given even if only one file was open, so I supplied the correct default -in that case. ckuus7.c, 30 Dec 2005. - -INPUT /NOWRAP, added recently, is used for efficiently copying the INPUT -stream intact, but it's not good for matching because if the INPUT target is -broken between the end of the previous buffer and the beginning of the next -one, the context is lost and the match does not occur. I thought of several -ways around this, but they all involve saving a huge amount of context -- -old input buffers, the arrays of target strings and corresponding match -positions, etc. The alternative is fairly simple but it's not transparent -to the user. Here's what I did in a POP script: - - .eom := "\13\10.\13\10" - set flag off # FLAG ON = success - while ( open connection && not flag ) { - .oldinput := \fright(\v(input),8) # Save tail of previous INPUT buffer - input /clear /nowrap 4 \m(eom) # Get new INPUT buffer - if success { # INPUT matched - good - .s := {\freplace(\v(input),\m(eom),\13\10)} - set flag on - } else { # No match - .s := \v(input) # Check if target crossed the border - .oldinput := \m(oldinput)\fsubstr(\v(input),1,8) - if \findex(\m(eom),\m(oldinput)) set flag on - } - ... - } - -I think this will be easier to explain than any dangerous and grotesque -magic I might put into doinput() itself. For now, added a few words about -this to HELP INPUT. ckuus2.c, 30 Dec 2005. - -Back to the pattern matcher. Noticed that "IF MATCH index.html [a-hj-z]*" -succeeded when it should have failed. In ckmatch(), the clist section -needed one more clause: it can't float the pattern if an asterisk does not -occur in the pattern before the clist. This change fixes the problem -without breaking any other cases that weren't already broken, most of which -involve slists, i.e. {string,string,string,...}. ckclib.c, 30 Dec 2005. - -Tried FSEEK /FIND: on a largish file (over 100,000 lines), using it to seek -to a line near the end. It took 0.756 seconds, compared with Unix grep, -which did the same thing in 0.151 sec. That's because C-Kermit is using -ckmatch(). But if the search target is not a pattern, it should be a bit -faster to use ckindex(). Yup, 0.554 sec, a 36% improvement. Can't expect -to compete with grep, though; it's highly tuned for its single purpose. -ckclib.[ch], ckuus7.c, 1 Jan 2006. - -Updated visible copyright dates to 2006: ckcmai.c, ckuus2.c, ckuus5.c, -1 Jan 2006. - -Noticed that NetBSD 2.0.3 has 64-bit off_t, and that _LARGEFILE_SOURCE is -mentioned in . Tried building Kermit with _LARGEFILE_SOURCE added -to CFLAGS, it's good. Added it to the netbsd target. makefile, 1 Jan 2006. - -Fixed typo, #ifdef CK_NOLONGLONG in ckuus5.c should have been #ifndef -CK_LONGLONG (which, it turns out, we don't use anyway). 2 Jan 2005. - -Observed that FreeBSD 4.x has a 64-bit off_t, but does not use the -_LARGEFILE_SOURCE convention. Reasoning that all versions of FreeBSD have -off_t (I was able to check back to FreeBSD 3.3), I simply #define CK_OFF_T -to be off_t in ckcdeb.h within #ifdef __FreeBSD__ .. #endif. Another one -down. This can be done for any platform that is guaranteed to have off_t. -Turns out FreeBSD 3.3 has 64-bit off_t too. 2 Jan 2005. - -OpenBSD, same as FreeBSD. Also, added OS-version-getting thing to makefile -target for the program herald, as in the other BSDs. Built on OpenBSD 2.5 -from 1998, it has 64-bit off_t too. ckcdeb.h, makefile, 2 Jan 2005. - -Dumping the command stack every time there's an error is really too much. -I added SET COMMAND ERROR-DISPLAY {0,1,2,3} to set the verbosity level of -error messages. Only level 3 dumps the stack. ckuus[235].c, 2 Jan 2005. - -Built on HP-UX 11.11 with _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64. The -result works fine as far as I can tell. It sees big files, it can open -them, seek to positions past the 2^31 boundary. It can send large files. -It can do large-number arithmetic (^ 2 62). The only problem is that during -compilation, every single modules warns: - - cc: "/usr/include/sys/socket.h", line 504: warning 562: Redeclaration of - "sendfile" with a different storage class specifier: "sendfile" will have - internal linkage. - cc: "/usr/include/sys/socket.h", line 505: warning 562: Redeclaration of - "sendpath" with a different storage class specifier: "sendpath" will have - internal linkage. - -These warnings should be perfectly harmless since they are not coming from -C-Kermit code, nor does C-Kermit use either one of those functions. These -warnings don't come out in HP-UX 11i v2, but on that one we get tons and tons -of picky compiler warnings (variables set but not used, defined but not -referenced, etc). A couple, however, turned out to be valid; one case of -"expression has no effect", and two of "string format incompatible with -data type" (I missed a couple file-size printfs). - -There were also numerous warnings about signedness mismatch or sign -conversion of constants like IAC (0xff). Does the HP-UX Optimizing Compiler -have a compiler flag to make all chars unsigned? Yes, +uc, but the man page -says "Be careful when using this option. Your application may have problems -interfacing with HP-UX system libraries and other libraries that do not use -this option". Sigh, better not use it. - -After reviewing "HP-UX Large Files White Paper Version 1.4" and HP's -"Writing Portable Code" documents, I added -D_LARGEFILE_SOURCE --D_FILE_OFFSET_BITS=64 to the hpux1000 target, which is the basis for all -HP-UX 10.00 and later builds. Large files are available in HP-UX 10.20 and -later. 10.00 and 10.10 were not real releases, and anyway these flags -should be harmless there unless the large-file implementation was only -partly done. Built OK on both PA-RISC and IA64, optimized and plain. -makefile, 4 Jan 2006. - -Built on FreeBSD 6.0 on IA64. All OK except I got a warning about the -argument passed to time() in logwtmp() in ckufio.c. This section had -already been partially fixed; thus I put the improved version into -#ifdef CK_64BIT, which is our newly available symbol that should be -automatically defined for any true 64-bit build. ckufio.c, 4 Jan 2006. - -Finally got around to testing Jeff's changes to SSL/TLS RAW mode from -December 30th against our POP server. It didn't work, couldn't log in. -Tried backing off the ckctel.c changes first; that allowed login and -communication, but it did not suppress activation of Telnet protocol -whenever a 0xff byte arrived. Backed off the rest of the changes and now -all is OK again. ckctel.c, ckcnet.c, ckuus7.c, 9 Jan 2006. - -Built on NetBSD 1.4.1 (1999), found that it did not like the large file -assumption -- fseeko() and ftello() do not exist; added a clause to the -netbsd target to check for fseeko and not define _LARGEFILE_SOURCE if not -found. Oddly enough, off_t is 64 bits anyway, but it doesn't look like the -APIs are half-done. For example, stat() uses off_t (64 bits) for the file -length, but fseek() uses long (32 bits) and there is no 64-bit analog. -Anyway the new netbsd target works on both 1.4.1 and 1.5.2 (no large files) -and on 2.0.3 (large files). makefile, 9 Jan 2006. - -Built on QNX-32 4.25, which has no large file support. Got a few strange -compiler (WatCom) warnings, but it built and runs OK. Noticed that file -transfers into QNX over a Telnet connection can't use streaming, but that's -nothing new to this version; same thing happens with C-Kermit 7.0. 9 Jan 2006. - -Built on IRIX 6.5. I didn't bother with large files there because it does -not support the _LARGEFILE_SOURCE interface; you have to change all the APIs -at the source level from blah() to blah64(). Seems to work fine as a 32-bit -app even though its off_t is 64 bits. Tried a pure 64-bit IRIX 6.5 build -but it dies in ckcnet.c when it hits SOCKOPT_T and GSOCKNAME_T with "The -identifier 'socklen_t' is undefined". - -Looks like I no longer have access to SCO OSR5. - -Made a pure 32-bit build on SCO UnixWare 7.1.4, all OK. Found that this -version also supports LFS, added it to the uw7 target. makefile, 9 Jan 2006. - ---- Dev.11 --- - -Evidently the HP-UX bundled (non-ANSI non-optimizing) compiler doesn't like -long integers in switch expressions. Changed three examples of these in the -S-expression code. ckuus3.c, 10 Jan 2006. - -A section of tstats() where GFTIMER isn't defined (e.g. on Motorola -sv68r3v6) was garbled. Fixed in ckcfn2.c, 10 Jan 2006. - -A fix for setting 921600 bps on Linux from Paul Fulghum, Microgate Systems Ltd. -ttgspd(): ckutio.c, 11 Jan 2006. - -Noticed that when I changed the compact substring notation code back on -August 9th, I broke the ability to use arithmetic expressions within the -brackets, which explains some rather odd behavior I saw with some of my -scripts. Looking more deeply into this, I also see that all the parsers I -have been using up to now for this, as well as for array bounds pairs, have -been inadequate because they never allowed for nested constructions, such as -a member of a bounds pair that itself was an array element, possibly with -another array element as a subscript. I wrote a new routine for this, -called boundspair(), which is like arraybounds() except it accepts an extra -argument, an array of characters that can serve as bounds-pair delimiters, -and it returns the pair separator that was encountered in another new -argument. For the alternative substring notation for [startpos-endpos] I -had to change the delimiter from '-' to '_' because '-' can be used in -arithmetic but '_' is not a recognized operator. This is so I can parse, -e.g. [a:b] or [a_b] in the same context, and then find out which form was -used, e.g. \s(line[9:12]) or \s(line[9_12]); the first string is 4 bytes -long, the second is 12. Everything seems to be OK now. \s(line[10]) gives -everything starting at 10, but \s(line[10:0]) gives the null string. Bad -syntax in the bounds pairs results in a null string; missing pieces of the -bounds pair result in defaults that should be compatible with previous -behavior. ckuus[45].c, ckuusr.h, 13 Jan 2005. - -Changed arraybounds() to call boundsdpair(). This was a rather drastic -change, not strictly necessary, but I think I got all the kinks out. -ckuus5.c, 13 Jan 2005. - -Changes from PeterE to the makefile for HP-UX 6 and 7, to accommodate bigger -symbol tables, etc. 19 Jan 2005. - -Determined that SCO OSR5.0.6 (and earlier) do(es) not support large files. -Don't know about 5.0.7. 30 Jan 2005. - -Created a new build target for SCO OSR6.0.0. Gets the exact 6.x.x version -dynamically. Supports large files and big-number arithmetic via CK_OFF_T. -The sockopt() family of functions changed the data types of some of their -arguments since OSR5. It was already possible to define SOCKOPT_T and -GSOCKNAME_T from the command line but I had to add code to also allow this -for GPEERNAME_T too. ckcnet.c, makefile, 30 Jan 2005. - -Apparently, ever since C-Kermit 7.0 was released, it has never been possible -to use a variable for the as-name in a RECEIVE command in Kermit 95. This -is because evaluation of the as-name field was deferred until after we could -check whether it might be a directory name (which, in Windows, could start -with a backslash). This little bit of magic was not a good idea, magic -hardly ever is. I changed the code to evaluate both as-name fields in the -normal way. If they want to receive to a directory called "\%1", they'll -just have to spell it differently. The workaround is to turn the whole -command into a macro and evaluate it before executing it, e.g.: - - assign xx receive /as-name:\%1 - do xx - -ckuus6.c, 1 Feb 2006. - -Built OK on FreeBSD 6.1 on AMD64. Adjusted some copyrights and date stamps. -ckcmai.c, makefile, 8 Feb 2006. - ---- Dev.12 --- - -Fixed a signed/unsigned char warning in the new boundspair() calling code -in the compact substring notation handler. ckuus4.c, 9 Feb 2006. - -Removed a spurious extra linux+openssl label from the makefile, added -solaris10g_64 synonym. 9 Feb 2006. - -Satisfied myself that LFS is OK on Solaris 10 i386, and I'm going to assume -it's also OK on Solaris 9. Made LFS standard for all Solaris 9 and 10 -builds (including the secure ones) except the explicitly 64-bit ones, and -made the provisional solarisXXlfs targets into synonyms. makefile, 9 Feb 2006. - ---- Dev.13 --- - -Further attempts at SSL/TLS message suppression when QUIET is ON. -ck_ssl.c, 16 Feb 2006. - -From J.Scott Kasten: (quote...) I just uploaded a patch to /kermit/incoming. -The file name is "jsk-patch-for-cku211.diff". I have also included the -patch as ASCII text in this email below. This patch may be applied to the -cku211.tar.gz source code via: - cd cku211, patch -p1 <../jsk-patch-for-cku211.diff -The patch adds 4 new build targets: - netbsdwoc - a stripped no curses target for iksd used. - netbsdse - security enhanced target with srp, ssl, and zlib. - irix65gcc - build on SGI Irix 6.5 platform using gcc. - irix65se - security enhanced target with srp, ssl, and zlib. -The patch fixes one build target: - irix64gcc - The "-s" option is not supported by gcc under Irix. -I thank all of you in the Kermit Project for such a fine utility. I -recently had to get a 16 MB file overseas across a spotty communications -link to repair a computer remotely. Kermit was the only thing that could do -the job, so I wanted to contribute these patches back to the mainstream to -say thanks. This digitally signed email is a binding contract that -officially assigns the rights to the source code patch (shown below) that I -developed to the Kermit Project at Columbia University. (...end quote) -ck_ssl.c, makefile, 23 Feb 2006. - -Changed the new NetBSD target names to be consistent with the conventions -used in most other targets: - - netbsdwoc -> netbsdnc - netbsdse -> netbsd+ssl+srp+zlib - irix65se -> irix65+ssl+srp+zlib - -and removed old, now superfluous, NetBSD targets (old-netbsd, netbst15, -netbst16), leaving synonym labels in their place. Also updated (crudely) -the Linux target variations (curses instead of nocurses, no curses at all) -to be (appropriately modified) copies of the current linux target. It would -be nicer to combine them, but this gets the job done. makefile, 23 Feb 2006. - ---- Dev.14 --- - -Fixed the HELP command when used with tokens like @, ^, #, and ;. The first -two had been omitted from the table. The second two required a new path -into the guts of the parser, since comments are normally stripped at a very -low level. ckuus[r2].c, ckucmd.c, 24 Feb 2006. - -Built on AIX 5.1 ("make aix51") without incident. Then I tried: - - make aix51 "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - -This had no effect. I found the relevant document ath the IBM website. It -says to use -D_LARGE_FILES instead. I added this to the AIX 4.2 target -since (a) IBM says large files are supported by AIX 4.2 and later, and (b) -all Kermit AIX targets past 4.2 use the 4.2 one. Plus a clause to make -sure CK_OFF_T is defined appropriately. ckcdeb.h, makefile, 6 Mar 2006. - -Added a 32-bit aix51+openssl target. Builds OK, works fine (tested against -our SSL POP server). Tried I tried adding -D_LARGE_FILES. It seems to work -fine, so we'll keep it. Cleaned up the other aix5blah entries a bit also. -makefile, 6 Mar 2006. - -Fixes from J. Scott Kasten to the IRIX 6.4 and 6.5 makefile targets. They -were badly wrong. makefile, 6 Mar 2006. - -The reason Kermit was looping on directories in IRIX was a classic -"double-ended break". The makefile targets failed to define DIRENT so -Kermit was open/read on directories rather than opendir()/readdir(). But -then it was also failing to account for the fact that read() would return -1 -on error. The makefile fix adds -DDIRENT, and the read() case in traverse() -now properly terminates its loop on error. ckufio.c, 6 Mar 2006. - ---- Dev.14 --- - -In response to a complaint that C-Kermit would not build on HP-UX 11 with -OpenSSL, I tried it myself on both 11.11/PA-RISC and 11i v2/Itanium. It built -OK on both but I had to add a new target (hpux1000o+openssl-nozlib) for no -Zlib since these boxes did not have it installed. makefile, 9 Mar 2006. - -Added OpenSSL version number display to SHOW FEATURES. ckuus5.c, 9 Mar 2006. - -Gavin Graham noticed that FTP [M]GET /DELETE /MOVE-TO: was rejected with -"?Sorry, /DELETE conflicts with /MOVE or /RENAME". This check belongs in the -PUT code but not in the GET code. Commented it out and tested the result. -The combination is now accepted but then Kermit refuses the incoming file as -if it had been given a /SMALLER-THAN: or /LARGER-THAN: switch, which it didn't -happen. Turns out there was one more place where I wasn't initializing the -new "wide int" member of the switch-parsing pv[] struct. Once this was fixed, -the /MOVE-TO part still didn't work. Turned out the /DELETE case was part of -a long if-else-if-else- chain, which effectively made /DELETE and /MOVE-TO: or -/RENAME-TO: mutually exclusive. Fixed this, now it works fine. ckcftp.c, -13 Mar 2006. - -Got access to AIX 5.3, built there, all OK, including large files. 13 Mar 2006. - ---- Dev.16 --- - -Patches from Mark Sapiro to suppress getsockopt() and getsockname() warnings -in Mac OS X. ckcnet.[ch], 18 Mar 2006. - -In response to a complaint from Clarence Dold, tried "make redhat9" (which -is the rather dated target that tried to include all forms of security) on -RH Linux AS4.3, it failed miserably. I made a new makefile target, removing -Kerberos IV and got a lot farther. But then in ckcftp.c, the following -struct definition: - - struct { - CONST gss_OID_desc * CONST * mech_type; - char *service_name; - } gss_trials[] = { - { &ck_gss_mech_krb5, "ftp" }, - { &ck_gss_mech_krb5, "host" }, - }; - -refers to a variable, ck_gss_mech_krb5, that is not defined anywhere. Up -above, however, is a static definition for gss_mech_krb5, so I changed the -struct definition to match. Next, in ckuath.c, the compiler could not find -the com_err.h file. Turns out in Linux this is in a subdirectory, et, so we -have to add a -I clause to the makefile target for this. Made a target for -Linux+SSL only. Made a target for Linux+Krb5 only; this required moving an -#ifdef in ckuus7.c to prevent an unguarded reference to SSLEAY_VERSION. -New targets: linux+krb5+ssl, linux+krb5, linux+krb5. ckcftp.c, ckuus7.c, -makefile, 27 Mar 2006. - -New targets of HP-UX 10/11 with OpenSSL from PeterE. makefile, 27 Mar 2006. - -Added large file/integer support to SHOW FEATURES. ckuus5.c, 27 Mar 2006. - -Built OK on Solaris 9 and 10 with gcc (someone was complaining that this -didn't work, but that was 8.0.211). - -Started build on a Sun 3/80 mc68030 with NetBSD 2.0 and gcc 3.3.3. But it -died with an assembler error in ckcfn2.c (compiler bug). 27 Mar 2006. - ---- Dev.17 --- - -NebBSD 2.0 build completed by turning off optimization on ckcfn2.c -("KFLAGS=-O0"). Result supports 64-bit ints and, presumably, large files. -uname -p = "m68k", -m = "sun3". 29 Mar 2006. - -Corrected an omission in applying PeterE's updates to the HP-UX targets. -makefile, 28 Mar 2006. - -solaris2xg+krb5+krb4+openssl+shadow: - -Tried resurrecting the solaris2xg+krb5+krb4+openssl+shadow target. It asks -to link with libdes but there is no libdes. Removed -ldes from the target, -now at least it builds and runs wart. The compilation blows up in ckcftp.c -for missing header files: - - ckcftp.c:462: kerberosIV/krb.h: No such file or directory - ckcftp.c:500: gssapi/gssapi_generic.h: No such file or directory - ckcftp.c:501: gssapi/gssapi_krb5.h: No such file or directory - -Got a bit farther by adding appropriate -I's and -L's to KFLAGS but it still -dies compiling (or linking?) ckcftp.c, but it doesn't say exactly why. OK, -deferred. - -Added SET SEXPRESSION TRUNCATE-ALL-RESULTS { ON, OFF }. This can be used -for force integer arithmetic in any kind of calculation that requires it, -such as date calculations. This is a global setting, not on any kind of -stack. Also, updated SHOW SEXP and added HELP SET SEXP which wasn't there -before. ckuus[23].c, 30 Mar 2006. - -To make the RENAME command a bit more useful, need to add some switches. -But it shares a switch table, qvswtab[], with some other commands. Broke -this off into its own switch table. ckuus6.c, 17 Apr 2006. - -Added RENAME switch values that can be used in the same table with the DELETE -switch values, which are shared by many commands. ckuusr.h, 17 Apr 2006. - -Discovered that the RENAME command could be entered without any arguments -and it would still succeed. Fixed in dorenam(): ckuus6.c, 17 Apr 2006. - -Added parsing for RENAME /UPPER:option (to uppercase the file name(s)), -/LOWER:option (to lowercase), and /REPLACE:{{s1}{s2}} (to do string -replacement on the filename(s)), but not the semantics. When any of these -switches is given, the target ("to") name is not parsed; they act on the -source name. The /LOWER: switch takes keyword args to specify whether it -should act only only files that have all UPPER case latters, or on ALL files -(i.e., including files with mixed-case names); similarly for the /UPPER: -switch. There is some creative parsing allowing these to be given with or -without a colon and keyword argument, which works fine except if you include -the colon but no argument, execute the command (which works fine), and then -recall the command. I haven't yet decided about the interaction among these -switches. Clearly if /UPPER is given after /LOWER, it overrides. But if -/UPPER (or /LOWER) is given with /REPLACE, what should happen? ckuus6.c, -17 Apr 2006. - -Filled in actions for RENAME /UPPER: and /LOWER: for the single file case, -and tested all combinations of switch values and filename configurations. -Once that was OK, moved the code out into a separate routine, renameone(), -and then called it from both the single-file case and the multifile case. -ckuus6.c, 19 Apr 2006. - -Added RENAME /SIMULATE. Filled in the code for string replacement, needs -testing. ckuus6.c, 20 Apr 2006. - -Changed /REPLACE options to allow a negative number to specify an occurrence -from the right, so -1 means the last occurrence, -2 means the next-to-last, -etc. ckuus6.c, 24 Apr 2006. - -Added RENAME /COLLISION:{OVERWRITE,PROCEED,FAIL}. This is implemented but -not tested. ckuus6.c, 24 Apr 2006. - -Worked on RENAME /COLLISION:FAIL. I decided it was less than useful to ... - -Added SET RENAME { COLLISION, LIST } to let user change default collision -and listing actions. ckuusr.[ch], ckuus[36].c, 25 Apr 2006. - -Experimented with parsing for /CONVERT:cset1:cset2. The problem here is -that there is no straightforward way for a switch to have multiple -arguments. Or is there...? If I parse cset1 with cmswi() rather than -cmkey(), it almost works; the only problem is that the character-set -keywords don't have CM_ARG set, so they don't know to stop on, and ignore, a -colon. If I make a copy of the table and set CM_ARG in the flags field for -each keyword, it works fine: if I Tab in the first name, it fills itself -out, supplies a colon, and waits for the second name. So in the code, the -first time that RENAME /CONVERT is invoked, I put code to copy fcstab[] and -set CM_ARG in each flags field. Works fine, and now we know how to make a -switch that takes multiple arguments. ckuus6.c, 24 Apr 2006. - -I thought I had a function to convert the character set of a string but I -don't, so actually implementing /CONVERT: will be difficult. - -Actually the parsing wasn't that easy either. It works OK interactively, -but not in a TAKE file. To make a long story short, I had to change -gtword() and cmkey2() to not require "/" at the beginning of a switch, and -then to parse arguments-that-are-followed-by-other-arguments as if they were -switches, so that they can end with colon rather than space. This might -seem dangerous, but switches always have "/" at the beginning, so the check -is superfluous. ckucmd.c, 26 Apr 2006. - -Back to /CONVERT... Once I was able to get the code to call cvtstring() I -was able to debug it (at first it was skipping every second character). And -now we have a general-purpose string-translating function we can call from -anywhere. Requires that C-Kermit be built with Unicode support. -ckuus6.c, 26 Apr 2006. - -Added SHOW RENAME. ckuusr.h, ckuus[r5].c, 26 Apr 2006. - -Conditionalized some Unix/Windows assumptions in renameone() so the code -could work in VMS. ckuus6.c, 2 May 2006. - -Added RENAME /FIXSPACES to change all spaces in the filename(s) to -underscore or any other character or string that is given. This is just a -special case of RENAME /REPLACE:{{ }{x}} with easier syntax. -ckuusr.h, ckuus6.c, 2 May 2006. - -Added an "all-but" control to the /REPLACE options: -/REPLACE:{{.}{_}{~1}} means replace all but the first (this one works); -/REPLACE:{{.}{_}{~-1}} means replace all but the last (this one not yet). -ckuus6.c, 2 May 2006. - -Filled in the second one ("all but" the given occurrence). The algorithm is -simply to reverse the three strings and then use the same code as we use in -the left-right-case, and then unreverse the result. At first I used -yystring() for this but yikes, what a bad design! So I made a better -string-reversal routine, gnirts(), for this (luckily yystring() is only used -in one place, for which its design is appropriate). ckuus6.c, 3-4 May 2006. - -Added code to handle the case where the file being renamed includes a path -specification. In this case we separate the path, apply the renaming -functions to the filename only, and then at the end rejoin the original -filename with the path, and join the new name with same path or, if a -destination directory was given, with that. ckuus6.c, 4 May 2006. - -Added HELP SET RENAME and updated HELP RENAME. ckuus2.c, 4 May 2006. - -"Tom Violin" (Tom Hansen) noticed that the first time you FOPEN a file, -Kermit's memory consumption goes way up. In fact there's a warning to that -effect in the code, where, upon first open, a potentially big array of -potentially big structs is allocated. I rewrote the code to allocate each -array member (struct ckz_file) as needed, i.e. when a file is opened, and to -free it when the file is closed (or the open fails). This was actually -quite a lot of work, which is why I didn't do it the first time around: -every single "." had to be changed to "->". Every check for a valid -channel first had to check if the channel's struct was allocated and every -other reference to z_file[i]->anything had to be prechecked that z_file[i] -was not a NULL pointer. Also I made some improvements to FILE STATUS, and I -fixed FILE CLOSE to default the channel number if only one channel was open, -as I did for FILE STATUS a while back. ckuus7.c, Cinco de mayo 2006. - -Ran my old BUILDS script that builds C-Kermit with about 100 different -combinations of feature-selection switches. Fixed a few small glitches so -now they all build OK (except can't do NOANSI builds any more on recent -Linuxes because of varargs()). ckuus3.c, ckuus5.c, ckuus6.c, ckuus7.c, -ckucmd.c, ckcfns.c, 6 May 2006. - -Fixed RENAME /LOWER and /UPPER, when given with no colon or agrument, to -default to ALL. ckuus6.c, 13 May 2006. - -Built on VMS 7.2-1, tested new RENAME command there; seems to be OK. -13 May 2006. - ---- Dev.18 --- - -I wanted to test large files against RESEND but I don't have access to any -system that can run C-Kermit and that also has enough space for a large -file. I created a "fake" large file on Linux (3G hole plus 1 byte), and -sent it over a localhost connection, and interrupted it repeatedly and then -initiated a RESEND at the sender. In each case, it picked up where it left -off. But before the 2G boundary was crossed the disk filled up. -Inconclusive. 14 May 2006. - -PeterE got a warning in the new FILE OPEN code when building in HP-UX 9. -I added a cast, built on HP-UX 11, no more complaint. However there -are warnings about internal vs external bindings of sendpath and sendfile -in every module. Too bad, these are not Kermit tokens, it's a conflict in -HP's header files. Marc Sapiro doesn't see them; probably it's something -on the HP testdrive site. ckuus7.c, 17 May 2006. - -Fixed the tru64-51b+openssl target -- the terminating doublequote of KFLAGS -was missing -- and also the osf target, which failed to import the LIBS -definition from whatever other target invoked it. Now the SSL build goes OK -on Tru64 5.1B. Replaced x.tar.z in the download areas without declaring a -new Dev number. The new one has a makefile with today's date. Software -engineering at its best! makefile, 18 May 2006. - -Scott Kasten noted that the estimated-time-remaining calculation would go -bonkers on LFS systems when RESENDing a large file. It looks like the -shocps() and shoetl() functions escaped the CK_OFF_T conversion. I made -what seemed to be the right adjustments, and then was lucky enough to find a -computer that had enough free disk space for me to send a large file, -interrupt it several times, resend it, all seems to be OK. 28 May 2006. -Later Scott verified these changes independently for Linux, but the problems -in IRIX remain. - -Patches from Scott Kasten for large files on IRIX 6.5: ckcdeb.h, makefile, -12 Jun 2006. - ---- Dev.19 --- - -Added a new function for dealing with JPGs and GIFs: - -\fpicture(filename,&a) - returns 0 if file not recognized or can't be opened; - returns 1 if landscape, 2 if portrait or square. - If array given, element 1 is width, element 2 is height. - -ckuusr.h, ckuus4.c, 19 Jun 2006. - -Scott Kasten reports that the FTP client can transfer large files OK, at -least in Linux, but has trouble with recovery: - - . Kermit takes a very long time to start the transfer, sometimes over - 30 minutes. Suspect the ftp server is counting the bytes in a long file? - Or maybe it's a text-mode transfer and it's counting the lines? Probably - in response to Kermit's SIZE command. - - . The size shown in the FT display is wrong by a random amount. And of - course so are the progress bar, percent done, and time remaining. - - . The file, however, is transferred correctly. REGET works correctly too. - -I tried setting up a test scenario locally but our Solaris FTP server does -not support large files: - - FTP SENT [SIZE BIGFILE] - FTP RCVD [550 BIGFILE: not a plain file.] - FTP SENT [PASV] - FTP RCVD [227 Entering Passive Mode (128,59,48,24,246,37)] - FTP SENT [RETR BIGFILE] - FTP RCVD [550 BIGFILE: Value too large for defined data type.] - -Created the same 3GB on a Tru64 Unix system that allows FTP access. Made -the connection from C-Kermit on Solaris (32-bit with LFS): - - 16:46:12.908 FTP SENT [SIZE BIGFILE] - 16:46:12.947 FTP RCVD [213 3000000001] - -Note that it takes less than half a second to get the reply. Now I start -the download and then interrupt it at about 2%: - - 16:46:12.979 FTP SENT [TYPE I] - 16:46:13.174 FTP RCVD [200 Type set to I.] - 16:46:13.226 FTP SENT [PASV] - 16:46:13.262 FTP RCVD [227 Entering Passive Mode (15,170,178,171,11,37)] - 16:46:13.299 FTP SENT [RETR BIGFILE] - 16:46:13.337 FTP RCVD [150 Opening BINARY mode data connection for BIGFILE..] - 16:47:24.895 FTP RCVD [426 Transfer aborted. Data connection closed.] - 16:47:24.934 FTP RCVD [226 Abort successful] - 16:47:24.991 FTP SENT [MDTM BIGFILE] - 16:47:25.028 FTP RCVD [213 20060706204458] - -Now I do a REGET: - - 16:51:55.321 FTP SENT [PASV] - 16:51:55.357 FTP RCVD [227 Entering Passive Mode (15,170,178,171,11,43)] - 16:51:55.394 FTP SENT [REST 122736640] - 16:51:55.430 FTP RCVD [350 Restarting at 122736640. Send STORE or RETRIEVE..] - 16:51:55.431 FTP SENT [RETR BIGFILE] - 16:51:55.469 FTP RCVD [150 Opening BINARY mode data connection for BIGFILE..] - -This worked perfectly, as far as I can tell; the FT display picked up in the -right place; the thermometer, percent done, and estimated time remaining -were the same as when we left off last time. I did the same thing several -more times, everything was OK. It would have taken a really long time to -let this run to completion, but I think this demonstrates that Scott's -symptoms are server-dependent. No changes. 6 July 2006. - -Checked current code on VMS 8.2-1 on IA64 / UCX 5.5, builds fine. -No changes. Updated listing at HP. 6 July 2006. - -Checked FTP GET of large file in ASCII mode against Tru64 FTP server. It -was fine, and there was no delay in the server's response to our SIZE command -(as there would be if it were scanning the entire file to count how many -bytes would be required to send it in text mode). 7 Jul 2006. - -Tested FTP PUT big file against Tru64, OK. Ditto FTP RESEND big file: - - C-Kermit>resend BIGFILE - PUT BIGFILE (binary) (3000000001 bytes)---> PASV - 227 Entering Passive Mode (15,170,178,171,13,186) - ---> SIZE BIGFILE - 213 343211280 - ---> MDTM BIGFILE - 213 20060707141243 - ---> APPE BIGFILE - 150 Opening BINARY mode data connection for BIGFILE (128.59.59.56,45470). - -Made REPUT a synonym for RESEND. ckuusr.c, 7 Jul 2006. - -Added FTP REPUT and FTP RESEND since previously there was no FTP-prefixed -command for recovering uploads, only the regular RESEND command, which might -not have been obvious to people. ckcftp.c, 7 Jul 2006. - -Added help text for FTP RESEND and REPUT and amended RESEND help text. -ckcftp.c, ckuus2.c, 7 Jul 2006. - -Changed name of \fpicture() to \fpictureinfo() and added help text. By the -way, ImageMagick can do this too: identify -format "%w %h" dscf0520.jpg. -The advantage of having it in Kermit is that not everybody has ImageMagick. -ckuus[24].c, 7 Jul 2006. - -Changed the numeric comparisons = < > <= >= != to allow long integers by -changing the data type to CK_OFF_T, etc. ckuus6.c, 7 Jul 2006. - -Noticed that \fkeywordvalue(foo=this is a string) only kept the first word. -Fixed it to keep the whole definition. Also added \fkwvalue() as a briefer -synomym. ckuus4.c, 7 Jul 2006 - -Sometimes we want to check if a file's status before we've FOPEN'd it, in -which case the channel variable is likely to be empty and \f_status(\%c) -would get an error. Making the obvious change didn't fix this, however. It -turns out that the function evaluator failed to adjust argn (argument count) -when trailing arguments were empty, and argn was being used in this case, -and probably others, to test whether an argument existed. I added code to -adjust argn to reflect the number of aruments up to and including the -rightmost non-empty one. ckuus4.c, 7 Jul 2006. - -Fixed \fstripb() to not dump core if second argument is missing. -ckuus4.c, 7 Jul 2006. - -Discovered that it was not obvious what pattern to use to match strings -enclosed in square brackets. "if match [abc] \[*\]" didn't work. Neither -did various other tricks like NCRs for the brackets. However, "if match -[abc] \\[*\\]" does work. Trying to fix this would no doubt break 100 other -things, so let's call it a feature. 7 Jul 2006. - -Added \fgetpidinfo(n) to return info about a process ID; for now it simply -returns 1 if the process is alive and 0 if not (or -1 if the argument is -bad or missing or on any kind of error). ckuusr.h, ckuus[24].c, 7 Jul 2006. - -The "where-did-my-file-go" message seemed to be ending with a LF rather -than CRLF, probably because the terminal modes had not yet been restored, -leaving the next prompt hanging below it, rather than on the left margin, -if C-Kermit exited immediately after the transfer. Fixed by changing -all \n's to \r\n's in wheremsg(): ckcpro.w, 8 Jul 2006. - -Added \v(lastkwval) so we can retrieve programmatically the keyword most -recently processed by \fkeywordval(). ckuusr.h, ckuus4.c, 9 Jul 2006. - ---- Dev.20 --- - -Added #ifdef SV68, #include , #endif because Unix System V/68 on -Motorola choked on the SEEK_CUR reference without it. ckuus4.c, 10 Jul 2006. - -Make \fkeywordval(xxx) undefine xxx (i.e. when a keyword is given with no -value). This way command-line keywords will always override preexisting -default definitions, whether they have a value or not, which makes it easier -to parse command lines like "foo=bar blah xx=yy". ckuus[24].c, 12 Jul 2006. - -On 29 Nov 2005 I changed IF KERBANG to solve a problem (see entry for that -date), but introduced a new one; namely that you can't have (e.g.) a FATAL -macro that uses IF KERBANG to decide whether to EXIT all the way or STOP -back to the prompt. Changed it again, this time to require not that the -command level be 1, but that the command *file* level be 0 (i.e. that we are -in the top-level command file, irrespective of the command or macro level, -but not in a subfile). ckuus6.c, 12 Jul 2006. - -It is unhelpful when Kermit gets a syntax error in the middle of a big -compound statement block (e.g. FOR or WHILE loop) and dumps out the whole -thing in an error message. I changed the two places where this can happen -to call a new routine that, instead of dumping out the entire cmdbuf, -checks its length first and if it's more than a line long, truncates it -and adds an ellipsis. ckuus6.c, 12 Jul 2006. - -The new RENAME command didn't give very good error messages, e.g. if the -filespec didn't match any files. Fixed in dorenam(): ckuus6.c, 12 Jul 2006. - -Fixed DIR /TOP to work if the /TOP:n argument was omitted, defaulting -to 10. domydir(): ckuus6.c, 12 Jul 2006. - -Added DIR /COUNT:v to count the number of files that match the given -criteria and store result in the variable v. ckuusr.h, ckuus[r26].c, -24 Aug 2006. - -Added HDIRECTORY as an invisible synonym for DIR /SORT:SIZE /REVERSE. -Can be used with other switches, of course, so (e.g.) HD /TOP shows the -ten biggest files. ckuusr.h, ckuus[r26].c, 24 Aug 2006. - -DIR /FOLLOWLINKS and /NOFOLLOWLINKS always did the same thing; the switch -was ignored, a symlink is always followed. Fixed in ckuus6.c, 24 Aug 2006. - -Added DIR /NOLINKS, which means don't show or count symlinks at all. -ckuusr.h, ckuus[r26].c, 24 Aug 2006. - -Build on Solaris 9 and NetBSD 3.0, 24 Aug 2006. - -Added a missing definition for LOCK_DIR in the Linux HAVE_BAUDBOY case, -suggested by Gerry Belanger. ckutio.c, 6 Oct 2006. - -Suggested by Jim Crapuchettes: \v(dialmessage) is the text string -corresponding to \v(dialstatus). ckuusr.h, ckuus4.c, 6 Oct 2006. - -Soewono Effendi sent code for exit sequence to leave DTR on; this amounted -to unsetting HPUCL in c_cflag. I did it a simpler way, hopefully portable -to all Unixes, but who knows at this late date. The code is inside -#ifndef CK_NOHUPCL..#endif in case it causes trouble. It is executed if -SET EXIT HANGUP is OFF and a serial port was open at the time Kermit exits -(or closes it explicitly). ttclos(): ckutio.c, 6 Oct 2006. - -Built on Solaris9/Sparc; FreeBSD 6.2/AMD64; NetBSD 3.0/i386; HP-UX 11i v2; -SCO OSR6.00. - ---- Dev.21 --- - -Added netbsd+openssl target to makefile. Built OK (NetBSD 3.0, OpenSSL -0.9.7d) except with some warnings in ck_crp.c. Connects and logs in OK to a -secure site. 10 Oct 2006. - -Added a debug statement to ftp_hookup() to record the TCP port that was used. -ckcftp.c, 11 Oct 2006. - -Built with OpenSSL 0.9.7l on Solaris 9. Built with OpenSSL 0.9.8d on -Solaris 9; connects and logs in to a secure site. 11 Oct 2006. - -The new RENAME command didn't work if both the source and destination names -included directory segments, e.g. "rename /tmp/foo ~/bar" (see notes of -4 May 2006). This was fixed in renameone() by a special case in which -the second argument is given but it is a filename, not a directory name. -ckuus6.c, 11 Oct 2006. - -Fixed unguarded reference to dialmsg[] for \fdialmessage(), noticed by -Gerry Belanger. ckuus4.c, 12 Oct 2006. - -Added a TOUCH command that does what UNIX touch does: creates the file if it -does not exist, updates the timestamp if it does. If a wildcard is given, -it operates only on existing files. It shares the DIRECTORY command parser, -so all the same file selection switches can be given. ckuusr.[ch], -ckuus[26].c, 12 Oct 2006. - -PeterE noticed that if you FOPEN a file, do some seeks or reads, then FCLOSE -it, then FOPEN it again (or open a different one), some of the old -information is still there (e.g. current line number). This is an artifact -of the changes of May 4th. Now the file closing and opening routines are a -bit more careful about scrubbing and initializing the file info struct. -ckuus7.c, 12 Oct 2006. - ---- Dev.22 --- - -Built OK on Red Hat Linux AS4 with both "make linux" and "make linuxnc". -15 Oct 2006. - -DIRECTORY /BRIEF ignored file selection switches and always listed all -files. This was because of how I cleverly called filhelp() (the routine -that lists matching files when ? is typed in a filename field) and, of -course, filhelp() doesn't know anything about the DIRECTORY command's file -selections. Changed filhelp() to accept all the args needed for passing -along to fileselect(), renamed it to xfilhelp(), and made a filhelp() stub -that chains to xfilhelp() with null selections. ckcker.h, ckucmd.[ch], -ckuus6.c, 29 Nov 2006. - -SHOW CONNECTION for an SSH connection said the connection type was "NET" -rather than "SSH". Fixed in dolognet(): ckuus3.c, 29 Nov 2006. - -SHOW CONNECTION didn't show the TCP port number. This command works by -parsing the current connection log entry string, which doesn't have a field -for this, but which sometimes shows the port number as part of the hostname -(but more often not). Added code to dolognet() to log the TCP port number, -if known. This involved adding a gettcpport() function to ckcnet.c. -ckcnet.[ch], ckuus3.c, 29 Nov 2006. - -This was impossible: def \%1 upper, echo \f\%1(abc) -- i.e. to "compose" a -function name. Fixed in zzstring(). But note that it's still not possible -to do this: def \%1 \fupper, echo \%1(abc) -- because at the point where -"\fupper" is encountered, which is automatically fed to fneval(), the -argument list hasn't been read yet. ckuus4.c, 29 Nov 2006. - -The meaningless Lisp command (=) would cause Kermit to hang. Due to some -idiosyncracy in the parser, it would see this as ((=) and would go into -"wait for the closing paren" mode. There was already a hack in the code to -compensate for this, but it didn't work. I fixed the hack but I don't -understand the real problem. Anyway, comparing Kermit with real (Franz) -Lisp I discovered that comparison operators do not require two arguments, as -Kermit has been doing, although they do require at least one. I changed -Kermit to not require two, so now all the comparison predicates behave -exactly like Franz Lisp, including getting an error if there are no args). -ckuus[r3].c, 29 Nov 2006. - -From to-do list: Make a way to inhibit pattern matching in SWITCH labels. -It's already there; just quote the wildcard characters; the only trick is -that for some reason (such as that SWITCH is really an internally defined -macro), a double quote is needed: - - switch \%1 { - :a\\*z, echo literally "a*z", break - :abcxyz, echo literally "abcxyz", break - :a*z, echo a...z, break - :default, echo NO MATCH - } - -In first case, the asterisk is taken literally; in the third it's a -metacharacter and the label matches any string that starts with 'a' and -ends with 'z'. - -Array initializion would quit early if any initializers were undefined, -e.g. "decl \&a[] = \%a \%b \%c" would stop at the first element if \%b -was not defined, even though \%c might be defined. Fixed in dodcl(): -ckuusr.c, 30 Nov 2006. - -DIR /ARRAY:a filespec, when the filespec does not match any files, -terminates with the array undeclared. It would be better to return a -declared but empty array (\&a[0] = 0). The code is already there to do -that, but isn't working. And yet "declare \&a[0]" does indeed create a -0-element array ("show array" shows a dimension of 0). Turns out there were -two problems; one was the careless recycling of a local variable ("array"), -resulting in failure to create \&a[] (but not any other array). Fixed in -domydir(): ckuus6.c, 30 Nov 2006. - -The other problem was that dclarray(), when called with an array name and a -dimension of zero, does two different things depending on whether the array -already existed. There is still a fair amount of confusion about whether a -dimension of 0 indicates an array with 1 element (as it should) or a -nonexistent array. We call dclarray() with a size of 0 to undeclare an -array but we also need to able able to declare an array with only element 0. -I changed dclarray() to treat a negative dimension as a command to destroy -the array, and 0 or positive as a command to create the array with the given -dimension. ckuus[r56].c, 30 Nov 2006. - -Next problem: when chkarray() returns 0, this should not be interpreted to -mean the array does not exist. Looks like the only place this happened was -in \fcontents(); fixed in ckuus4.c, 30 Nov 2006. - -If we include file selectors with DIR /ARRAY:&a and some of the files that -match the given filespec but don't fit the selectors, the array's dimension -is bigger than its number of elements. Added code at the end of domydir() -to resize the array so \fdim() returns the number of filenames in the array, -and also made sure that element 0 contains that number too. ckuus6.c, -30 Nov 2006. - -This would be a nice elegant way to loop over a bunch of files, if it worked: - - for \%i 1 \ffiles(*) 1 { rename \fnextfile() xxx_\flpad(\%i,3,0) } - -But in this loop, Kermit skips every other file (beginning with the first) -and then runs out of files halfway through the loop. Why? Because in -commands like RENAME and DELETE, the filename parser is in a chained FDB -with the switch parser. First the switch parser, cmswi(), gets its hands on -\fnextfile(), passing it through the evaluator and thus getting the first -filename, which it then sees is not a switch, so now the field is parsed by -the next parser in the chain, cmifi(), which causes \fnextfile() to be -executed again. In fact, the FOR loop has nothing to do with; the same -thing happens like this: - - void \ffiles(*) - delete \fnextfile() - -This deletes not the first file, but the second one. Obviously users can be -told not to refer to \fnextfile() in chained-fdb fields: - - for \%i 1 \ffiles(*) 1 { .f := \fnextfile(), delete \m(f) } - -but this is hardly intuitive. I had some clever ideas of how to make -\fnextfile() work as expected in this context but it's way too much magic. -Better to simply document that \fnextfile() is "deprecated" and the array -format should be used: - - for \%i 1 \ffiles(*,&a) 1 { delete \&a[\%i] } - -The difference is, an array element doesn't change every time it's referred to! - -Added a /PRESERVE switch to the COPY command to preserve the timestamp and -permissions of the file. I did this using the Kermit APIs so it should work -for any version of C-Kermit or K95. ckuus[26].c, 30 Nov 2006. - -Added COPY /OVERWRITE:{ALWAYS,NEVER,OLDER,NEWER} to control name collisions -when copying across directories. ckuus[26].c, 1 Dec 2006. - ---- Dev.23 --- - -Fixed a bug in SET TELNET PROMPT-FOR-USERID, SET AUTH KERBEROS[45] PROMPT, -and SET AUTH SRP PROMPT in which the user's string was compared with a -literal (s == ""), reported by Pavol Rusnak. Worse, empty strings (if the -test succeeded) were turned into null pointers, and then fed to strlen(). -Fixed in ckuus3.c, 5 Dec 2006. - -Added an optional 4th argument to \findex(), \frindex(), \fsearch(), and -\frsearch(): the desired occurrence number of the searched-for string. -\frsearch() was a bit tricky. ckuus[24].c, 7 Dec 2006. - -Added \fcount(s1,s2) to tell the number of occurrences of s1 in s2. -ckuus[24].c, 8 Dec 2006. - -Added \ffunction(s1) to tell if a given built-in function is available. -ckuus[24].c, 8 Dec 2006. - -Changed RENAME /COLLISION:PROCEED to be /COLLISION:SKIP, which is clearer. -ckuus[26].c, 8 Dec 2006. - -For communication protocols: INPUT /COUNT:n to read exactly n characters -without any matching. Can be used, for example, with CONTENT_LENGTH in CGI -scripts; NUL characters are counted but not collected. ckuusr.[ch], -ckuus4.c, 8 Dec 2006. - -There was a bad bug in the date-parsing routines; it's been there for years. -If a date string includes a timezone, e.g. "Sat, 9 Dec 2006 19:26:23 EST", -and converting to GMT changes the date, the variables for day, month, and -year (which are used later) were not updated, and the final result was a day -off. Fixed in cmcvtdate(): ckucmd.c, 10 Dec 2006. - -Built OK with SSL/TLS. Tested with the POP script, found that I broke INPUT -when adding the /COUNT feature; there was a path through the code that could -leave the "anychar" variable unset and therefore random. Fixed in -doinput(). The POP script, which does not use /COUNT, works again and so -does a new CGI script, which does use /COUNT. ckuus4.c, 10 Dec 2006. - -Supplied a missing comma in the help-text array for HELP SET TERMINAL, which -resulted in bad formatting in K95 around SET SNI-FIRMWARE-VERSIONS. -ckuus2.c, 10 Dec 2006. - -Made "help locus" a synonym for "help set locus". ckuusr.[ch], ckuus2.c, -11 Dec 2006. - -This morning the Columbia FTP server was malfunctioning in a perfect way -for me to implement and test an FTP timeout mechanism. The server would -close the data connection after sending the file, but the client never saw -the close and was stuck forever in a recv(). I added code to do a select() -on the data connection prior to entering the recv(), with a timeout on the -select() that the user can establish with SET FTP TIMEOUT. Built and tested -on Solaris 9, clear-text FTP. Also built cleanly for FTPS and tested -against a server that does not hang; I don't have access to an FTPS server -that would tickle the timeout code. ckcftp.c, 11 Dec 2006. - ---- Dev.24 --- - -Fixed a bug in the INPUT /COUNT: parser: the array of search strings was -never initialized, which didn't matter before, but with /COUNT:, if the -first element was not a NULL pointer, we'd treat it as a search string, and -then if it happened to match something in the input stream, the operation -would stop before the count was exhausted. Fixed by (a) initializing the -array, and (b) ignoring any search strings if /COUNT: was given. ckuusr.c, -13 Dec 2006. - -Removed a debug() statement from zsattr() that suddenly started making some -version of gcc complain, reported by Gerry Belanger. ckufio.c, 13 Dec 2006. - ---- Dev.25 --- - -Some casts for the 3 interior args of the new select() call in ckcftp.c -for HP-UX 9. 14 Dec 2006. - -Changed \fkeywordvalue() to accept a string rather than a single word -as its second argument, so that more than one separator could be specified, -and to return -1 on error, 0 if it found nothing, 1 if given a kewyord but -no value, and 2 if there was a keyword and a value. dokwval(): ckuus[24].c, -14 Dec 2006. - -Checked FTP timeout on command channel with FTP DIRECTORY of a big directory -using a path into our ftp server that preserves the hanging behavior. The -timeout was actually working, but the failure condition wasn't propogating -back to the user, and there was no error message. Fixed in doftprecv2() and -failftprecv2(): ckcftp.c, 15 Dec 2006. - -Added the obvious timeout checks for FTP uploads, but I have no way to test -the code since our misbehaving FTP server does not hang when receiving -files, only when sending them. But uploads work both with and without a -timeout set, so at least no harm is done. ckcftp.c, 17 Dec 2006. - -When downloading with FILE DESTINATION NOWHERE (= /CALIBRATE), Kermit still -checked the size of the incoming file and refused it if there wasn't enough -free disk space, on platforms (such as VMS) where zchkspa()) actually works; -reported by Bob Gezelter. ckcfn3.c, 18 Dec 2006. - -Built on Mac OS X 10.4.8 and NetBSD 3.1_RC3, all OK. 19 Dec 2006. - ---- Dev.26 --- - -Built on VMS 7.3-2/Alpha. Had to squelch a couple compiler warnings by -changing some ints in the new \fpictureinfo() code from unsigned to signed, -and fix a typo in the prototype for the new gettcpport() function. -ckcnet.h, ckuus4.c, 22 Dec 2006. - ---- Dev.27 --- - -Parameterized pty routines and all references to them for file descriptor, -rather than to use global ttyfd, thus allowing ptys to be created for -different purposes. Tested on Solaris 9 and Mac OS X 10.4.8, with "set host -/connect /pty emacs" (fine in both cases), and (more to the point) "set host -/connect /pty kermit" -- here we make a connection from one Kermit process -to another and transfer a file; works fine and wasn't especially slow either; -a good sign. ckcdeb.h, ckutio.c, ckupty.c, 22 Dec 2006. - -Created a new version of ttruncmd() called ttyptycmd(), which works by -calling do_pty() to get a pty to run the command on, and then in a loop, -reads from the pty and writes to the net and reads from the net and writes -to the pty, using select() to which of those it should do on each pass. -First cut just uses single-byte reads and writes. Tested using Kermit -itself as an external protocol. Works but slowly: 6000cps. Zmodem doesn't -work at all. ckutio.c, 24 Dec 2006. - -Changed single-character read() and write() to buffered reads and writes, -with ttxin() and ttol() used for network i/o. Using Kermit as the external -protocol, this gives 450Kcps (about 1/3 normal on this connection). - -But now there's a problem: the loop doesn't know when to stop. How does it -know when the process that is running on the pty has exited? With single -character read()'s that are executed unconditionally when select() says the -pty has data waiting, as in the first pass, I get EIO if there actually -isn't any, and can exit the loop. But now, to avoid blocking, I call -in_chk() to see how much data is waiting, and I don't try to read anything -if it says nothing is waiting. If the process associated with the pty file -descriptor has terminated, in_chk() would presumably get some kind of error, -but it doesn't. I changed do_pty to return the pid of the fork where it -execs its command so we can check the pid with kill(pid,0) when in_chk() of -the pty says 0, but this doesn't help either; it seems like the process is -not exiting, but of course it is. - -I could not find any legitimate way to test when the pty fork terminated. -Select() always says the pty file descriptor was ready, no matter what. -Select() never reports an exception on the pty file descriptor; -in_chk(ptyfd) returns 0 and not an error. read(ptyfd,...) gets 0 but not an -error. fcntl(ptyfd,...) doesn't get an error. Finally I tried -write(ptyfd,c,0) and this indeed gets EIO (i/o error). With this, using -Kermit as the external protocol works fine in Solaris but I tend to think -this trick will not be very portable (it isn't). 24 Dec 2006. - -Made ttptycmd() use a more intelligent buffering scheme, fixed a few things -about how I was setting up the select() call that should address some of -yesterday's problems. Still doesn't work but it's progress. A: 25 Dec 2006. - -Debugging yesterday's code... Still, the error conditions are never set, -we never detect when the pty closes. In Solaris, if select() says ptyfd is -ready to read but in_chk() says there are no characters there, we can treat -this as a loop-exit condition. But in NetBSD, in_chk() always says 0 when -used on a pty (but works OK on a serial or net connection). - -Realized I could not use in_chk() on the pty because there is too much -baggage with the communication path -- myread(), etc etc) -- so I replaced -this with a simple ioctl(ptyfd,FIONREAD,&n). This works fine in Solaris but -always returns 0 in NetBSD, despite what the man page says (i.e. that this -function can be used on any file descriptor). - -OK, let's see.... select() does not return useful results. It says -characters are waiting on ptyfd when they are not, and it never detects the -closure of the pty..... Well of course not, because we are the ones who -have to close it. Just because the process has stopped doesn't mean the pty -is closed. So we're back to square one, how do we know when to close it? -ckupty.c seems to keep the process ID in a global variable, pty_fork_pid -(which is not the same as the pid now returned by do_pty(), which is -useless, but I don't understand why). But it doesn't matter because when we -kill(pty_fork_pid,0), we still get no error of any kind, even after we know -the process has exited. I am completely flummoxed. select() lies, and even -if it didn't, there is simply no completion criterion. In the loop, -select() always says that the pty is ready to read. To be continued. -26 Dec 2006. - -Back to Square One, single-byte reads and writes. - - . This works for both ripple and Kermit. - . Doesn't work for Zmodem but we'll deal with that later. - . In this case FD_ISSET(ptyfd) is still true after pty closes. - -But the ensuing read() gets EIO so we know the pty is gone. That means the -same thing should happen in the buffered version, no? Yes; I went back to -the buffered version and replaced all the other nonworking tests by a -blocking read of 1 byte on the pty and this detects the termination. Now: - - . ripple works perfectly (of course it's only one-way). - . Kermit fails - -Let's call the remote, forked, redirected, external Kermit A and its -local partner B. A sends its S-packet, B receives it OK and Acks. -A apparently does not receive the ACK in time, so sends the S again, but OK. -followed immediately by the F. B Acks the F. A sends the A, B Acks it. -But now A sends a piece of the previous F packet and the the first piece -of a D packet. - -Clearly the buffering is messed up. Sure enough, there was an extraneous -statement incrementing a read pointer in a write section. Removing that -cleared up the problems with Kermit, now we can send and receive substantial -files efficiently in remote mode. Zmodem seems to work too, except that at -the beginning a bunch of "**B0800000000022d"'s are stuffed into Kermit's -command buffer, so after the transfer we get some error messages. - -In local mode, over a Telnet connection, Kermit works fine. Zmodem works -OK too except it doesn't finish right, so at the very end rz on the far end -is still waiting for something; if I cancel out of it with ^X^X^X^X^X, it -deletes the file. So there still is something wrong with the termination -test. - -Also you don't see anything on your screen when running Kermit or Zmodem -this way. That's to be expected, since they are using stdio for the -transfer, so they can't also be displaying progress or other messages. - -Built this on NetBSD again... Seems to work this time, but has trouble -finishing, like Zmodem. Hmmm, on closer examination, it turns out that -since in_chk() always returns 0 on the ptyfd, we fall into our new -single-byte read code, so it's really slow, like 10K cps on a connection -where 1M is the norm. 27 Dec 2006. - -Switched the pty from buffer peeking (FIONREAD) and blocking reads to to -nonblocking reads (O_NONBLOCK / O_NDELAY). Works just fine on NetBSD except -now we no longer get EIO at the end when trying to read from the pty process -that has exited. In fact, we're back to square one again. not ioctl(), not -fcntl(), not select(), not even read() gets an i/o error after the pty -process exits. But in NetBSD, we have to use nonblocking reads because ... -Hmmmm, maybe switch the fd between blocking and nonblocking for the test... -Nope, NetBSD seems to be hopeless (later, Ed Ravin confirmed that similar -problems have been observed with other applications that try to do this). - -Switching to Linux, I see that yesterday's Solaris code (blocking reads) -works exactly the same way on Linux. - -Tried today's O_NDELAY method on Solaris. It works perfectly. And then I -moved this one to Linux and it works perfectly there too. Except in both -cases we have the wierd thing with Zmodem at the end, but I think that's -because rz/sz don't use standard i/o. On NetBSD, it still hangs at the end. - -Turns out that testing the pid works in NetBSD, even though it didn't in -Solaris. Turns out read() gets an i/o error in Solaris and Linux but not -in NetBSD. So checking the read result first, and then checking the pid -if read() got zero bytes catches all three. 28 Dec 2006. - -Now the question of return code. In the original ttruncmd() function, we do -a fork() and a wait(). When the external protocol program finishes, wait() -gives us its return code and we can pass it on through \v(pexitstat) as well -ttruncmd's own return code. But ttptycmd() has to interact with the pty -continuously, so it can't just sit back and wait() for it. Instead we have -to detect when the process has exited and then call waitpid() on the fork -pid, before shutting down the pty. Tested on Solaris using Kermit as the -external protocol and then inducing failure, or letting it run to -completion. FAILURE and SUCCESS set appropriately in each case. Tested -with Zmodem too, works OK except for the aforementioned cosmetic glitch at -the end. Tested on NetBSD, all OK. - -To make K5 connection to Panix from Spam: - - set telnet debug on - authenticate K5 init /realm:PANIX.COM /password:xxxxx - set host shell.panix.com 23 /k5login - -Good... Now I try to send a file from Spam to Panix over the K5 connection -using Kermit itself as the external protocol. It fails. Inspection of the -debug log on the far side shows that the S-Packet was received correctly, -good! This means we are reading the clear-text S-Packet from the external -Kermit program, and that ttol() is encrypting appropriately. - -The remote Kermit sends the Ack and goes to read the next packet: ttinl() -calls myfillbuf() and: - - SVORPOSIX myfillbuf calling read() - SVORPOSIX myfillbuf=0 <-- read returns 0 - SVORPOSIX myfillbuf ttcarr=2 - SVORPOSIX myfillbuf errno=0 <-- and reports no error - HEXDUMP: mygetbuf read (-3 bytes) - mygetbuf errno=0 - ttinl myread failure, n=-3 - ttinl myread errno=0 - ttinl non-EINTR -3[closing] - -This happens because myfillbuf() deliberately returns -3 when read() gets 0 -bytes. I don't understand why this happens but the real problem is yet to -come. The local Kermit (the one that has made the secure connection and is -running the external protocol through ttptycmd()) eventually figures out -that the transfer failed and when we reconnect, we get total garbage -- the -encryption either stopped happening, or got out of sync. - -Looking at the local debug log, ttol() is doing its job, converting the -initial "kermit -r\13" from plaintext to cyphertext, as shown by the -hexdumps. Then it enters ttptycmd()... Hmmmm, wait, how can it send the -"kermit -r" before it starts the external protocol? Never mind, worry about -that later... Anyway, ttptycmd() says: - - ttptycmd loop top have_pty=1 - ttptycmd loop top have_net=1 - ttptycmd FD_SET ptyfd in - ttptycmd FD_SET ttyfd in - ttptycmd nfds=5 - ttptycmd select=1 - ttptycmd FD_ISSET ttyfd in - ... - ttptycmd in_chk(ttyfd) n=11 - ttptycmd ttxin n=11 - -ttxin() asks for 11 bytes, myfillbuf() gets 11 bytes, and hexdump() shows -the cyphertext, there doesn't seem to be any decrypting going on. Hmmm, it -looks like the regular code calls ttinc() in a loop, rather than ttxin(). -Maybe ttxin() doesn't have decryption hooks. No, that's not it, the code is -there, but the Kermit packet reader does not use ttxin(), it uses ttinl(). -But of course we can't use that for external protocols because it's designed -only to read Kermit packets. Substituting a loop of ttinc()s for the ttxin() -call fixes things (and stangely enough, it seems to be faster). And now we -have our first external protocol transfer over a secure connection (external -Kermit program, Linux over Kerberos 5 to NetBSD). Zmodem worked too for a -short file but "something happens" with longer ones. 29 Dec 2006. - -New makefile target for Linux with Kerberos 5, linux+krb5, that doesn't -include anything extra from SSL or other security methods (but apparently it -is still necessary to include -DOPENSSL_097 in order to get the right names -for the DES routines?). Ditto netbsd+krb5 for NetBSD, except in this case --DOPENSSL_097 is not necessary. makefile, 30 Dec 2006. - -Note to myself: On Panix: - - export LD_LIBRARY_PATH=/usr/local/kerblib - make netbsd+krb5 "K5LIB=-L/usr/local/kerblib" "K5INC=-I/usr/local/include" - -Can't telnet-k5 from newly built Kermit on NetBSD; partway through the -negotiations, just after "TELNET RCVD SB ENCRYPTION SUPPORT DES_CFB64 -DES_OFB64 IAC SE" it dumps core. The last two lines in debug.log after -this are: - - tn_sb[len]=5 - encrypt_support[cnt]=2 - -Rebuilding with -DOPENSSL_097 doesn't change anything. Ed Ravin said they -have two different Kerberos installations, Heimdahl and MIT; maybe some -mixup between the two explains the problem (Jeff concurs). The core dump -occurs in ck_crp: encrypt_support(): - - debug(F100,"XXX ep not NULL","",0); - type = ep->start ? (*ep->start)(DIR_ENCRYPT, 0) : 0; <-- Here - debug(F101,"XXX new type","",type); - -Anyway, I can log in with Kerberos 5 to Panix OK from Columbia (sesame) -using 8.0.201. So let's try to resurrect the Solaris version with everything: - - solaris9g+krb5+krb4+openssl+shadow+pam+zlib - -I hunted around to find where the current library and header file -directories were... Last time I tried this (March 2006) it bombed, not -finding libdes. Instead we have /opt/kerberos5125/lib/libdes425.a. Made a -new cu-specific target that includes this; now we get farther; it blows up -in ckcftp.c with tons of errors and warnings, which we can worry about -later. Building again with -DNOFTP, it gets to ckuath.c (the first security -module) and: - - ckuath.c:151:18: error: krb5.h: No such file or directory - ckuath.c:152:21: error: profile.h: No such file or directory - ckuath.c:153:21: error: com_err.h: No such file or directory - ckuath.c:176:28: error: kerberosIV/krb.h: No such file or directory - In file included from /opt/openssl-0.9.8d/include/openssl/des.h:101, - from ckuath.c:219: - -Found krb5.h in /opt/kerberos5125/include/krb5.h, added a -I for this -directory ... Now we get lots of warnings in ckuath.c, but it completes OK, -then we wind up bombing out in ck_crp.c; I don't know why -- there are all -the same warnings (related to argument passing to DES functions), but no -errors. I have no clue. - -Tried to resurrect the solaris2x+krb4 target; this required changing -lkrb -to -lkrb4 and -ldes to -ldes425. Lots of warnings in ckutio.c, ckcnet.c, -ckctel.c, then it bombs out in ckcftp.c because it can't find krb.h. I -found it, adjusted the -I flags, but now it bombs because krb.h itself -#includes , which of course it can't find because the -brackets mean it's looking in /usr/include/kerberosIV/, which, of course, -the sys folks have removed. Giving up on Solaris again. Later, Jeff said -"Solaris does not publicly export the krb5 libraries. You need to build -the MIT Kerberos libraries separately and link to them." 30 December 2006. - -Changed copyright date to 2007. ckcmai.c, 1 Jan 2007. - -With Ed Ravin's help, successfully built C-Kermit with Kerberos 5 and -OpenSSL (netbsd+krb5+openssl+zlib), but it does not make K5 connections; it -gets hung up in the Telnet negotiations. 3 Jan 2007. - -Downloaded MIT Kerberos 5 v1.4.4 to Solaris 9, 54MB worth. This is just so -I can build a Kerberized C-Kermit for testing ttyptycmd(). Ran the -configure program, got a few warnings but it didn't fail (should it?) Did -"make install", specifying a private directory but it failed immediately -with "cannot stat libkrb5support.so.0.0: No such file or directory". -OK, I tried. 3 Jan 2007. - -Made a new makefile target for Mac OS X, macosx10.4+krb5+ssl, ran it on Mac -OS X 10.4.8. It bombs out in ckcftp.c with: ckcftp.c:551: error: static -declaration of 'gss_mech_krb5' follows non-static declaration -/usr/include/gssapi/gssapi_krb5.h:76: error: previous declaration of -'gss_mech_krb5' was here". Ditto for gss_mech_krb5_old, gss_nt_krb5_name, -and gss_nt_krb5_principal. Tried again with -DNOFTP. We get lots of -warnings in the network modules, but they complete. But ck_ssl.c bombed -with a conflict between its own declarations of encrypt_output and -decrypt_input and the ones in ckuat2.h; removed the prototypes from the -latter (as Jeff advised) it built OK and it works OK too. Built with FTP -too, but with link-time warnings about the aformentioned gss_* symbols. -#ifdef'd them out (gss_mech_krb5, gss_mech_krb5_old, gss_mech_name, and -gss_mech_principal) for MACOSX, where these symbols are exported by the -library. Now it all compiles and links OK, and runs OK too. 3 Jan 2007. - -Spent a day hunting around for a version of Zmodem that would build and -execute on Mac OS X, finally found one. Now at last I could try a Zmodem -external-protocol transfer over a secure connection. But phooey, C-Kermit's -pty support didn't work on this box. Kermit finds master /dev/ptypa OK, -then in ptyint_void_association() tries to open /dev/tty but gets ERRNO=6 -"device not configured" (which is apparently OK, because the same thing -happens on other platforms where this works), then tries to open slave -/dev/ttypa and gets ERRNO=13 "permission denied" because, indeed, I don't -have r/w permission on the device. Left a message. 4 Jan 2007. - -Changed TRANSMIT /BINARY output buffer size from 252 to 508 to avoid -TCP fragmentation. Need to add a SET command for this later. -ckuus4.c, 5 Jan 2007. - -Found another Mac where the ptys weren't protected against me, make a K5 -connection and transferred a largish file with Zmodem with zero glitches, -except it was kind of slow, 84K cps. Well, we're doing single-character -reads on the net (ttinc()'s instead of ttxin()). Hmmm, but then I did it -again and got 2.2Mcps. Success was reported, but it actually didn't work; -it only sent the first quarter of the file.... Oh well, at least now we -have a testbed. 5 Jan 2007. - -Tried again, saw that the file is actually transferred instantly but then -we're not picking up the protocol at the end. Theory: after the transfer -finishes, we come back to the prompt on the remote host, which means we have -something to read from the net and write to the pty, but the pty has already -exited. AFTER THE PTY IS GONE, WE DO NOT WANT TO READ FROM THE NET ANY -MORE. Adding this test makes Kermit succeed right away when sending the -same largish file, with a transfer rate of 4M cps, that's better. But the -rz program on the far end is evidently not receiving the goodbye handshake -from the receiver, because it sits there foreever in its *B09002402009418 -mode until I ^X^X^X^X^X out of it, at which point it deletes the file it -already received, not very helpful. In the code, I read from the pty if the -pty is open and there is room in the buffer. This means that when we get to -the end, either there is no room in the buffer (unlikely) or the last bit -sent by sz before exiting was cut off when the fork closed. Why do we get -in this fix only with Zmodem and not with Kermit? - -In Mac OS X, after sz exits, we get ERRNO=5 if we try to write to the pty, -but we still get no errors after that if we try to read from it. Still, -prior to this we did more than 20 unproductive nonblocking reads from the -pty (no error, no bytes) without incident; there did not seem to be anything -waiting. In fact, the last thing we read from the pty were the text -messages that are issued at the end of the transfer: "rz 3.73 1-30-03 -finished." After which it pauses a second and spits out a message about -UNREGISTERED COPY. - -Figured out how to build lrzsz, in hopes that the previous problems were -with rzsz and crzsz's fiddling with file descriptors, but I get the same -behavior. Which is good, I guess, because if I can fix one, I fix them all. -Or not... Testing lrz by itself (not under C-Kermit), I see that it doesn't -work at all with Kermit's own Zmodem implementation. - -OK, here's one problem: at the end of the transfer, the Omen Zmodems print -stuff like "Please read the license agreement", Kermit dutifully reads this -from the pty and sends it to the host, the host shell says "Please: command -not found", issues its prompt again, which Kermit reads, feeds to the pty, -and apparently the pty echoes it, so we send it back to the host, and there -ensues an infinite loop of getty babble until the pty closes. Now, there -ought to be a way to make the external protocol shut up, like Kermit's --q(uiet) flag, but these are unregistered versions so you can't shut up the -messages. In fact, the transfer works, but the getty babble at the end -ruins the experience. Now I'm beginning to wonder how any of these programs -ever worked as external protocols. Hmmm, now that I try it, I see the -same thing happens the old way, when using ttruncmd() rather than ttptycmd(). - -Reading the crzsz documentation I see it says that messages come out on -stderr. OK, that's progress. In ckupty.c I try redirecting 2 to /dev/null. -Well good, this filters out the messages from csz, but we still get getty -babble on the prompt. In the debug log, we read the last bunch of stuff -from net, 618 bytes of Zmodem stuff... Now what happens? - -Zmodem on the remote exits, the host prints its prompt. Kermit, of course, -reads the prompt from the net, now come to the bottom of the loop and we -have 7 bytes to write to the pty, and no error condition, so we continue the -loop. select() says that the pty is ready for writing. We write the 7 -bytes and and get no error. Loop again, this time select() says the pty has -data waiting. Sure enough we get the prompt back, and send it to the net, -and thus begins the getty babble. There are two causes for this: - - 1. crzsz does not exit immediately; it sleeps for 10 seconds after - printing its nag message. - - 2. During this interval the pty seems to be echoing what is sent to it. - csz is not echoing; I checked. Anyway, removing the pause doesn't - seem to make a difference. - -ttptycmd() needs to: - - . TELL the pty module to redirect stderr to /dev/null - . SET PTY TO NOECHO (master or slave?) - -Tried setting the pty to noecho: - - termbuf.c_lflag &= ~(ECHO|ECHOE|ECHOK); - -and this seemed to stop the getty babble. After the file transfer, I read -back the prompt from the host shell, I write the prompt bytes to the pty; -there is no error. And now select() simply hangs forever (or times out if -a timeout is set). The question here is: why didn't writing to the pty -produce an error? And, because we never detect the pty has exited, we can't -set a good return code. 5 Jan 2007. - -Moved pty fork testing to a separate routine, pty_get_status(), and -added a call to it from the place where we time out, in case the fork -terminated; then we can get and return its status. 6 Jan 2007. - -Added calls to pty_get_status() to every place where we suspect a pty error, -tried again with lrzsz, crzsz, and regular rzsz. All three work, but in -each case waitpid() indicates that the sz program gave exit code 1 (failure). -ckutio.c, 7 Jan 2007. - -Changing the subject... On my test system, every time I execute ttptycmd(), -I get "permission denied" on /dev/ttyp3. Then I run it again and get to -ttyp4 which is OK. I wanted to skip past any pty for which I lack -permission and try the next without raising an error. Added debugging code: - - 16:25:23.524 pty_getpty() pty master open error[/dev/ptyp0]=5 - 16:25:23.524 pty_getpty() pty master open error[/dev/ptyp1]=5 - 16:25:23.524 pty_getpty() pty master open error[/dev/ptyp2]=5 - 16:25:23.524 pty_getpty() found pty master[/dev/ptyp3] - 16:25:23.524 pty_getpty() slavebuf [2][/dev/ttyp3] - -So it already was skipping past open errors; ttyp3 was opened successfully. -The problem is that ptyp3 is rw-rw-rw-, but the corresponding master, -ttyp3, is rw--r----. It seems the code assumes that if the master can be -opened, then so can the corresponding slave. Unfortunately, the code is -not structured to allow us to skip ahead to the next master if the slave -can't be opened. 7 Jan 2007. - -Spent a couple hours trying to rearrange the code in the pty module to skip -past inaccessible slaves but it was a rabbit hole, not worth it, backed off. -8 Jan 2008. - -Tried an upload over a secure connection using lsz. Unexpectedly, this time -it worked; not only was the file (about 0.5MB) transferred correctly, but -Kermit detected the fork's termination and got the pid's exit status, and, -for the first time, correctly reported a successful transfer. I have no -idea why this works today and not yesterday. More tests; it works most of -the time. It works with csz and with regular sz too. - -(days later...) - -ckucns.c seems to do the right thing; it recognize the ZSTART string, -activates the Zmodem-Receive APC, and returns. doconect() sees the APC and -begins to execute it. The RECEIVE command results in a call to the GET -command parser, doxget() (IS THAT RIGHT?), then comes a ttflui(), which -throws away a bunch of stuff. Finally we get to ttptycmd(), we get a pty -and run lrz in it, select() says stuff is waiting from the pty, but read -returns 0, errno 0. Skipping the ttflui() in doxget() if the protocol was -not Kermit didn't seem to make difference. ckuus6.c, 8 Jan 2007. - -The problem is that in this case, reads from the pty never get anything (no -data, no error), write always gets an error. It's as if the pty was not -being set up right, or we're using the wrong file descriptor. And if we -skip the autodownload? Same thing. - -OK, putting downloads aside for a moment, let's get uploads working as well -as possible. At this point we have the odd situation (at least in this -configuration) that the upload succeeds, but now for some reason we are -unable to read the exit status from the process, even though this was -working before, so ttptycmd() returns 0 (failure), yet Kermit reports -success. - -Well, it turns out that kill(pty_fork_pid,0) was gumming up the works. -If we use only waitpid() all is well, I think. waitpid() with WNOHANG -returns -1 with status -1 errno 0 if the pid has not exited, and it returns -the pid and status > -1 if the process has exited. Fixed pty_get_status() -to do it this way. ckutio.c, 7 Jan 2007. - -Let's move this from Mac OS to NetBSD and see how it works. Well, the file -transfer was just fine, but then I used some sexps to calculate the elapsed -time and transfer rate, and Kermit hung in dosexp(). Fine, ignoring that... -The debug log shows that ttptycmd() gets the pty OK, master and slave, the -i/o goes smoothly, and waitpid() does its job perfectly. Solaris, same -deal; ttruncmd() goes smoothly, but then the sexps afterward get "Arithmetic -exception". Turns out there was a BAD bug in dosexp() that allowed an -integer division by 0 to occur under certain circumstances; it's always been -there. Fixed in dosexp(): ckuus3.c, 8 Jan 2007. - -After noticing a few problems running the pop.ksc script in production over -the past year, rewrote \femailaddress() to be more reliable and a lot -simpler. ckuus4.c, 9 Jan 2007. - -Back to ttptycmd()... When we left off, we could send but not receive. Set -up a test case using Kermit as the external protocol for receiving a short -file. If I SET STREAMING OFF and use short packets, it actually does work, -so it's not a complete failure to function, but apparently a lack of flow -control for the pty. Began by completing the parameterization of the pty -module, so it can be called for interactive use (fc 0) or for running -protocols (1). Confirmed that everything works at least as well as before -(e.g. "set host /pty emacs" vs external protocols). ckcdeb.h, ckutio.c, -ckupty.c, 9 Jan 2007. - -Found in HP-UX "man 7 pty" a description of ioctl(fd,TIOCTTY,fc) which is -exactly what we want: fc 0 turns off all termio processing and guarantees an -ininterrupted, unmolested, flow-controlled stream of bytes in both -directions. This function also exists in Linux, but not in Solaris, NetBSD, -or Mac OS X (TIOCNOTTY is not what we want, it does something else entirely). - -Another possibility is TIOCREMOTE, which "causes input to the pseudoterminal -to be flow controlled and not input edited, regardless of the terminal -mode". This one exists in at least HPUX, NetBSD, Solaris, and Mac OS X. - -Solaris: builds OK, but at runtime we get ENOTTY ("Inappropriate ioctl for -device"). By the time this happens, it's hard to tell from the code whether -the fd we're using is for the master or the slave; TIOCREMOTE can be used -only on the master. Close inspection shows that I am indeed doing that; -ptyfd as seen by ttptycmd() is truly the master, i.e. the /dev/ptyXX device, -not the /dev/ttyXX device (the slave fd can't be seen at all, as it exists -only in a separate fork). OK, so now we know that TIOCREMOTE can't be used -on Solaris. - -NetBSD: Somehow, whether as a result of today's fiddling or the phase of the -moon, the code in pty_open_slave() that tries to open /dev/tty started -failing on NetBSD ("Device not configured"). Changing it to be run only if -fc == 0 (which doesn't seem to hurt anything), once again I get ENOTTY on -the TIOCREMOTE ioctl. Zmodem works but Kermit totally fails (the fork exits -immediately with an exit code of 0, even though it didn't do anything). - -Mac OS X: Exactly the same sequence and results as NetBSD. - -Linux: It did not execute the new ioctl at all; apparently the TIOC symbols -are hidden or not exported or something. - -Where we stand: - . Downloads don't work - . Uploads got slow again - . Kermit doesn't work at all as an external protocol - -Actually if I take the debugging out it goes fast, but it doesn't finish. - -All today's work on ttptycmd() looks like a dead end. To roll back to -yesterday: - - cp ckutio.c-20070108 ckutio.c - cp ckupty.c-20070108 ckupty.c - cp ckupty.h-20070108 ckupty.h - -or to continue with today's: - - cp ckutio.c-20070109 ckutio.c - cp ckupty.c-20070109 ckupty.c - cp ckupty.h-20070109 ckupty.h - -Comparing Monday's and Tuesday's pty-related code, the differences are: - 1. Passing of function code to and among pty modules. - 2. Skipping the TIOCSCTTY ioctl and the open("/dev/tty") test. - 3. Attempting to put pty in TIOCTTY or TIOCREMOTE mode. - -Commenting out 2 and 3 should put us back where we were on Monday if the -parameterization was done right. And with this, on Solaris, downloading -with Kermit external protocol works but slowly, 8K cps, with or without -debugging. Debug log does not show any obvious bottlenecks; select() takes -anywhere between no time at all and 0.1 seconds to return. If I increase -the pty-net buffer size from 1K to 4K, the rate goes up to 55K cps. If I -make it 8K I get 136K cps. With 16K I get 346K cps. 32K: 395K cps -- this -last one isn't worth the doubling. But at 24K I get 490K cps, sometimes -twice that. Let's stick with 24K for now. Downloading with Zmodem (rzsz) -works at the same rate, but now we're back to seeing the getty babble -(Several "**B0800000000022d") at the end. 10 Jan 2007. - -Moving to Mac OS X, everything works the same as on Solaris, except I don't -get the Zmodem getty babble there, not even with Omen rzsz. Tested sends -in both remote and local mode, the latter over a secure Kerberos 5 Telnet -connection, using C-Kermit, rzsz, lrzsz, and crzsz, all good. 10 Jan 2007. - -Now we're back where we were yesterday morning, but with better throughput. -The big issue then was receiving files. But yikes, now it works! Not only -that, I got a transfer rate of 2.1M cps. That's using Kermit protocol, -streaming, and big (4K) packets. Which didn't work before. Not a fluke -either, I uploaded bigger and bigger files up to 6MB, they all went -smoothly, at rates between 1 and 2 MBps. 10 Jan 2007. - -Not so great in Zmodem land, however. If I start the external-protocol -receiver on the far end, escape back and start a Zmodem send... nothing. -If I leave the remote C-Kermit at its prompt (where it supposed to recognize -the Zmodem start string), still nothing. On the other hand, if I do it -with a script instead of by hand: - - def xx output take blah\13, send /proto:zmodem \%1 - -it works, at least intermittently. But that's in remote mode. We won't be -using this in remote mode. In local mode, where we have a secure connection -to another computer, it seems we can read from the pty and write to the net, -but we time out waiting to read from the net; nothing arrives. Well, we -know that i/o works both ways, so there is some kind of screwup with the -Zmodem protocol start itself. Increasing the (still hardwired timeout) from -5 to 22sec and driving the whole process with a script so as to avoid -autodownload as well as manual dexterity effects... It just sits there -forever, way longer than 22 sec. ^C'ing out, I see that sz was indeed -started on the far end and the protocol was executing. But it looks like -the receiver (the one running under ttptycmd()) is getting trashed packets, -because (a) it seems to be sending the same thing over and over again, and -(b) sometimes it waits as long as 10 seconds before anything arrives from -the remote. Maybe I was too impatient; I interrupted it after 4 minutes but -it seems to have been making some progress. Whenever there was data -available to read from the net, it was always 65 bytes, and it was not -actually the same data over and over. This is using lrz as the external -protocol. crz gets a bit farther. In this case we read up to 24K at a -gulp, but the amount varies a lot. It looks like we took in about 1.2MB of -Zmodem protocol data, but were only able to output the first 20K of the -file. Clearly there were lots of errors. In the end, the crz exits with -status 1 (failure). - -Anyway it looks like we're back at needing to find a way to accomplish -something like TIOCREMOTE on the pty, which is where we came in. 10 Jan 2007. - -Without any way to make the pty transparent and flow controlled, it would -seem to make sense to write to the pty in smaller chunks than we do to the -net. I left the read-from-pty-write-to-net buffer at 24K and changed the -read-from-net-write-to-pty buffer to 48 bytes. - -Upload using lsz worked but took about 3 minutes. Actually it didn't work. -On the local end it seemed to work, but the file did not appear on the -remote end. Tried this several times, each time with different results, -adding more debugging each time. The problem this time was that the pty -read could get EWOULDBLOCK. Changed the code to not treat this as an error, -now Zmodem uploads are solid again except I never got EWOULDBLOCK again -either, even though I repeated the same upload about 1000 times (with -throughput of over 2MBps even with debugging on), so the test for it has -not been exercised. - -OK, uploads still work. Back to downloading... The very first pty read -gets 0 bytes, followed by the fork test that shows that it exited with -exit status 2. - -Next we try starting sz with some different options on the far end: - - -q: quiet (no messages): - for some reason this gets totally stuck. - it looks as if this option is misdocumented; - sz seems to be sending the letter C (as in Xmodem 1K or whatever) - - -e: escape (all control chars): - first attempt to read pty finds the process gone with exit status 2. - - -k: send 1k blocks: - this one didn't stop immediately. It reads 48 bytes from net, writes - 48 to the pty with no error. Then reads 21 bytes from the pty, writes - them to the net OK. Then reads 48 bytes from net, writes them to pty OK, - reads 21 from pty, writes to net OK, etc etc... It appears to have - worked but (final read from pty returned 0, fork test showed lrz exited - with status 0), but only 754 bytes were received from the net when the - file is 420K... - -Well this only goes to show that the faster we shove stuff into the pty, the -worse it gets. Zmodem downloads won't work unless we can make the pty -transparent and flow-controlled. So to summarize today's developments: - - . separated in/out buffer sizes - . handled EWOULDBLOCK - . found out that sz options don't help much - -11 Jan 2007. - -Next day. This has got to be the most delicate code ever, it's like -Whack-A-Mole, fix A and B pops up. Even without touching it, something that -worked perfectly a 2:00 doesn't work at all an hour later. Maybe I could -have used pipes instead of ptys, but pipes have problems of their own. -There has to be a way to do this. The telnet server, the SSH server, etc -- -they all run on ptys, and we can upload files to them with Kermit. Why? -Because Kermit puts its terminal into all the right modes using the -time-honored methods of ttpkt() and ttvt(). Perhaps all we need is a copy -of ttpkt() that operates on the pty. - -On that theory, let's go back to Kermit as the external protocol. -It's important to suppress all messages and displays. With that, -uploads work fine, no hitches. - -Downloads: We fail right away. The debug log shows the Kermit program that -we are starting in the pty says: - - "" - Invalid command-line option, type "kermit -h" for help. - -But of course we are not giving it an invalid command-line option. -Switching to gkermit for the external protocol, now we see that no matter -command-line options we use, we read 0d 0d 0a from the pty and then the -next time we go to read from the pty we get 0 bytes and waitpid() says the -program has exited with status 1. - -Why should downloading be different from uploading? ttptycmd has no idea, -it does everything the same. The only difference would seem to be which -side sends first, but even that tends to get washed out by each program's -startup messages. - -Downloading with Kermit worked 2 days ago, what's different now? The buffer -sizes. Putting the net-to-pty back up to 24K (from 48 bytes)... Now it -works again. - -Conclusion: Kermit conditions the pty correctly, Zmodem does not. Therefore -ttruncmd() must duplicate what ttpkt() does. - -Or not. Because rz works fine on ssh/telnet ptys too. But not on our pty. -lrz exits immediately with status code 2 = 01000 but there are no clues in -the lrz.c source code, I don't even see this exit status set anywhere. -Unredirecting stderr, I see that the error is "lrz: garbage on command line". - -Why do both Kermit and Zmodem sometimes think they are receiving an invalid -command line? If I could capture the garbage... - -Side trip #1: ("pty.log",O_WRONLY) gives "no such file or directory". -Changed this to ("pty.log",O_CREAT,0644) and now it doesn't get an error, -and it creates the file, but not with 0644 permissions, and with nothing -written in it. How come nothing works? - -Fine, the debug log shows that ttptycmd() receives the correct string -(e.g. "lrz -v"). It passes it to do_pty() correctly, and do_pty() passes it -to exec_cmd(), which runs cksplit() on it, coming up (in this case) with -"lrz" and "-v", which is right, and then: - - args = q->a_head + 1; - execvp(args[0],args); - -execvp() wants the args array to have a null element at the end. cksplit() -does indeed do that, or at least the code is there. Added code to exec_cmd() -to verify the argument list and that it is null-terminated. So far it is. - -Anyway, we have traffic between the Zmodem partners, but no joy. -Commenting out the bit that redirects stderr, now I can see it on my screen -in real time: - - lrz waiting to receive.Retry 0: Bad CRC - Retry 0: Got ERROR - Retry 0: TIMEOUT - Retry 0: TIMEOUT - Retry 0: TIMEOUT - Retry 0: TIMEOUT - -etc etc, forever. Trying sz -e on the far end, I get: - - Retry 0: Bad CRC - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - ... - Retry 0: Got ERROR - Retry 0: Bad CRC - Retry 0: Got ERROR - Retry 0: Got ERROR - lrz: xxufio.c removed. - -So apparently it's not a matter of escaping. Trying some other stuff, I -caught the command-line problem in the act: - - lrz: garbage on commandline - Try `lrz --help' for more information. - -Debug log shows: - - cksplit result[lrz]=1 - cksplit result[-v]=2 - exec_cmd arg[lrz]=0 - exec_cmd arg[-v]=1 - exec_cmd arg[]=2 - -An empty string at the end instead of a null pointer. I really do not see -any way that could happen, but rather than dig into cksplit() again after -all these years I added a test for this in exec_cmd(), which, of course -after adding it, never encountered this behavior again. - -Fiddled with pty buffer size again. Made it 512 bytes instead of 24K. -Zmodem downloads are the same (Rety 0: TIMEOUT, over and over). But I don't -see what the problem is -- every time we receive n bytes from the net, we -write n bytes successfully to the pty and there are no errors. But it also -looks like the remote sender is sending the file header over and over -because it's not receiving an acknowledgment. If we're not losing data, -then maybe it's a transparency problem. - -Tried uncommenting the TIOCblah stuff I commented out before. Now instead -of only timeouts I get: - - lrz waiting to receive.Retry 0: Bad CRC - Retry 0: Got ERROR - Retry 0: Bad CRC - Retry 0: Got ERROR - Retry 0: Bad CRC - Retry 0: Got ERROR - Retry 0: TIMEOUT - -which is odd because the TIOCREMOTE ioctl failed with errno 14, EFAULT, -bad address, which should indicate it had no effect. We're still receiving -data from the remote in tiny chunks (from 12 to 65 bytes), apparently the -same stuff (file header), and writing them to the pty successfully but -nothing... - -Looked at cloning ttpkt() for the pty, but these stupid routines use global -tty mode structs so it's not going to be easy. - -Well, we got exactly nowhere today, but I think I'll leave stderr as it is -so users will see some feedback; no reason not to. - -WHY DO KERMIT DOWNLOADS WORK AND ZMODEM NOT? - -Is it 8-bit transparency? Up til now I've been testing with text files. -If I try to download a binary what happens? Fails after 99 seconds. Packet -log from the far end shows that as soon as the first packet containing 8-bit -data is sent, everything stops. At least I got one of these: - - 17:23:56.475 exec_cmd arg[gkermit]=0 - 17:23:56.475 exec_cmd arg[-qr]=1 - 17:23:56.475 exec_cmd arg[]=2 - 17:23:56.475 exec_cmd SUBSTITUTING NULL=2 <-- the code I just added - -Doing this again shows the same thing on the near end. All the 7-bit-only -packets are sent and acknowledged OK. Three 8-bit data packets arrive and -nothing else happens after that. This is with G-Kermit. - -The same thing happens with C-Kermit receiving. But if I change C-Kermit's -.kermrc to turn off streaming and use a short packet length: - -The transfer works, even though it's sending 8-bit bytes. So the problem is -not 8-bit data after all, per se. Facts: - - . Kermit can receive streaming transfers of 7-bit files. - . Kermit can not receive streaming transfers of 8-bit files. - . Kermit can receive nonstreaming transfers of 8-bit files with short packets. - . Kermit can receive nonstreaming transfers of 8-bit files with 1K packets. - . Kermit can receive nonstreaming transfers of 8-bit files with 4K packets. - -So it's the combination of streaming and 8-bit data? 12 Jan 2007. - -As a test I made a new routine pty_make_raw() that does cfmakeraw() (a -nonportable "POSIX-like" function known to be used on ptys in applications -that do approximately what we're attempting). Results: - - Solaris: errno 25 - inappropriate ioctl for device. - -This happens even when we try to get the terminal modes with tcgetattr(), -which is completely nuts. We pass it the file descriptor of the pty master, -which is supposed to work. But in Mac OS X, there are no errors. But -downloads still don't work; lots of errors but the pattern is different. -Using a very small buffer: - - Retry 0: Bad CRC - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Got TIMEOUT - Retry 0: TIMEOUT - Retry 0: Bad CRC - Retry 0: Bad CRC - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: TIMEOUT - Retry 0: Got ERROR - Retry 0: TIMEOUT - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Bad CRC - -Using a bigger buffer: - - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - (several screensful) - -Various other combinations... Nothing seems to work. - -Insight: telnetd does exactly what we want to do, sort of. -But it uses TIOCPKT, so every time it reads from pty, it receives -one control byte and then the data bytes, which would complicate our -buffering scheme considerably. Anyway the TIOCPKT ioctl() fails on -Mac OS X with 14 "Bad address". - -Also see: snoopserver.c (found in Google). It seems to do things in a -slightly different way -- it sets stdout to raw and then dups it to the -slave side of the pty? - -Maybe it's a mistake to use the ckupty.c routines. They are designed for -creating and accessing an interactive session. Maybe just copy one of the -other programs. - -18 Jan 2007. Tried going back to blocking rather than nonblocking reads -to see if it would make a difference, after all the other changes. Nope. -OK, let's look at some of these other programs... - -snoopserver.c. I don't know exactly what this is or where it's from or what -platform it runs on and there are no comments to speak of, but it does -approximately what ttptycmd() does. To get a pty it uses openpty(): - - if (openpty(&pty, &tty, NULL, NULL, NULL) == -1) - -then creates a fork. In the fork, it closes the pty (master) and -manipulates the modes of the tty (slave), dups tty to be stdio, and then -doex execv() on the command. Meanwhile the upper fork closes the tty -(slave), gets the attributes of stdin, using atexit() to have them -automatically restored on exit. Then it sets stdin to raw mode and enters -the select() loop on stdin, the pty master, and the net. It uses regular -blocking reads. It does not use TIOCPKT or anything like it. - -openpty() is supported on: Linux, Mac OS X, NetBSD, FreeBSD, ... -openpty() is NOT supported on: Solaris, HP-UX, ... - - 1. Try copying the pty code, but keep everything else the same. - -I did this; it compiles and starts OK, upper fork (ttptycmd) debug log shows -no errors, but nothing happens. Logs show that the Kermit program that is -started in the subfork seems to die as soon as it reaches eof on its init -file. The good news, at least, is that select() doesn't report report that -the pty is ready to be read. Clearly the file descriptors aren't being -assigned as expected, or as before. - -In ckupty.c getptyslave() dup2's the slave fd to 0 and 1. The new code -does exactly the same thing. Debug log makes it look like the forked kermit -is not receiving its command line. But now I'm not even sure that the -forked kermit started at all. ps from another terminal doesn't show it. - -19 Jan 2007: Noticed that in snoopserver, the select() calls use standard -input and output file descriptors, rather than the pty master. Made that -change... In doing that I had to look at every file descriptor in every -line of code and discovered a couple mistakes, fixed them, put back the -original code but with the fixes, tried it, but no change; can upload OK but -still can't download with Zmodem without lots of errors and ultimate -failure. Going back to the alternative version and trying to get the the -file descriptors sorted out, now it appears that the external Kermit program -never even starts in the lower fork. After a bit more fiddling I sort that -out, but now when the lower Kermit program goes to open "/dev/tty" it gets -errno 6 "Device not configured". Forcing it to use stdio with "-l 0", it -gets past this and actually sends its first packet. But the Kermit on top -reads nothing from the pty. - -Next, I change the pty fd from STDIN_FILENO and STDOUT_FILENO to slavefd. -No difference. Next I comment out the dup2() calls. This time I get some -action. The transfer starts, but only one packet comes. Log shows that -the lower Kermit sends its S packet. The upper Kermit receives the ACK -but the lower Kermit never gets it. The write to the pty succeeds, no -error. Different combinations give different results. If write to master -and read from the slave, I get packets in both directions but tons of -errors.... This happens only if I comment out the dup2()'s. - -25 Jan 2007: After leaving it sit for a while, and realizing that what I'm -trying to do has to be possible because so much other software does the same -thing (e.g. Telnet servers), I put things back to how they were originally --- the upper fork (Kermit) uses the master and the lower fork the slave. -The upper fork puts the master in raw mode, the lower fork puts the slave in -raw mode. The lower fork dup2's the slave fd to stdin/out. Send file in -remote mode using external Kermit: works OK but select() times out at the -end. This means that the self-contained pty code in ttptycmd() is sorted -out -- all the file descriptors go to the right place, etc, and now we can -use this routine as a testbed, rather than the original ckupty.c-based one. - -But send with lsz, csz, and regular rz: Nothing happens, times out after 0 -bytes of i/o. Once again, Kermit works, Zmodem doesn't. The reason for -running Zmodem in a pty is so its i/o will work as it does on a terminal, -no matter how it may fiddle the file descriptors. So why don't we see a -single byte come out? - -Commenting out pty_make_raw(), I get a successful Zmodem send using lsz. -csz manages to get the filename across, but then gets stuck. regular sz, on -the other hand, works perfectly. Testing csz by itself (not under Kermit), -I see it fails in exactly the same way ("Got phony ZEOF", etc). OK, forget -crzsz. - -OK, let's move to local mode over a Kerberized Telnet connection... -Uploading (sending) with external Kermit protocol... works. -Downloading (receiving) with external Kermit protocol... works. -Uploading with sz... works. -Downloading with lrz... Gets tons of errors and fails. - -Running pty_make_raw() on the slave but not on the master: no difference. -Running pty_make_raw() on the master but not on the slave: no difference. - -Back where we started... Either: - - . Zmodem is overdriving the pty, no matter what modes we put it in. - . It's a transparency problem. - -Theoretically we should be able to test these by using different sz switches: - -q: quiet (should always use this) - -e: escape all control characters - -B n: Buffer n bytes (rather than whole file) - -L n: Packet length - -l n: Frame length (>= packet length) - -w n: Window size - -4: 4K blocksize (doesn't help) - --q by itself doesn't help. --q -e, this one worked but still got about 100 errors and was very slow. --q -e -l 200 -L 100, failed fast and bad. --q -e -w 1. Failed quickly. --q -e -w 1 -B 100. Eventually failed. --q -w 1, Eventually failed. --q -l 1024, this gets much more errors, definitely need -e. --q -e -l 1024, got pretty far before failing. --q -e -w 1 -l 1024, also got pretty far before failing. --q -e, this one got farthest of all, about 48K, before getting errors. - -In the latter combinations that work somewhat better, we always get up to -16K, or 32K, or 48K, before the errors start coming out and piling up. -Sometimes the errors are recoverable and we receive as much as 300K -successfully before giving up. - -Now that we have data flowing pretty well (but not well enough), tried -reinstating pty_make_raw(), but it hurt more than helped. - -As a sanity check, I tried transferring from the same host over the same -kind of connection (Kerberized Telnet) directly to K95's built-in Zmodem -protocol, and that worked fine. So the problem is definitely in the pty. -Or more precisely, where Kermit writes incoming net data to the pty master. - -26 Jan 2007: Tried changing the size of the net-to-pty buffer from 24K to -1K. Result: total failure. Set both buffers to 1K. Still total failure. -Set both to 4K: now we get about 45K of data, then failure. Put them both -back to 24K, still fails totally -- the same code that worked pretty well -yesterday. Actually, no downloads work, not even Kermit, not even of -text files. - -27 Jan 2007: Since I have not been able to find a way to make ptys work for -this, I made a third copy of this routine, this time using pipes instead of -ptys. The disadvantage here is that if the external protocol does not use -stdio, the pipes won't work, but one thing a time... - -Inferior Kermit starts in lower fork, but when it tries to send its first -packet it gets errno=9 EBADF, Bad File Descriptor. Substituting G-Kermit as -the external protocol, which is simpler, reveals that the problem is that -the external protocol gets errors when it tries to manipulate the its stdio -file descriptors with ioctls, etc; these are not valid for a pipe. The pipe -mechanism itself works. If I take out the test for ttpkt() failing in -gkermit, the file transfer works OK. Trying Zmodem... Sending works OK; -receiving works a lot better than with ptys (it got 360K into the file -before failing). Making the buffers smaller, doesn't help. - -I'm starting to wonder if the problem might be in my buffering code, rather -than in the pty or pipe interface... Try making a version that does -single-character reads and writes. - -This one reads the first packet from the lower Kermit and sends it. It is -recognized by the other Kermit, which sends an ACK. We see the ^A of the -ACK, but then select() times out on the next character -- OF COURSE: because -at a lower level, it has already been read. We have to check the myread -buffer, and then call select() only if it's empty. Making this change: - - . SEND with G-Kermit works (but very slowly). - . SEND with lsz works but gets a lot of errors, eventually succeeds. - -Let's work our way back... With the same changes to the buffered pipe version: - - . SEND with G-Kermit/streaming works (fast). - . SEND with lsz works too (fast), but we get gubbish at the end. - . RECEIVE with Kermit fails because "/dev/tty is not a terminal device". - . RECEIVE with rsz... lots of errors ("garbage count exceeded") but succeeded. - -But maybe now we're seeing pipe artifacts, so going back one more step to -the version that gets its own pty and starts its own fork: - - . SEND with G-Kermit/Streaming works (fast) but select() times out at the end. - -Another breakthrough: Moved the write pieces to below the read pieces. This -is what was preventing the buffer reset code from working -- with the writes -done before the reads, we never catch up and can never reset the buffers. - - . SEND with G-Kermit/streaming works (fast) (but there's a pause at the end) - . SEND with lsz works (fast) (but there's a pause at the end) - . RECEIVE with rsz... lots of errors ("garbage count exceeded") and fails. - . RECEIVE with Kermit -- nothing happens (it thinks it succeeded), then we - reconnect, terminal sees S packet and goes into autodownload - -From the log it looks like ttpkt() fails in the lower Kermit. Switching -this with the hacked G-Kermit... it gets "transmission error on reliable -link". Tried again with real Kermit below, this time with "-l 0" and not -streaming. This was actually working, but slowly, I don't see any NAKs in -the packet log, but then select() timed out. - -28 Jan 2007: Restored both the calls to pty_make_raw(): - - . SEND with C-Kermit streaming works, but slow (54Kcps) - . Ditto, but with debugging off -- hangs forever. - . Ditto, but using G-Kermit instead of C-Kermit -- also hangs forever. - -Backed off on calling pty_make_raw(). Same thing. -Reduced size of net-to-pty buffer. Same thing. - -15 Feb 2007... Decided to give up on this and publish it as is, in hopes -that somebody with more experience with ptys can make it work, because I'm -just going in circles. So today I just have to get the code into shape so -people could choose among the three alternative routines. The second one, -yttyptycmd(), is the one that uses openpty(), which is not portable, so it -can be enabled only for Mac OS X, NetBSD, FreeBSD, and Linux, or by also -defining HAVE_OPENTPY at compile time. Anyway, if you build Kermit in the -normal way, you get the regular behavior -- ttruncmd() is used to execute -external protocols. If you build it with -DXTTPTYCMD, you get the first -version of ttptycmd(); with -DYTTPTYCMD the second, and with -DZTTPTYCMD the -third. - -(Then some interruptions, then...) - -From Jeff, fix hostname comparison in X.509 certificate checking to work -right in the case of names that contain no periods. dNSName_cmp(): cl_ssl.c, -21 Feb 2007. - -John Dunlap noticed some strange behavior when transferring files between -home base and the EM-APEX oceanographic floats via satellite... long story, -but every so often the transfer would get stuck for a long time, and it -happened only when C-Kermit was sending a file and received two or more -packets (Ack or Nak) back to back from the float. Years ago I added some -lookahead code to ttinl() to clear the input buffer of any interpacket junk -so that, in the windowing case, we wouldn't be tricked next time around into -thinking a packet was waiting to be read when there wasn't. The code, which -has been there for a while, was a bit fractured; luckily, it would be -executed only when the debug log was active so it didn't have much effect. -The problem was that if the SOP came immediately after the EOP, it could be -missed because the loop read the next character before checking the current -one. Fixed by rearranging the loop. Also I changed it so it would execute -in all cases, not only when the debug log was active. Also, cleaned up a -bunch of confusing #ifdefs and removed some chunks that had been commented -out for years, decades maybe. ttinl(): ckutio.c, 21-22 Feb 2007. - -Added NOW keyword info to HELP DATE, plus a tip about how to convert to UTC; -suggested by Arthur Marsh. ckuus2.c, 22 Feb 2007. - -When an FTP client sends NLST to the server and no matching files are found, -the server is supposed to respond with an error message on the control -channel and nothing on the data channel. However it seems that at least one -server sends the error message back on the data channel, as if it were a -filename ("/bin/ls: blah: No such file or directory"), and on the control -channel there is no error indication ("226 ASCII Transfer complete"). At -this point remote_files() has a listfile and, if a match pattern was given, -it looks through list to see if any of the lines match the given filename, -e.g. "blah". This makes FTP CHECK give false positives. The problem -(diagnosed by Jeff) is that the match pattern was not given in this case, so -it takes some random default action, resulting in the spurious success -return. Fixed by using the user's string as the pattern. Not tested, -however, since I don't have access to a server that behaves this way. -ckcftp.c, 22 Feb 2007. - -If an external-protocol file transfer fails, don't print Kermit-specific -hints. ckuus5.c, 22 Feb 2007. - -One more time with ttinl(). Got rid of the "csave" junk, which never could -have worked (which is no doubt why it was in a debugging section). The -problem was that saving the beginning of the next packet locally did not -synchronize with the buffer clearing (ttflui()) done at a higher level, -between calls to ttinl(). So now, the lookahead code, if it finds the -beginning an as-yet unread packet, puts it back at the head of the input -queue. This way, if the protocol engine clears the input buffer, it will -get the whole packet, not just the part after the SOH. ckutio.c, 24 Feb 2007. - -From Steven M Schweda, Saint Paul, MN: adaptation of large file support to -VMS (it was already possible to transfer large files in VMS C-Kermit but the -file-transfer display and statistics were wrong). And a minimal adaptation -of the FTP client to VMS -- no RMS, no special VMS file stuff, Stream_LF and -binary files only, developed and tested only with UCX. SSL/TLS is -supported. The source-code changes are minimal; most have nothing to do -with VMS, but with header files, prototypes, and data types (e.g. ftp_port -int rather than short, various signed/unsigned conflicts) to shut up -compiler warnings. Some of these could be dangerous in terms of -portability; I've marked them with /* SMS 2007/02/15 */. ckcfns.c, -ckcnet.h, ck_ssl.h, ckuus3.c, ckuus4.c, ckvfio.c, ckcftp.c, ckvker.mms -(which was rewritten to actually reflect the source module dependencies), -ckvker.com (also heavily modified). ckvker.com (the "makefile" for VMS -C-Kermit) now indludes "F" and "I" option flags for the large File and -Internal ftp features, plus better handling of Vax/Alpha/IA64 distinction. -26 Feb 2007. - -Changed NetBSD targets to include -DHAVE_OPENPTY and -lutil, so they -can use openpty(). makefile, 26 Feb 2007. - -Built on Solaris without and with SSL OK. -Built on NetBSD with Kerberos 5, OK. -Built on Mac OS X 10.4, regular version, OK. -Built on Mac OS X 10.4 with SSL and Kerberos 5, OK. - -On VMS 7.2-1/Alpha with MultiNet 4.4A-X... - -'CC' 'CCOPT' KSP:ckuus3 -%DCL-W-TKNOVF, command element is too long - shorten - \CKUUS4.OBJ "'CC' 'CCOPT' KSP:ckuus4" "KSP:ckuus4.c KSP:ckcsym.h KSP:ckcdeb.h - KSP:ckclib.h" "KSP:ckcasc.h KSP:ckcker.h KSP:ckcnet.h KSP:ckvioc.h" -"KSP:ckctel.h KSP:ckuusr.h KSP:ckucmd.h KSP:ckuver.h" "KSP:ckcxla.h - KSP:ckuxla.h KSP:ckcuni.h KSP:ckuath.h" - -The new rule for ckuus4.c was too long. I removed one file from the -dependency list (ckcxla.h, which will probably never change again) and that -made it OK. Built Nonet and Net versions OK, but this is without the new -stuff. - -"make f" (large-file support) on VMS 7.2-1... -'CC' 'CCOPT' KSP:ckuus4 - if (CKFSEEK(fp,(CK_OFF_T)j,SEEK_CUR) != 0) { -........................^ -%CC-I-IMPLICITFUNC, In this statement, the identifier "fseeko" is implicitly -declared as a function. - -Ditto for ftello and fseeko in various other places, and then fseeko and -ftello come up up undefined at link time. - -The rule for ckcftp in "make i" (Internal FTP support) had the same problem. -I removed ckcxla.h from its dependency list too, but "utime" comes up -undeclared at compile time and undefined at link time. - -Verdict: neither one of the two new features can be used in VMS 7.2 or -earlier, but the code still builds OK if you don't ask for them. - -VMS 8.3 on IA64... Can't build anything: -%MMS-F-BADTARG, Specified target (WERMIT) does not exist in description file - -27 Feb 2007: Changed CKVKER.COM to keep all its dependencies but use a -shorter logical name (Steven M Schweda). The problem on VMS 8.3 is that MMS -now supports case-sensitive file systems, and so it can't find anything. -Workaround: bypass MMS (include "m" in P1). With this, "@ckvker.com ifm" -builds OK on HP Testdrive, but I can't test the new features since outbound -connections are not allowed there. As for fseeko(), ftello(), and utime(), -they simply are not availble prior to VMS 7.3. It would probably be a good -idea to test for this in CKVKER.COM, but actually it is possible to install -newer C's and CRTLs on older VMS versions, so don't stand in their way. - -28 Feb 2007: With additional chages from SMS, and then some further -adjustments, I was able to build the FTP version on VMS 7.2-1. First I -tested it with GET of a binary file, but it transferred it in text mode. -After a few more attempts with PUT and GET, it crashed with "floating/decimal -divide by zero" in ckscreen, ckuusx.c line 27859. Of course, that's the -listing line, not the source line, and I don't have a listing. - -To get a listing, I deleted CKUUSX.OBJ and then did: - - $ make i "" "" "/LIST" - -Surprisingly, it recompiled everything. - -Anyway, the divide by zero happened in a section of code where the divisor -was not checked, but it was a section of code we should not have been -executing at all, since the file-transfer display was fullscreen, and this -was in the "brief" section. Anyway, I added the needed check. Again, it -recompiles everything. Maybe there's no MMS on grumpy -- right, there isn't. - -ANYWAY... Try to GET a binary file like this: - - binary - ---> TYPE I - 200 Type set to I. - get gkermit - ---> TYPE A - 200 Type set to A. - ---> SIZE gkermit - 550 gkermit: file too large for SIZE. - GET gkermit (text) (-1 bytes)---> TYPE A - -Anyway... "get /binary gkermit" downloads it, seemingly correctly (the byte -count is right). - -But "put /binary gkermit.;1" results in a 0-length GKERMIT file being sent. -Here's the debug log: - -FTP PUT gnfile[DISK$MSA4:[C.FDC.NET]gkermit.;1]=1 -ftp putfile flg[DISK$MSA4:[C.FDC.NET]gkermit.;1]=0 -zltor fncnv[DISK$MSA4:[C.FDC.NET]gkermit.;1]=-1 -FTP PUT nzltor[GKERMIT] -zfnqfp 1[DISK$MSA4:[C.FDC.NET]gkermit.;1]=675 -zfnqfp 2[DISK$MSA4:[C.FDC.NET]GKERMIT.;1]=31 -zfnqfp 3[DISK$MSA4:[C.FDC.NET]GKERMIT.;1]=31 -zrelnam result 2[gkermit.;1] -ftp sendrequest restart[DISK$MSA4:[C.FDC.NET]gkermit.;1]=0 -openi name[DISK$MSA4:[C.FDC.NET]gkermit.;1] -openi sndsrc=-1 -openi file number=2 -zopeni[DISK$MSA4:[C.FDC.NET]gkermit.;1]=2 -zopeni fp=0 -chkfn=2 -chkfn return=0 -zopeni fixed file format - using blk I/O -zopeni binary flag at open=1 -zopeni ifile_bmode=1 -zopeni binary=1 -zopeni RMS operations completed ok -openi zopeni 1[DISK$MSA4:[C.FDC.NET]gkermit.;1]=1 -ftpcmd cmd[PASV] -FTP SENT [PASV] -FTP RCVD [227 Entering Passive Mode (166,84,1,2,233,216)] -initconn connect ok -FTP SENT [STOR GKERMIT] -FTP RCVD [150 Opening BINARY mode data connection for 'GKERMIT'.] -doftpsend2 ftpcode[STOR]=150 - - Here is where the file is supposed to be read and sent but there is nothing - in the log between the "doftpsend2 ftpcode" line and the following line. - -rftimer status=1 -gftimer status 1=1 -gftimer status 2=1409025 -gftimer status 3=1409025 -gftimer s[0.000000] -zclose n=2 -chkfn=2 -chkfn return=1 -zclose ZIFILE RMS operations completed ok -ftp getreply lcs=0 -ftp getreply rcs=-1 -ftp getreply fc=0 -FTP RCVD [226 Transfer complete.] -ftp getreply[226 Transfer complete.]=2 -doftpsend2 ok=0 - -Everything is OK up until we go to send the file, then it behaves as if we -got EOF immediately and so closes the data connection, and reports success; -an empty copy of the file is left on the far end. - -Starting over with a text file.... PUT LOGIN.COM gets another divide by -zero. But it happened in the code I just fixed, which is impossible. Swell. -I recompiled everything and this time the upload worked, and downloading it -again worked too. - -But a binary file still can't be uploaded. Trying to upload a text file -after doing this seems to succeed (reports the right number of bytes sent) -but nothing appears on the far side. - -SUMMARY: - - To download a text file: GET /ASCII blah.txt (/ASCII is optional) - To download a binary file: GET /BINARY blah.bin (/BINARY is required) - To upload a text file: PUT blah.txt (/ASCII switch not needed) - To upload a binary file: PUT /BINARY blah.bin (doesn't work) - -Problems: - . Why doesn't BINARY "stick"? - . Why don't binary uploads work? - -The culprit seems to be the VMS version of zxin(). In the FTP module, -zxin() is called only when sending binary files. In VMS, zxin() is just -a front end for C-Library fread(). It probably needs to do just do -zminchar() in a loop, like binary mode does, but calling zzout instead -of xxout. Or something like that. FINISH THIS TOMORROW (debug on grumpy). - -2 Mar 2007: New logs from John Dunlap. - -ema-1636-log-0175.dbg: C-Kermit uploads a short file. It receives an Ack for -the Z packet it just sent, tailgated by the beginning of a Nak for the next -packet. When the second SOH is encountered, it is put back in the myread -queue. Then the protocol engine, to which we return the Ack, says, "I have -the packet I wanted so I'm clearing the buffer", and away go the first two -bytes of the Nak from the myread buffer. Then, having just received the Ack -of our Z packet, we send our B, and go to read the reply. in_chk finds 0 in -the myread buffer (which we just cleared) and 6 waiting to be read from the -comms channel, which it does, obtaining the remaining 6 bytes of the Nak, -which it properly discards. (The reason this is proper is that, having -already received the Ack for the last packet it sent, no Ack or Nak that -arrives subsequently -- in the non-windowing case -- could possibly affect -what it does next.) Since it hasn't yet found a good packet, it keeps -reading, and now it finds the Ack to the B, as soon as it showed up. This -is how it's supposed to work. No time was lost because of anything that -C-Kermit did. - -ema-1636-log-0174.dbg: C-Kermit uploads a short file. It sends Data packet -#3 and receives the Ack followed immediately by the first 3 bytes of a Nak -for packet 4. When it gets to the SOH of the second packet, it pushes it -back in the queue. Again, input() flushes the input buffer (myread queue -and device buffer). C-Kermit detects EOF on the file it is sending, and -sends the Z packet. Then it reads the remaining bytes of the Nak, -which it discards, and then it finds the Ack for Z which comes in 23 seconds -later, sends the B, gets a Nak for the B, sends the B again, gets the Ack -for the B 4 seconds later, and done. Again, it's working right and losing -no time. - -The question remains: what would happen if the protocol engine did not clear -the buffer? Would ttinl() retrieve all packets in sequence even when they -come back to back? To test this, I had C-Kermit send a file using 30 window -slots and observed the stream of Acks in the reverse direction: - - HEXDUMP: mygetbuf read (16 bytes) - 01 25 23 59 2f 52 39 0d | 01 25 24 59 2b 26 31 0d .%#Y/R9. .%$Y+&1. - ttinl lookahead my_count=9 - ttinl lookahead removed=^M - ttinl lookahead pushback SOP=^A - HEXDUMP: ttinl got (7 bytes) - 01 25 23 59 2f 52 39 | .%#Y/R9 - RECEIVE BUFFERS: - buffer inuse address length data type seq flag retries - 0 1 29212 9667 0 Y 3 0 - [%#Y] - ... - in_chk my_count=8 - ... - ttinl lookahead my_count=1 - ttinl lookahead removed=^M - HEXDUMP: ttinl got (7 bytes) - 01 25 24 59 2b 26 31 | .%$Y+&1 - RECEIVE BUFFERS: - buffer inuse address length data type seq flag retries - 0 1 29212 9667 0 Y 4 0 - [%$Y] - -Here we can see that the pushed-back SOH was properly retrieved next time -around, and the tailgating Ack was not lost. This scenario repeats itself -212 times in the log, and there are no screwups. - -Back to VMS FTP... The problem with sending binary files is that zxin() -uses C-Library fopen()/fread() instead of RMS, so it can't access the input -file, which was opened by zopeni(), which is totally RMS-ified in VMS -C-Kermit. For VMS only, I replaced the zxin() loop by a zminchar() loop -like the one used in text mode, except without the character set or -record-format conversion. Tested by PUT /BINARY of some binary files, which -worked fine. ckcftp.c, 2 Mar 2007. - -Next problem... VMS C-Kermit ftp client sending binary files in text mode. -Variation 1: We just send the file. zopeni() is supposed to detect that -it's a binary file and automatically set the mode. And it does: - - zopeni fixed file format - using blk I/O - zopeni binary flag at open=0 - zopeni ifile_bmode=1 - zopeni binary=0 - zopeni autoswitch from TEXT to BINARY - zopeni RMS operations completed ok - -but then in gnfile(): - - if (!server || (server && ((whatru & WMI_FLAG) == 0))) - binary = gnf_binary; /* Restore prevailing transfer mode */ - -Well, since VMS sets text/binary mode automatically when sending files, -this code can (and should) be skipped in VMS. gnfile(): ckcfns.c, 2 Mar 2007. - -Variation 2: BINARY or SET FILE TYPE BINARY doesn't force binary mode. But -SET FTP TYPE BINARY does. But BINARY does indeed call doftptyp() so what's -the problem? We do indeed set ftp_typ to 1 but it gets reset somewhere -before we call zopeni(). But then zopeni() puts it back to 1. Tracing -through a transfer, it looks like all of this works right, it's only that -the file transfer display says TEXT when the transfer is really in binary -mode. This is because screen() is called before openi(). I wonder if we -can call scrft() from the ftp module... No, that would be too easy. OK, -sendrequest calls openi() and sets the file mode; putfile() calls -screen(SCR_FN), which prints the transfer mode. But putfile calls -sendrequest() after it puts up the screen that says the file type. So it -looks like sendrequest() has to call screen(SCR_FN) again if it changes the -file type. OK, that did it. ckuusx.c, ckcftp.c, 2 Mar 2007. - -The BINARY and TEXT (ASCII) commands do not inhibit automatic type switching -in VMS. They don't in Unix either. They never have. Should they? I think -so, otherwise what good are they? Plus we want the Kermit FTP client to -behave like the others. I added code for this but it doesn't work, due to -the layers and layers of text/binary detection and switching and -if-this-but-then-if-that... Anyway, no harm done. The normal rule is: -when you PUT a file, Kermit figures out on a per-file basis whether to use -text or binary mode unless you include a /TEXT (/ASCII) or /BINARY switch -in the PUT (or MPUT) command. ckuus[r3].c, ckcftp.c, 2 Mar 2007. - -Wed Mar 7 16:21:13 2007 WROTE SHORT TEST PROGRAM for ttruncmd (the openpty -version) on Mac OS X. On dulce: ~/kermit/ttpty.c / ttpty.sh. It starts the -external protocol in the lower fork. The command to run is a command-line -argument. Sending and receiving files with Kermit works OK. But again, the -standalone program totally fails when I use sz or lsz as the external -protocol. So it looks like we can rule out any environmental effects of -running the code inside C-Kermit. - -Mon Mar 12 16:52:20 2007: Put some effort into making ttpty.c more useful; -added a debug log. Found that for some reason, at least on Mac OS X, -select() always timed out at the the end. I added a SIGCHLD alarm and that -seems to handle the fork exit condition very nicely. Now we can send (say) -a 3MB file at good speed on Ethernet (1Mcps) considering the debugging, etc, -and it terminates instantly. But when sending a file into ttptycmd (with -"gkermit -r"), things go wrong at the end -- the Z packet is never -acknowledged. This is reproducible. Maybe this is a good lead.... The log -shows that select() timed out, even though the gkermit fork had not yet -exited (or finished). It looks like gkermit sent the Ack, ttpty.c read it -from the pty and sent it out the net: - - 0003: read pty=8 <-- read Ack from pty - 0003: loop top have_pty=1 - 0003: loop top have_net=1 - 0003: FD_SET pty_in - 0003: FD_SET ttyfd in - 0003: FD_SET ttyfd out=8 - 0003: nfds=5 - 0003: select=1 - 0003: FD_ISSET ttyfd out - 0003: write net=8 <-- send ack to net - 0003: loop top have_pty=1 - 0003: loop top have_net=1 - 0003: FD_SET pty_in - 0003: FD_SET ttyfd in - 0003: nfds=5 - 0009: select=0 - 0009: select timeout - have_pty=1 - -But Ack never arrived. This is a streaming transfer. But nope, streaming -is not the problem. If I disable streaming ("gkermit -Sr"), we hang in in -the middle of sending the data. If I use small packets, we don't hang: -1000 is OK, 2000 is not. In fact, the cutoff is 1024. OK, TBC... - -Wed 14 Mar 2007: Receiving a file thru ttpty "gkermit -e 1200 -Srd" -produces a debug log that shows that gkermit gets a lot of EAGAIN errors -when it tries to read from its stdin. In fact, it takes 6 tries (read() -calls) to read the S packet (27 bytes). Then when the first data packet -arrives (1200 bytes), read() never returns even one single byte. The -timeout interval is 15 seconds and it times out repeatedly. Added a -primitive hex dump to the ttpty debug log for each read/write (showing only -the first 24 characters and the last character, so it fits on one line). -Tried uploading a file. The S, F, and A packets (short) are received and -Ack'd OK, but then ttpty select() times out, never receiving even one byte -from the D packet. Clearly, when the pty driver receives a burst of > 1K -bytes, stops working. As before, if I limit the packets to < 1K, it works -fine. - -Can I send an 8-bit binary file? Nope. ttpty reads the binary data just -fine from the net and writes it exactly as it was received to the pty, but -the first time we write an 8-bit byte, we never hear back from the PTY -again. But the log shows that when the initial 7-bit packets from the pty, -it looks like the PTY is not in rawmode, because these packets end with ^J -rather than ^M. Calling pty_make_raw() on the masterfd and slavefd -explicitly, however, doesn't change anything. It doesn't matter if I do -this in the lower fork or the upper fork. So maybe it's the actual -semantics of pty_make_raw() that are wrong. - -Thu 15 Mar 2007: Went thru all the terminal mode flags in Mac OS X; didn't -help. Changed hex dump to show whole packet. Put hex dump routine in a -private copy of G-Kermit. Tried to transfer an 8-bit file, logging both -ttpty and gkermit. Compared what ttpty received on stdin with what it sent -to the pty (same) and what was received by G-Kermit (same). Then I realized -that my little test program was not putting its controlling terminal into -raw mode; when I did that, I could upload binary files (streaming, 2MB/sec). -And with Zmodem too (with rz; lrz doesn't work for some reason). Looking -back at the original in ckutio.c, I see that ttptycmd() never called -ttpkt(). Maybe that was the trouble all along. (Yup, but maybe not the -whole trouble.) - -Moving back to C-Kermit and the original ttptycmd() routine, adding the call -to ttpkt(), and stripping out a lot of cruft, and moving the pty_make_raw() -code to ckupty.c, Kermit uploads and downloads (streaming) work fine in -Solaris. Zmodem sends a file, but then the transfer hangs at the very end, -as if the signoff protocol were lost. This happens on Solaris. If I move -back to Mac OS X, everything works just fine. Then, making a Kerberized -connection from the Mac to NetBSD, I can send files from the Mac with both -Zmodem and Kermit. Receiving... Kermit OK. Zmodem... Nope. "rz: -Persistent CRC or other ERROR" (and created a 265MB debug.log!) - -Fri 16 Mar 2007: ttptycmd() was for sending files with Zmodem across -encrypted connections. But it occurred to me that it's necessary for -clear-text connections too; e.g. Telnet, where 0xff has to be doubled. Of -course Zmodem doesn't do that itself, so there's no way Zmodem external -protocol could work when executed over a Telnet connection, and in fact -it doesn't. I wonder why I ever thought it did. - -Wed 21 Mar 2007: Back to where we left off a week ago. Trying C-Kermit's -ttptycmd() on the Mac again, in remote mode: - - . G-Kermit send txt (kst): OK 832Kcps - . G-Kermit recv txt (kr): OK 425Kcps - . G-Kermit send bin (ksb): OK 1000Kcps - . G-Kermit recv bin (kr): OK 188Kcps - -And Zmodem: - - . sz txt (zst): OK 563Kcps - . sz bin (zsb): OK 714Kcps - . rz txt (zr): OK 863Kcps - . rz bin (zr): OK 198Kcps - -So in remote mode, everything works. Now let's try a clear-text Telnet -connection... - - . G-Kermit send txt (kst): OK 841Kcps - . G-Kermit recv txt (krt): OK 391Kcps - . G-Kermit send bin (ksb): OK 811Kcps - . G-Kermit recv bin (krb): OK 171Kcps - -And Zmodem over the same clear-text telnet connection: - - . sz txt (zst): OK 91Kcps (*) - -Kermit is sending sz messages like "sz 3.73 1-30-03 finished." to the -host, which tries to execute them, after the transfer is finished. -Of course "sz" is a command, but: - - sz: cannot open 3.73: No such file or directory - sz: cannot open 1-30-03: No such file or directory - sz: cannot open finished.: No such file or directory - -Did I lose that code that dis-redirects stderr when I went back to using the -pty code from the ckupty module? No, it's there and it's being executed. -Apparently the copy of sz I have is writing its "finished" message to stdout -because "sz blah 2> /dev/null" does not suppress it. Starting again with -lsz instead of sz: - - . sz txt (lzst): OK 413Kcps - . sz bin (lzsb): OK FAILED (*) - . rz txt (lzrt): OK - . rz bin (lzrb): OK - -(*) Sigh. Using lsz, we get "garbage count exceeded" errors and eventual -failure. But using regular sz, we get the extraneous message that starts -sz on the far tend, and the resulting getty babble. - -But even without changing the code, it will work one minute, and then fail -consistently the next. For example, I was able to send files with sz -successfully over and over, but with the getty babble at the end. Then, -after trying lsz and then going back to sz, every attempt at sending a file -quits with "Got ZCAN". The difference has to be that Kermit always does at -least some minimal encoding of C0/C1 control characters such NUL and DEL and -IAC, and I doubt that Zmodem does. - -http://zssh.sourceforge.net/ says: - - If file transfer is initiated but never completes (ie a line like : - - Bytes Sent: 0/ 513 BPS:0 ETA 00:00 Retry 0: Got ZCAN - - can be seen, but transfer never completes), chances are the pty/tty on one - of the systems are not 8-bit clean. (Linux is 8-bit clean, NetBSD is not). - Using the -e (escape) option of rz should solve this problem. - -It doesn't, at least not with lrz. And yes, the receiving end happens to be -NetBSD. But it looks like the zssh people have been down this road too. - -But with rz and sz, it worked. Once. Twice. Three times. But of course, -with the getty babble at the end. This can be taken care of by doing: - - rz -eq ; cat > foo - -which puts "sz 3.73 1-30-03 finished" and any other messages in foo (but you -have to type ^D to finish the cat). Using this method I was also able to -send an 8K binary file that contained a test pattern of all 256 possible byte -values. Then I tried a 3MB binary executable. All OK. So here we go again: - - . sz txt (zst): OK - . sz bin (zsb): OK - . rz txt (zrt): - . rz bin (zrb): - -Downloading fails about halfway through a fairly large file. I tried an -even bigger file, guaranteed to be 100% ASCII; same thing -- halfway -through: "rz: Persistent CRC or other ERROR". But it worked with a smaller -version of the same file (82K versus 2MB). Tried again with the bigger -version, it failed in exactly the same way at exactly the same spot: byte -number 1048320. But this is just ASCII text so it can't be a transparency -problem. Substituting another plain ASCII file of the same size but totally -different contents, it doesn't fail (2.36MB). Back to the previous file, it -fails again, but in a different spot (832960). So it's not totally -deterministic. - -To round things out, I tried downloading the binary test-pattern file; it's -only 8K. This failed. - - -4, --try-4k go up to 4K blocksize - -B, --bufsize N buffer N bytes (N==auto: buffer whole file) - -e, --escape escape all control characters (Z) - -E, --rename force receiver to rename files it already has - -L, --packetlen N limit subpacket length to N bytes (Z) - -l, --framelen N limit frame length to N bytes (l>=L) (Z) - -Tried again with "sz -L 256 -B 256 -4aeq". Doesn't change anything. - -NOTE: Mac OS X rz 3.73 1-30-03 does not support -e. -NetBSD rz 0.12.20 does support -e. - -Thu 22 Mar 2007: It occurs to me that ttpkt() might still be a problem; -maybe it's the network connection and not the pty that is not transparent -enough. To test this theory I did "stty raw ; stty -a" and then copied all -of the flag values into ttpkt in the BSD44ORPOSIX section: - - . rz txt (zrt): OK (2.36MB file, worked 2 out of 3 times) - . rz bin (zrb): "rz: Persistent CRC or other ERROR" - -A little more fiddling with the flags and I got the 8K binary test pattern -to SEEM to download OK (in the sense that rz gave a 0 return code) but the -file itself was truncated, always at 224. If I changed the test pattern -file to not include any bytes with value 224 (0xe0) or 255 (0xff), the -download worked. So we have a transparency problem somewhere. The debug -log shows that all byte values are being received from the network correctly -so the problem has to occur when we try to feed them to the pty. - -But no amount of twiddling with the termios flags seems to let these -characters pass through. Of course, since they are not in the C0 or C1 -control range, "sz -e" doesn't quote them (which it does by prefixing with -Ctrl-X and then adding 0x40 to the byte value so (e.g.) NUL becomes ^X@. -Note that 255 does not cause problems because it coincides with the IAC -character; the remote Telnet server doubles outbound IACs, and Kermit's -ttinc() undoubles them automatically (as the log shows). - -Trying to send a different file (a C-Kermit binary) shows that 255 is the -real killer; the file is truncated where the first one appears (at about -6K), even though some 224's precede it. Going back to the remote-mode test, -I see the same thing happens with the binary test-pattern file, if I send it -from K95 direct to rz-under-C-Kermit-in-remote-mode. So it has nothing to -do with C-Kermit having a network connection. Yet if I send the same file -direct from K95 to rz, it goes OK and the result is not truncated, so it's -not Zmodem either. The data arrives to C-Kermit intact, so the failure is -definitely in writing it to the rz process through the slave and master ptys. - -BUT if I send the same file from K95 to rz-under-ttpty, that works. What's -the difference? Suppose I just transplant ttpty literally into C-Kermit... -It makes no difference. When receiving the test-pattern, it truncates it -in exactly the same place. - -Well, all this is on Mac OS X. What if I move it to a different platform? -OK, building on Solaris and following the exact same procedure, ttptycmd() -doesn't even use the network connection. I think that's because rzsz on -Solaris is hardwired to use the controlling terminal and can't be -redirected, even in a pty? - -Moved to NetBSD. - - . sz txt (zst): Failed ("Got ZCAN") - . sz bin (zsb): - . rz txt (zrt): OK - . rz bin (zrb): - -Well, this is a big mess. Sending doesn't work (or sometimes it does but -reports that it didn't). Receiving... well, actually it's the same thing; -the file is completely transferred but then the final protocol handshake is -lost. The local C-Kermit returns to its prompt, but rz is still running: - - Retry 0: Got TIMEOUT - Retry 0: TIMEOUT - Retry 0: Got TIMEOUT - Retry 0: TIMEOUT - Retry 0: Got TIMEOUT - Retry 0: TIMEOUT - Retry 0: Got TIMEOUT - Retry 0: TIMEOUT - Retry 0: Got TIMEOUT - Retry 0: TIMEOUT - Retry 0: Got TIMEOUT - -I don't see how that is even possible. Even after I exit from Kermit the -messages keep coming, even though ps doesn't show the rz process anywhere. -Looking at the code, I see a place where end_pty() was still commented out -from the ttpty.c episode, I uncommented it. But still: - - . sz txt (zst): Fails ("Got ZCAN") - . sz bin (zsb): Fails instantly (but with no diagnostic) - . rz txt (zrt): OK - . rz bin (zrb): Fails with tons of "Bad CRC", "Gargage Count exceeded" - -Conclusion for the day: I think this is hopeless. Even if I can get it to -work somewhere, the results depend on the exact Zmodem software, how it uses -stdin/out vs stderr versus getting its own nonredirectable file descriptor, -versus the Zmodem version on the other end and which options are available -on each, versus the pty and select() quirks on each platform, and on and on. -It will be so hard to explain and to set up that nobody would ever use it. -It would be better to just implement Zmodem internally. - -Fri 23 Mar 2007: Went back to the small test program, ttpty.c. Tried -setting both the master and the slave pty to rawmode, even though I have -never seen any other software that did this. I had it receive the binary -test pattern file; it worked. I made a bigger test-pattern file, 3MB, -containing single, double, and triple copies of each byte in byte order and -in random order, this one was accepted too. - -So it would seem that the ckupty.c module is something to avoid after all. -It's full of stuff I don't understand and probably should not undo. So -changing C-Kermit's ttptycmd() to manage its own pty again, using openpty() -(which is not portable), I got it all to work in remote mode: Kermit -text/binary up/down and Zmodem text/binary up/down. But in local mode on -the client side of a Telnet connection... - - zst: OK, but we still get the getty babble at the end that starts sz. - zsb: OK, ditto. This is with the 3MB test-pattern file. - zrt: Not OK -- "Persistent CRC or other ERROR" - zrb: Not OK -- got the cutoff at 224 again "Persistent CRC or other ERROR" - -It's close. But actually this was still with USE_CKUPTY_C defined. When I -undefined it, it was back to being totally broken. Start over. (Check the -new cfmakeraw() code.) - -Tue 27 Mar 2007: Starting over. Back to ttpty.c. Let's verify, VERY -CAREFULLY, that it really does work, using the most stressful of the four -tests: sending the big (3.2768MB) binary test pattern from K95 into rz -through ttpty, logging everything. ttpty definitely receives the big file -smoothly with no errors or hiccups when I have it set to use the master side -of the pty for i/o. The application program (Zmodem in this case) runs on -the slave, and the network and/or control program communicates with the -master. This implies that Zmodem controls the terminal modes of the slave, -and ttpty should be concerned with those of the master. Doing it this way -in ttpty confirms this. - -Fine. But if I tell ttpty to SEND a file with sz, nothing happens. Ditto -with lsz. Select times out waiting for input from the pty. But if I -manually tell K95 to RECEIVE /PROTOCOL:ZMODEM it works OK. Somehow sz's -initial B000000 string is being swallowed somewhere, and it's waiting for -a reply from the receiver. sigh... But "ttpty gkermit -s filename" works -fine. What's the difference? It has nothing to do with stdout vs stderr; -sz is not writing to stderr at all. Is it some timing thing between the -forks? Aha. It's that I change the modes of the pty master in one fork -while sz is already starting in the other fork. - -OK, good, now for the first time we have Kermit and Zmodem both able to -upload and download a large worst-case binary test-pattern file... in -remote mode. Now taking today's lessons and fitting them back into -C-Kermit so I can try it local mode... - -Using G-Kermit as the external protocol, first in remote mode... All good: -text/binary up/down. The "halting problem" is solved by SIGCHLD, which -catches fork termination instantly and lets ttptycmd() know there is no more -pty. Zmodem: - - zst: OK - zsb: OK - zrt: OK - zrb: OK - -That's a first. Next, repeat in local mode, in which C-Kermit is the client -and has made a Telnet connection to another host over a secure (Kerberos V) -connection: - - kst: OK zst: ... - ksb: OK - krt: OK - krb: OK - -It seems we can never end a day on a high note. Somehow I seem to have -broken regular internal Kermit protocol transfers over encrypted connections --- the en/decryption engine loses sync. But they still work OK over a -clear-text Telnet connection. - -Today's code in ~/80/dulce.tar (27 Mar 2007). - -Added makefile target solaris10g+openssl. Gathered all the standard CFLAGS -for Solaris into cdcdeb.h so they don't have to be included in every single -makefile target for Solaris. On local Solaris 10 host OpenSSL is in -/opt/openssl-0.9.8e/. Tried the new makefile target, works OK. Also made -solaris10+openssl for Sun CC, but couldn't test it because I can't find any -Solaris 10 host that has Sun CC. Built with gcc at another site that has -OpenSSL 0.9.8f-dev, all OK. ckcdeb.h, makefile, 24 Jun 2007. - -It occurs to me that Kermit transfers on secure connections might have been -broken by the changes I made back in February to ttinl() for John Dunlap. -Here, for the first time, we invoke myunrd() to push a byte back into the -input queue, and there is also some funny business with "csave", which -changed, and which an old comment notes that it has to be treated specially -when encrypting. So it could be that the broken Kermit transfer has nothing -to do with the work on external protocols, and that putting back the -previous ttinl() will fix it. But now I can't seem to make a Kerberized -connection from Panix to Panix, even though I can make one from Columbia to -Panix. This means I have to build a Kerberized binary from the current -source code on either Solaris or Mac OS X. Trying Solaris -first... [~/solaris9k5/mk5.sh] This didn't work the first time due to -undefined krb5_init_ets, which is referenced if MIT_CURRENT is not defined -(it should be for Kerberos 5 1.05 and later and we have 1.42 here), tried -again with -DMIT_CURRENT=1... Nope, that one totally blew up in ck_crp.c. -Later, Jeff says krb5_init_ets is a no-op in Kerberos 1.4.x and later, -so I added an #ifdef (NO_KRB5_INIT_ETS) for skipping it; now it builds and -runs OK. ckuath.c, makefile, 9 Jul 2007. - -Meanwhile, using C-Kermit on Mac OS X, which makes the Kerberized connection -just fine, but still has the problem transferring files over it. Packet log -shows: - - s-00-01-^A9 Sz/ @-#Y3~Z! z0___F"U1@A^M - r-00-01-^A9 Y~/ @-#Y3~^>J)0___J"U1@I - s-01-01-^A(!Fx.x)(V^M - r-xx-08- - S-01-08-^A(!Fx.x)(V^M - r-xx-08- - S-01-08-^A(!Fx.x)(V^M - r-xx-16- - -Note that S packet is sent, received, and Ack'd OK. The F packet is sent but -is never Ack'd. Tried this several times and noticed that it's just -receiving that is screwed up, not sending. After ^C'ing out of the -transfer, I can still type commands, and they are executed on the far end, -but the results coming back are gibberish. Mon Jul 9 16:08:22 2007 (come -back to this later... substitute Dev.27 ttinl for current one and see if -the problem goes away, and if so, conditionalize the new code for clear-text -connections). - -Built C-Kermit with Kerberos 5 on Solaris with a version of ckutio.c that -uses the old ttinl() and transferred a file OK over a Kerberized connection. -So now it's just a matter of reconciling the old and new ttinl. The easiest -way to do this is to have new ttinl() chain to old ttinl() if the connection -is encrypted, which is what I did and it works fine. At some point the two -versions of ttinl() should be reconciled. ckutio.c, 12 Aug 2007. - -There was a function, islink(), used in only one place (ckuus6.c) that had -the same name as a commonly used scalar variable, and it was missing a -prototype. Changed its name to isalink() and added the prototype (Unix -only), ckuus6.c, ckufio.c, ckcdeb.h. 12 Aug 2007. - -Revisiting the ASCII and BINARY top-level commands, which are supposed to -be like in other FTP clients, but don't seem to have any effect. I added a -new routine to the FTP module, doftpglobaltype(), that sets the global, -sticky, permanent transfer mode (ASCII or BINARY) (TENEX could be added to -if anybody asks). These commands (now that they work) are different from -SET FTP TYPE { ASCII, BINARY }, which set the *default* transfer mode when -automatic switching fails for a given file. ckuusr.c, ckcftp.c, 12 Aug 2007. - (notify: Matt ) - -Even though the code hasn't changed, suddenly we're getting: - - "ckuusx.c", line 5682: warning: implicit function declaration: tgetent - "ckuusx.c", line 6183: warning: implicit function declaration: tgetstr - "ckuusx.c", line 6262: warning: implicit function declaration: tputs - "ckuusx.c", line 6266: warning: implicit function declaration: tgoto - -in ckuusx.c on Solaris 9. is still in /usr/include, dated 2002. -A quick search shows the missing functions are hiding in , which -until now was included only in Linux. Added a USE_TERM_H clause. No, that -doesn't help, the prototypes are not selected at compile time; there are -#ifdefs in that file that skip over these prototypes. I had to put them in -the code under #ifdef BUG999..#endif (I could have used a longer name like -#ifdef ADD_PROTOTYPES_FOR_CURSES_FUNCTIONS, but that would not be portable). -ckuusx.c, 12 Aug 2007. - -Also: - - "ckuusx.c", line 9232: warning: implicit function declaration: creat - -This is called in the IKSD dababase code, used for getting a lockfile. -creat() is a Unixism in code that is supposed to be portable. But IKSD only -runs on Unix and Windows, so I assume the Windows C library has a creat() -function. Anyway, suddenly the Solaris header files seem to have blocked -whatever path previously existed to the creat() prototype (which is in -), so I added an #include in the appropriate spot. ckuusx.c, -12 Aug 2007. - -Kermit functions for converting the number base -- \fradix(), \fhexify(), -\unfhexify() -- did not work with big numbers; ckradix() was missed in the -CK_OFF_T conversion. Fixed in ckclib.c, 12 Aug 2007. - -Updated the help text for ASCII, BINARY, and SET FTP TYPE to clarify the -semantics. ckuus2.c, ckcftp.c, 12 Aug 2007. - -Error messages were printed upon failure to open any of the four log file, -even with SET QUIET ON. Fixed in ckuus4.c, 12 Aug 2007. - -Built OK on NetBSD 1.3_RC3. Tried to build secure version but the libraries -had disappeared. 13 Aug 2007. - -Built OK on Mac OS X 10.4.9. Tried the secure version, macosx10.4+krb5+ssl. -Here we get the usual pile of "pointer targets in passing argument 1 of -(function name) differ in signedness", regarding security functions, but it -built OK. 13 Aug 2007. - -Reconciling the two ttinl's... On encrypted connections myread() returns -encrypted bytes; ttinl() has to decrypt them; it wasn't doing this in the -lookahead section so I fixed it. The new code works on both encrypted and -clear-text connections. I removed the chaining to oldttinl(), and -oldttinl() itself. ckutio.c, 13 Aug 2007. - - (Wouldn't it make more sense and be more efficient and less confusing - for myfillbuf() to do the decrypting?) - -When C-Kermit uses Zmodem as an external protocol, it doesn't seem to scan -files before sending them to set text or binary mode appropriately. It's -that external protocols bypass Kermit's whole "get next file" mechanism; the -(possibly wild) filespec is simply passed to the external protocol program. -Changing this would be a very big deal. But if only one file is being sent -(the filespec is not wild) it's easy enough to check. I added this to the -external protocols section of the protocol module. It can be overridden in -any of the regular ways (/TEXT or /BINARY switch on SEND command, SET -PATTERNS OFF, SET TRANSFER MODE MANUAL, etc). ckcpro.w, 13 Aug 2007. - -[FTP SEND /RECURSIVE] -Peter Crowley reported a problem with FTP recursive uploads getting the -directory tree wrong when the previous pathname was a left substring of the -new pathname (e.g. foo/bar/ and foo/bar2/). The logic did not handle this -case and created the bar2 directory as a subdirectory of bar, rather than as -a parallel directory. Fixed in syncdir() and tested with various edge cases. -ckcftp.c 14 Aug 2007. - - notify - -Added CD messages to FTP BRIEF display to track the ups and downs of -recursive uploads. ckcftp.c, 14 Aug 2007. - -The OUTPUT command gave a misleading error message ("Connection to xxx not -open") when used on a serial port that was, indeed, open but was not -presenting the Carrier signal, when CARRIER-WATCH was not OFF. Added a new -message for this, and some others. ckuus5.c, 14 Aug 2007. - -Sending from the command line, e.g. kermit -s foo, did not give an -informative error message if the file could not be found or opened. Fixed -in ckuusy.c, 14 Aug 2007. - -OK, back to ttptycmd.... It seems that back on March 27th, I got everything -working but I thought that there was still something wrong with it because -an unrelated problem so I put it aside. The version of ttpty.c from that -date worked OK, and it looks like I updated ckutio.c from it, but that -version of ckutio.c was put aside. Since then I have been working on the -ckutio.c version that was NOT put aside and so now I have to reconcile the -two: - - ~/80/ttypty/20070327/ckutio.c - ~/80/ckutio.c - -As a first cut I did this simply by replacing the contents of the #ifdef -CK_REDIR section of the latter with that of the former. Of course in -Solaris this comes up with openty() implicitly declared at compile time and -unresolved at link time. So the first task is to get HAVE_OPENPTY defined -for platforms that have it and have the others use the ttruncmd(). For -starters I put an #ifdef block in ckcdeb.h that defines HAVE_OPENPTY for -Linux, FreeBSD, NetBSD, OpenBSD, and Mac OS X. Ones that don't have -openpty() include AIX, HP-UX, and Solaris. Others like SCO I don't know but -I doubt it. The real solution is to get the ckupty.c module to work but one -thing at a time... This version is supposed work with secure builds on the -openpty() platforms, and on the others like Solaris, if an external protocol -is attempted on a secure (encrypted) connection, an error message is -printed and the command fails. ckutio.c, 14 Aug 2007. - -How to test? Apparently I did all my testing on Panix before, and that's -where all my Zmodem builds are, but now when I build a Kerberized version -(which works if I do it on the right pool host), it won't make a local -connection, and there is no other place I can connect to that has a -Kerberized Telnet server. I can, however, connect to Panix from here, using -the same code, but on Mac OS X... - -Slight detour: Got access to AIX again (5.3.0.0). Picky compiler, some -things needed fixing.... Also it says "1506-507 (W) No licenses available. -Contact your program supplier to add additional users. Compilation will -proceed shortly" and of course it goes kind of slow. For some reason, I -can't do streaming transfers into AIX over a local network (to its SSH -server), but windowed transfers are OK. Anyway, noting that we've been -using the same basic makefile target since AIX 4.2, changing nothing but the -version herald, I made a new target, simply "aix", that picks up the AIX -version automatically and sets the herald from it. Ditto for aix+openssl, -but on this host requires setting SSLINC and SSLLIB to /opt/ssl/include and -/opt/ssl/lib. Also the make program here was extremely sensitive to spacing -so I had to make some minor edits to get the link step to work for the SSL -version. ckuusy.c, makefile, 14-15 Aug 2007. - -Got rid of the special Panix secure NetBSD target, replaced it with a -regular one, which is invoked in the normal way by defining K5INC and K5LIB -to point to to where the stuff is hidden. Cleaned up and modernized the -comments in the makefile a bit. makefile 15 Aug 2007. - -Changed some data types and added some casts to ckctel.c to do away with -tons of "pointer targets in passing argument 1 of 'xxx' differ in signedness" -warnings. 15 Aug 2007. - -Set up Mac OS X as the testbed for ttptycmd(), with Panix as the remote -partner over a Kerberos 5 connection. The first test is to send a 300K -text file with gkermit as the external protocol. It worked fine, and the -debug log showed all the right components were active (namely encryption and -ttptycmd) [kermit/zmodem send/receive text/binary]: - - Kermit Zmodem - kst OK zst OK - ksb OK zsb OK - krt OK zrt OK - krb OK zrb Failed "rz: Persistent CRC or other ERROR" - -We've seen this before. The problem is 0xff, Telnet IAC, as I proved to -myself by constructing a 3MB file that contained every byte but 0xff in every -mixture and order and transferring it successfully over the same connection. -Presumably the Telnet server is doubling IACs, whereas of course rz is not -undoubling, thus the CRC error. This is progress. 15 Aug 2007. - -Log shows that indeed every IAC in the source file arrives doubled. Adding -code to remove the first IAC of every adjacent pair, a small test file with -different-length runs of IACs transfers OK. The 3MB all.bin file does not. - -Starting over... I can receive a big text file with Zmodem OK. The 3.2MB -binary test pattern that contains no IACs failed after 1.8MB, but the part -that it transferred was OK. A second try, almost the whole thing arrived, -it stopped just 584 bytes short of the end. Could be that file size is a -separate problem. Making a new copy exactly 1MB long... Well, that's -interesting, this one too stopped just short of the end. And again, the -same thing. When connecting back to the host, the last Zmodem packet can -be seen on the screen; it's as if the local Zmodem exited before reading -the last packet... But OK, if I change the options on the remote sz -sender to use small blocks, etc, then it works. - -Now, changing from the 1MB no-IAC-binary test pattern, to the 1MB all-values -test pattern, we fail after 81K. But the part that was transferred is -correct. Second try, same thing, but 57K. Third: 40K. Each time, upon -connecting back, the session is completely dead. - -IF I HAVE TO undouble IACs for incoming files, don't I have to double them -going out? To send a block to net we just call ttol(), but ttol() doesn't -do any doubling (because Kermit protocol always quotes 0xff). To see what -happens, I changed the ttol() call to ttoc() in a loop that doubles IACs. I -tested this by sending the full 3.2MB test pattern, which worked fine. - -For receiving, it's slow but it works OK with files that don't contain IACs -(my concern was that IACs might appear in outbound files or in Zmodem -protocol messages). It receives the 1MB no-IAC test pattern, so there are -no problems with protocol or timing. But the full test pattern always gets -cut off, but at different points, as before, with the remote session dead. -Changing the Zmodem receiver from rz to lrz on the local end (since the -sender on the remote end is lsz) does not change the behavior. - -Anyway, I went back and replaced the byte loop with something more -efficient, and it goes about 20 times faster. But this doesn't help either, -it only makes it fail faster. But aha, what if a doubled IAC is broken -across successive pty reads -- we have to make the "previous character" -memory persistent. Well, that was a good insight, but it still didn't fix -it. The log shows the IAC handling code is working fine. - -What does sz say? Capturing its stderr to a file... "Retry 1: Got ZCAN". -Next time: "Retry 1: Got TIMEOUT". Next time: Got ZCAN. - -Trying different Zmodem options... apparently I don't need to use short -blocks. But I do need to use -e, probably because of Telnet NVT treatment -of carriage return; without -e, there is a "persistent CRC error". -O -disables timeouts, but this makes no difference. - -OK, we still have two Big Problems: - - 1. When a long file has no IACs, the final < 1K of the file is not received. - 2. When a long file has IACs, the transfer generally stops very early. - -Problem 1: the transfer consistently fails less than 1K from the end of the -file. Upon CONNECT back to the host, a big Zmodem packet is sitting there -waiting to be read, which means ttptycmd()'s copy of rz is terminating -early. Can we catch it in the debug log? Doing this takes forever and -writes a GB to the disk... And then the problem doesn't happen. Also, I -can receive a HUGE text file almost instantly with no errors at all. - -Switching to lrz on the receiving end, now I see the error messages, about -300 lines like this: - - Retry 0: Garbage count exceeded - Bytes received: 872352/1000000 BPS:85464 ETA 00:01 Retry 0: Bad CRC - Bytes received: 892448/1000000 BPS:86690 ETA 00:01 Retry 0: Bad CRC - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Retry 0: Got ERROR - Bytes received: 898336/1000000 BPS:84293 ETA 00:01 Retry 0: Bad CRC - Retry 0: Garbage count exceeded - Retry 0: Garbage count exceeded - Bytes received: 900384/1000000 BPS:83751 ETA 00:01 Bad escape sequence - 2fRe - try 0: Bad data subpacket - Bytes received: 941472/1000000 BPS:86191 ETA 00:00 Retry 0: Bad CRC - Retry 0: Garbage count exceeded - -Even when it succeeds, it gets these. But if I receive a text file, no -matter how big, no errors or retries or timeouts at all. So it appears that -there is only one problem: a big-time lack of transparency regarding 8-bit -and/or control characters. The odd thing is, it's not that the characters -can't get through -- they all can -- but they seem to cause transitory -blockages. 16 Aug 2007. - -Cleaned up the remaining pointer signedness warnings in ckutio.c, but this -was a mistake, it broke Kerberos connections completely. Undid the changes. -ckutio.c, 17 Aug 2007. - -Changed all return() in the fork()==0 section of ttptycmd() to exit(). -ckutio.c, 17 Aug 2007. - -Tried explicitly setting the slave pty to rawmode. Makes no difference. -Tried using the Mac OS X (curses) raw() function, and also system("stty -raw"); still no difference. Tried doing all of these in different -combinations and orders. I found one combination that cuts the errors about -in half, and the transfer of the no-IAC test pattern almost always succeeds -(but it's slow). Anyway, it doesn't help much with the test pattern that -contains IACs. Well, the code is more solid than it was before but -functionally we have not advanced much if we can't download a binary file -with Zmodem! On the other hand, we can upload them, and we can transfer -text files in both directions, which is an improvement over the previous -situation, in which the entire session would hang due to loss of -synchronization of the encryption stream. - -Tried adding -funsigned-char to CFLAGS of Mac OS X target. It does not -make the "signedness" warnings go away and it doesn't change the runtime -symptoms. - -I tried a simpler version of pty_make_raw(), the one from Serg Iakovlev, but -it was a total failure. That's encouraging though, because it indicates -that pty_make_raw() is the right place to be working. - -Then I made pty_make_raw() set or unset every single terminal flag -explicitly. This made no difference, but didn't hurt anything either. - -Then I made pty_make_raw() explicitly set all the c_cc[] characters to 0 -(but left c_cc[VMIN] as 1). This made no difference either. - -I checked pty_make_raw() against ttpkt() and the only difference I found in -the terminal flags is that ttpkt() sets IGNPAR thinking it means "ignore -parity errors" when really it means "discard any character that has a parity -error" (at least according to Iakovlev) -- exactly the opposite. But I -tried it both ways, no difference. 17 Aug 2007. - -I noticed that even Zmodem text receives can fail. They don't get any -errors, they just get cut off shortly before the end. (But usually they -succeed, and fast too, like 500K cps). - -What if I don't call pty_make_raw() at all on the slave pty? - -zrt: EESSSSSSSS: 80% good (E = stopped just before end but no other errors) - -zrb no-IAC test pattern, short blocks: - 1. S/5 (success with 5 screens of errors. - 2. S/7 - 3. S/7 - 4. S/6 - 5. E/7 (failed just before end) - 6. S/7 - 7. S/6 - 8. S/6 - 9. S/6 -10. S/4 - -So, lots of errors, but it recovered 90% of the time. -Next, same thing, but without requesting short blocks: - - 1. E/5 - 2. S/5 - 3. E/4 - 4. S/5 - 5. S/5 - 6. S/5 - 7. X/0 (hard failure right away: "Got ZCAN" - 8. S/5 - 9. S/5 -10. S/5 - -So it doesn't look like short blocks make that much difference. Now what if -I turn off prefixing? Bad CRC, fails immediately every time. Putting back -pty_make_raw(slave), it still fails hard. - -Tried a new strategy with pty_make_raw(): rather than modify existing flags, -I set all flags to 0, and then turn on only those few that we need like CS8. -Now we get only 2.5 screens of errors instead 4-7 and the transfer rate is -higher for binary files (all of the previous ones were under 100K CPS, while -for text files it was 400-500K CPS): - - 1. S/2 195669 CPS - 2. S/2 194720 - 3. E/3 - 4. S/2 192550 - 5. S/3 192325 - 6. S/3 145066 - 7. S/2 200689 - 8. S/3 188948 - 9. S/2 209461 -10. S/3 181991 - -I noticed that there was no TIOCSTTY ioctl in the pty/fork setup sequence, -which is recommended somewhere, so I tried that and it was a disaster; the -entire session hung. I took it back out. 18 Aug 2007. - -Tried some transfers over a clear-text (not encrypted) connection with the -same results: smooth, fast transfer of a big text file (400K cps); rocky but -successful transfer of the no-IAC binary pattern file (135K cps). Switching -back to ttruncmd(), the same binary file is received at 1.5M cps, and the -no-IAC binary file totally fails after too many "Bad CRC"s; and we already -know that any file that contains IACs will fail. One might say that -ttptycmd() is better in every respect than ttruncmd() except in speed -(when it works). - -Let's see if ttyptycmd still works in remote mode (to local K95): - . sz / text works, but slowly. - . lsz / text works but some wierd errors are reported. - . lsz / binary / no IAC doesn't work at all (CRC-32 mismatch for a header; - Unexpected control character ignored: 13, etc). - . sz / binary / no IAC works OK but slow. - . sz / binary / full test pattern with IAC works OK but slow. - . Sending text into rz fails completely. - -What about ttruncmd() in remote mode? - . send /text works, fast. - . send /binary works, fast. - . receive /text works, not so fast but not bad. - . receive /binary works, not so fast but not bad. - -So we use ttruncmd() for remote mode, and we use it for local mode -serial-port and modem connections, and we use ttptycmd() on network -connections because (a) they might be encrypted, and (b) even if they are -not, they use some protocol that we have to handle, e.g. Telnet, Rlogin. -19 Aug 2007. - -Discovered that Sending binary files no longer works. Text is OK, binary -transfers don't even start. This happens on both encrypted and clear-text -connections. ttptycmd() is being used in both cases. But oddly enough, -receiving binary still works as before. What did I break, and when? -Oh, it was just the script, when I changed it from using sz to lsz. Putting -it back to sz makes it work, even with the full 3.2MB binary pattern with -IACs. - -I backed off the changes I made to ckctel.c to suppress some warnings, in -view of the fact that similar changes to ckutio.c broke things so badly. -19 Aug 2007. - -If sz is not given the -e flag, it sends control characters bare, except ^P, -^Q, ^S, and ^X. ^X is the control prefix, so ^A is sent ^X followed by A. -With -e, all C0 control chars are prefixed, but with ^X, which is, of -course, a control character. Interestingly, the C1 analogs of ^P, ^Q, ^S -(but not ^X and, unfortunately, not IAC) are also prefixed. -e makes no -difference for 8-bit characters. - -If we have a Telnet connection and the server is in ASCII (NVT) mode, CR is -always followed by LF or NUL. Well, it seems the server is putting us -(Kermit) in binary mode in this case, but staying in ASCII mode itself. -Added code to handle NVT byte stuffing and unstuffing in each direction -independently, according to the TRANSMIT_BINARY state in that direction. I -made a file containing just the bytes 0-31 and 127 and 128-159 and 255 (66 -bytes all together) and sending it from the host to C-Kermit, the local log -shows that every control character was received correctly and all TELNET -conversions were done right -- NUL removed after CR (and only after CR); IAC -removed after IAC (and only after an IAC meant as a quote). For the first -time, I can receive the 1MB all-values test pattern, but there are still -tons of (correctable) CRC errors, so the transfer rate is really awful, like -about 5% of what we get with a text file (25Kcps instead of 500). - -Further experimentation shows that the fundamental transparency problem is -fixed; we can receive short files (say, 1K or less) containing absolutely -any byte values in any combination with no errors at all. But once the file -size reaches (say) 10K, we get CRC errors, like one every 2 or 3K of data. -These are not deterministic. In successive transfers of the same file, they -come in different spots. It's tempting to blame pty buffer overruns, but -then text files would show the same behavior. When a binary file size -exceeds, say, 1MB, the chances of successful completion go way down, -independent of whether my external protocol is rz or lrz. I like lrz better -because the error reports come out on the screen as the transfer is going -on. Trying to download a real-world binary file -- a 2.2MB C-Kermit -executable -- I get 4500 error messages but the transfer evenually succeeds, -with an effective throughput of 21Kcps. - -Actually it turns out that "sz -a somebigtextfile" (2.2MB) also gets a lot -of CRC errors. The -e flag (escape all control characters) makes the same -big text file transfer with few or no errors. It's not sure-fire. -Sometimes no errors, sometimes one or two, and sometimes a fatal error that -kills the transfer. - -With binary files... a 32K binary file seems to make it every time. 40K -fails about 50% of the time. 48K fails 60% and every time it fails, it has -created a partial file of exactly 32K (32768 bytes). 96K fails 9 out of 10 -times, when it fails, the partial file is always 0 bytes, or 32768, or -65536, but that just means that rz's file output buffer is 32K. - -Why, then, do binary files cause trouble if it is not a solid transparency -problem? If a certain file can get through once, why can't it get through -every time? When a character arrives at the pty, the pty driver probably -takes a different path through its code, checking the terminal flags that -would affect that character. I tried making Kermit's network read buffers -very small but, surprisingly, this made things worse. I also tried making -them very much bigger, which didn't help either. 24K still seems to be the -right size. - -So, is it that some characters take longer to process than others? So long -that data is lost due to lack of flow control between TCP and the pty? One -way to test this theory is to slow Zmodem down. I tried "-l 32" which, -according to the man page, tells sz to "wait for the receiver to acknowledge -correct data every N (32 <= N <= 1024) characters. This may be used to -avoid network over-run when XOFF flow control is lacking." Makes no -difference. I also tried the -w (Window) switch, ditto. In fact there are -all sorts of options to set the "window size", "packet length", "block -size", and "frame length", but with no explanation of what these mean or how -they are related. If I crank everything down to minimum value: - - lsz q -L 32 -l 32 -w 1 - -I get 50% success with the 96K file instead of 10%. Adding -e, oddly -enough, made it worse. I also tried setting the environment variable -ZNULLS to different numbers like 512, no help there either. - -I tried making the read-from-net-write-to-pty buffer small (1K) but leaving -the pty-to-net one big. This improves chances of success, but it's -intolerably slow (3Kcps when the connection is capable of 500K). - -I also changed the write-to-pty operation from a single write() call of -possibly many K characters to a byte loop, one write() per byte. Same -result: success (but still about 300 recoverable errors), throughput 3Kcps. -20 Aug 2007. - -With ttptycmd() configured to write to the pty in a byte loop, it is -possible to delay each write. Adding a 10msec delay per character results -in a transfer that runs at about 20 cps and (for the 96K test file) would -take about 80 minutes to complete. And yet it still gets just as many -errors. So it's not a matter of timing either. The errors come, on -average, every file 388 bytes, but not at regular intervals. - -I tried the TIOCREMOTE ioctl on the pty master, as discussed somewhat -obliquely in the Mac OS X "man pty" page; "This mode causes input to the -pseudo terminal to be flow controlled and not input edited (regardless of -the terminal mode)" -- sounds like just the ticket but it made no -difference. Actually, looking at a man page on another OS (Solaris), it -says this is only for lines of text, EOLs are supplied, so that would mess -up the protocol. So remember: don't use this. - -Tried without O_NDELAY; the behavior was the same but the speed was much -slower. - -Tried switching back to the ckupty.c routines on Mac OS X and found that it -works now the same as with openpty(), except that I seem to get more getty -babble at the end. But this means I can run some tests on Solaris. I moved -the entire test environment from Mac OS X 10.4.9 to Solaris 9. But it -doesn't work at all. - -Trying to figure out the ckupty.c modules again. - . do_pty() calls pty_getpty() which returns in arg1 the fd of the pty master. - . Then it creates a pipe as a way to tell when the child dies - . Then it creates a fork: - - The parent does a blocking read from the pipe - - The child calls getptyslave() to get the pty slave - and writes one byte to the pipe - and then execs the command it's supposed to run -Note that the file descriptor of the slave is known only to the lower fork. -Therefore the lower fork is the one that has to set all the tty modes, etc. -I took care of all that but the ckupty.c method doesn't work at all on -Solaris. But it works "fine" on Mac OS X (the 32K all-bytes test file -transfers instantly with no errors, but the 96K one errors out). - -The problem on Solaris is that pty_make_raw() fails on the masterfd (but not -on the slavefd) with errno 25 "ioctl inappropriate for device". It doesn't -matter whether I do it in ckupty.c or ckutio.c. I found a web page on -kde.org that says Solaris does not allow tcget/setattr() on a pty master. -But the Sun "knowledge base" is not open to the public. Well, presumably -changes made to the slave are reflected in the master (comments in Solaris -telnetd seem to confirm this...) Let's come back to Solaris later. - -Moving to a Linux with lrzsz installed... Built a Kerberos 5 version with -USE_CKUPTY_C. Like on Mac OS X, it transfers short files OK and chokes on -longer ones. Switched to openpty(), it behaves the same. So the problems -on Mac OS X are evidently not OS-specific, which is good I guess, since that -means finding the way around them will apply to more than one platform. -21 Aug 2007. - -Look into TIOCSCTTY again. On System V based OS's, opening a pty acquires a -controlling terminal automatically. On BSD-based OS's, no; you have to use -the TIOCSCTTY on the slave file descriptor to give it one. I'm not sure why -a controlling terminal would be needed, except that without one, the virtual -device "/dev/tty" does not exist for the process that runs on the pty, and -maybe the application that runs there (e.g. rzsz) checks for it. On the -downside, having a controlling terminal opens the process up to terminal -interrupts like SIGINT and SIGQUIT. Until now I have not been using this -ioctl(). Results (in Linux): - - With TIOCSCTTY: 96K all-bytes test: 11 screens of errors, then success - Without TIOCSCTTY: exactly the same. - -Tried the same thing with TIOCNOTTY instead of TIOCSCTTY, with exactly the -same results (no effect whatsoever). - -There has to be a way to make this work, because Zmodem works through -telnetd, which basically the same thing as ttptycmd(): a relay between the -network and a pty. ttptycmd() is like telnetd backwards. Modern telnetds -are not much help; they don't access ptys or the network directly, they go -through "mux" devices so I can't see what they're doing to get transparency -and flow control. An old BSD telnetd uses packet mode but that would be a -big deal... - -I tried ignoring various signals like SIGTTOU and SITSTP, since some Telnet -clients do this. No effect, no difference. Anyway, in Linux the transfers -almost always finish OK despite the many errors. There is just some trick -I'm missing to make the pty accept a stream of arbitrary bytes without -hiccuping. - -What about Solaris, which uses ckupty.c? In streams-based OS's, where line -disciplines and whatnot are pushed on top of the pty, it looks like the pty -module saves the file descriptor of the "bare" slave pty (as 'spty') before -pushing things onto it, and then later uses spty rather than the regular -slave pty file descriptor when getting/setting terminal modes. I'm not sure -what this is all about but it's definitely SysVish... It happens if -STREAMSPTY is defined, but I noticed that STREAMSPTY is never defined -anywhere. I tried defining it so we take an entirely different path through -the code. It made absolutely no difference. - -Then I noticed that HAVE_STREAMS is not defined for Solaris either. Tried -defining it, but the session didn't work at all, no i/o. Removing the -HAVE_STREAMS definition but keeping the STREAMSPTY defined, I rebuilt and -tried "set host /connect /pty emacs". I got an EMACS screen but could not -type anything into it, which means that STREAMSPTY should not be defined -either. Removed the definition and "set host /pty" works again. So what's -the problem with ttptycmd()? - -In fact, ttptycmd() works on Solaris with Kermit as the external protocol, -but not with Zmodem, not even with text files. So again, there is no -fundamental problem with the code or the logic, it's Just A Matter Of -Transparency to control and/or 8-bit characters -- some trick I don't know -about. - -Looking at the Solaris debug log... I see that ckupty.c is calling -init_termbuf() to set the tty modes of the master, not the slave, and -set_termbuf() to set them, but you can't do that in Solaris, error 25. This -is in getptyslave(). Shouldn't getptyslave() be setting the tty modes of -the slave, not the master? I changed it to do this, but like all other -changes, it made no difference. I checked to make sure that after the change, -"set host /pty /connect emacs" still worked and it did. - -And then what... I had some code to redirect stderr in ckupty.c that was -not being executing due to a typo. When I fixed the typo, poof, Zmodem -binary transfers started working, or working as well as they work in Linux -and Mac OS X. It turns out that if I don't redirect stderr, sz and rz -just don't work. But lsz and lrz do. But if I do redirect it, I don't see -the progress messages from lsz/lrz. 22 Aug 2007. - -Built on HP-UX 11i v3 (B.11.31 U ia64) with optimizing compiler, got tons of -picky warnings, but it finished and linked and runs OK. Many of the -warnings were like this: - - "ckucns.c", line 1606: warning #2068-D: integer conversion resulted in a - change of sign: tnopt[0] = (CHAR) IAC; - -IAC is defined as 255 in ckctel.h. If I define it as 0xff, I don't get the -warnings. I changed the definitions of all the Telnet commands to be in hex -notation rather than decimal. If cuts way down on the HP-UX warnings and -doesn't seem to cause problems elsewhere. ckctel.h, 23 Aug 2007. - -Now it looks like Solaris is working but then it hangs at the end. It -appears as if the ckupty.c module is blocking SIGCHLD. Debug log shows that -when the transfer is complete, we received IAC DM (Telnet Data Mark) after -sz's last gasp and before the shell prompt is printed. But calling -tn_doop() in this case is a mistake because we are reading the number of -bytes that we know are available in a counted loop, but tn_doop() would -consume an unknown number of bytes and we would never know when to exit the -loop. Anyway, C-Kermit doesn't do anything with DM. Skipping over -tn_doop() (and not writing out the Telnet command bytes) fixes the hanging -condition at the end, even though SIGCHLD is never raised. ckutio.c, -23 Aug 2007. - -Some tests, Solaris to NetBSD over K5. -zst sends ascii.txt, a 2.36MB ascii text file (Kcps / Errors). -zrt receives the same file: - - zst 587/0 526/0 542/0 434/0 423/0 - zrt 827/0 800/0 847/0 FAIL 610/0 - -So text is good. Binary not so good. Here we transfer the 1MB all-bytes -pattern file. zrb receives it successfully, but with 1248 errors, at only -15Kcps. Sending the same file out always fails: - - Begin 20070823 16:32:07: SEND BINARY all2.bin [sz] - Sending: all2.bin - Bytes Sent: 5600/1000000 BPS:12446 ETA 01:19 FAILURE - End 20070823 16:32:13 - Elapsed time: 6.617992999999842 - cps = 151103.2121067556 - lsz: caught signal 1; exiting - -Decided to move to Linux but found that something is screwed up in Linux -C-Kermit with tilde expansion: - - send ~/testfiles/all.bin - -doesn't expand at all (but it did yesterday!). The problem was in the -ancient, ancient realuid/setuid handling code; real_uid() no longer works in -Linux. I worked around this in whoami() by setting ruid to getuid() if -real_uid() returned a negative number. Maybe dangerous, worry about it -later. ckufio.c, 23 Aug 2007. - -ANYWAY... after fixing that, I tested zsb on Linux, and it's broken there -too, using openpty(), so it's nothing to do with ckupty.c. After sending -the first Zmodem data packet, it just hangs, nothing comes back. In text -mode it gets farther, but then the same thing happens. Captured stderr from -rz on the far end: - - Bytes received: 608/1000000 BPS:21137 ETA 00:47 Retry 0: Bad CRC - Bytes received: 864/1000000 BPS:23540 ETA 00:42 Retry 0: Bad CRC - Bytes received: 1120/1000000 BPS:25003 ETA 00:39 Retry 0: Bad CRC - Bytes received: 5696/1000000 BPS:56988 ETA 00:17 Retry 0: Bad CRC - Bytes received: 9120/1000000 BPS:62227 ETA 00:15 Retry 0: Bad CRC - Bytes received: 9376/1000000 BPS:60766 ETA 00:16 Retry 0: Bad CRC - Bytes received: 9632/1000000 BPS:60361 ETA 00:16 Retry 0: Got TIMEOUT - Retry 0: Sender Canceled - Retry 0: Got ZCAN - -The local sz, however, doesn't give any error message. ZCAN means: "other -end canceled session by sending 5 ^X's" (or user typed them). What actually -happens is that ttptycmd()'s select() times out waiting for something from -the Zmodem partner and ttptycmd() itself kills the sz fork with SIGHUP. -When lsz receives SIGHUP it sends the ZCAN. So the real problem is that -after some point we're not receiving anything. - -I changed the timeout from 4 seconds to 30 seconds and now I see it just -stops for long periods of time and then resumes. The lrz log on the -receiving end shows tons of timouts, CRC errors, and other errors. The -local log shows that lsz wound up sending ZCAN (2 x (10 x ^H, 10 x ^X)). - -Moving on to another problem... Turns out Ctrl-C (SIGINT) is working right -after all. Since I'm using my test scripts like kerbang scripts, Ctrl-C -exits through trap(), as it should, closing the connection and cleaning up. -If I start Kermit and tell it to TAKE the script, then Ctrl-C brings me back -to the prompt with the connection still open (as it should). However, until -now I haven't done anything about the fork or the ptys. Added code to -trap() to kill the fork and close the master pty. ckuusx.c, 24 Aug 2007. - -Added code to try to break the deadlock. If select() times out, but we have -stuff to write either to the pty or the net, try to do it anyway, even -though select() did not say we could. But this doesn't help because when -select() times out we don't have anything to write. The problem is that -after receiving that last packet from the remote rz, the local lsz doesn't -seem to do anything, as if the lower fork wasn't running (and to confirm -this hypothesis, sometimes I noticed that when I Ctrl-C'd out of this, the -transfer would take off again). - -Backing up and testing with gkermit rather than zmodem: - - kst ripple.txt [824K] OK - kst ascii.txt [1359K] OK - krt ripple.txt -- FAILED - -It seems that we can't handle streaming. If I set up krt to disable -streaming on receipt, it works OK. - - krt ripple.txt [824K] OK - krb all2.bin [1000K] OK - -So here we have no trouble sending but big trouble receiving unless we -disable streaming. Whereas with Zmodem we have trouble receiving. - -But this wasn't happening before, what changed? Using C-Kermit on the far -end to receive the file with debug log on, I see that it is sending 4K data -packet after 4K data packet, with the local gkermit silent, as expected. -About midway through the transfer, the local Kermit sends an error packet -"Transmission error on reliable link". Looking at G-Kermit's debug log... -It receives the first five 4K data packets OK, but gets a CRC error on the -fifth one, and sends the Error packet. So it has received a stream of -20-some thousand bytes OK and then messes up. That number sounds a lot like -ttptycmd()'s buffer size. I changed the buffer sizes to be different: - - Read from pty and write to net: 4K - Read from net and write to pty: 1K - -This time it received the first 4K packet and failed on the second one. -Then I increased the buffers to 98K each, expecting to receive lots more -packets successfully but it bombed out on the 5th one. But that's good, it -confirms there's no logic error in the buffer management. Just to make -sure, though, let's set the buffer size smaller than the packet size and -disable streaming. In this case we get 4 good data packets and a CRC error -on the 5th one and so we request retransmission, and the next 8 times it -arrives it gets a different CRC error, but the 9th copy is OK. Then the -next packet comes and it gets a CRC error every time. And this is nothing -but plain ASCII text. - -Switching to remote mode: - - REMOTE=1 kk kst - -(after tricking myself because it was using ttruncmd() for this...) I see -that nothing works at all. What did I break? 24 Aug 2007. - -Fixed ttptycmd() to restore console modes after a remote-mode transfer. -ckutio.c, 25 Aug 2007. - -Noticed that error codes like ESRCH are not available in all modules. -That's because of some complicated in #ifdefs in ckcdeb.h that wind up not -always #including . But I notice that ckutio.c includes it -unconditionally with no ill effects, and so does ckvfio.c. Does any version -of Unix at all not have ? Added a catch-all clause to ckcdeb.h to -#include (in UNIX only) if, after the other clauses, ESRCH was -still not defined. ckcdeb.h, 25 Aug 2007. - -Now back to debugging ttptycmd()... Remote-mode transfers with ttptycmd() -were broken in two places, maybe as long as 2 weeks ago (this would have -affected non-network transfers too, which I can't test any more). -The logic was missing in a couple places for the non-network and/or -non-Telnet and/or non-encrypting connections (if statements with no else -parts). Fixed in ckutio.c, 25 Aug 2007. - -Testing remote mode: - - kst OK zst OK - ksb OK zsb OK - krt OK zrt OK - krb OK zrb OK - -Functionally it all works but there are hitches with Zmodem as always. -When sending to K95: - - . If I send with lsz, there are hundreds of "Subpacket too long" errors, - and the transfer is very slow, but it succeeds. - - . If I send with the 1994 Omen version of sz, transmission is instantaneous - and without errors, but then it hangs at the end. - - . If I bypass C-Kermit and send direct from lsz or sz, both work fine. - -So clearly the ptys are getting in the way. The hanging at the end would be -caused by the sz process closing before its last output reached the master -pty. It would need to do some form of flushing and/or pausing at the end -but there's nothing I can do about that; these programs were not designed to -be used in this way. Anyway, it only seems to happen with files longer than -100K. - -For local mode, testing in Solaris over our Kerberos 5 connection again: - - gkermit lrzsz - kst OK zst FAIL - ksb OK zsb FAIL - krt OK zrt OK but with errors - krb OK zrb FAIL - -If I use Omen rzsz as the external protocol (e.g. with zst), it blocks -redirection and it sends the file to my terminal, rather than over the -connection. This would probably be because it finds out the device name of -the job's controlling terminal and opens it, to prevent redirection. This -is hard to prevent in Solaris because there is no TIOCSTTY ioctl(). -Supposedly the same thing is accomplished by closing and reopening the slave -pty after doing setsid(). I added code to do this, but it made no -difference. (If I use lsz instead of sz, it is indeed redirected, but jams -up after about 15K.) ckupty.c, 27 Aug 2007. - -On Mac OS X with sz 3.73 1-30-03, however, the redirection works, so I -assume it would also work in Linux, FreeBSD, NetBSD, etc, too. Doing the -full test suite on Mac OS X: - - gkermit lrzsz rzsz - kst OK zst FAIL (1) OK - ksb OK zsb FAIL (2) OK - krt OK zrt OK (3) OK for 100K file, fails for longer. - krb OK zrb FAIL (4) OK (1MB all-bytes test pattern) - -(1) 64K file OK every time; 100K file fails every time. -(2) 10K file fails every time. -(3) Succeeds with 800K file but gets a few recoverable errors. -(4) Succeeds with 48K binary file with some errors, fails with longer ones. - -So actually it looks pretty good, it's just that lrzsz messes up. When -sending with lsz if I include -L 512 it sends the 100K test file with no -errors, but still chokes on longer ones. - -Testing on Mac OS X again, but this time over a clear-text Telnet connection: - - gkermit lrzsz rzsz - kst OK zst FAIL(1) OK - ksb OK zsb FAIL(2) OK - krt OK zrt OK(3) OK - krb OK zrb FAIL(4) OK - -(1) Almost worked, finished 777K out of 824K without errors. -(2) Got tons of errors, failed in first 30K out of 1000K. -(3) OK for 100K file but fails for larger. -(4) OK for 48K binary fail but fails for larger. - -Maybe see if we can do without the OPENPTY part. - -TOMORROW -- just clean up the code, add some SET / SHOW / HELP commands, -document it, and move on. - -Note: In K95, SET WINDOW sets the Zmodem packet length, 32 - 1024, multiple -of 64. - -SEE ~/80/external.txt - -Changed ftp port from int to unsigned int. ckcftp.c, 30 Aug 2007. - -Tried again to build KRB4/KRB5/SSL/TLS version for Solaris 9. Had to update -the build procedure again, of course, because of new file and directory -names, but ran into problems anyway because the -cu-solaris9g+krb5+krb4+openssl+shadow+pam+zlib target was calling another -target that did not know about the hardwired pathnames. Integrated the two -targets and tried building again. It actually compiled ok (but with lots of -warnings from the security modules), but failed at link time with -krb5_init_ets not found; fixed that with an #ifdef NO_KRB5_INIT_ETS, now it -builds OK but without the ftp client. Tried building it WITH the FTP and -that was OK too, no changes needed except to the build procedure. 12 Feb -2008, that is: C-Kermit 8.0.212 : 20080212. - -Tried to build with -DCK_SRP and -lsrp but: - - hash_supported ckcftp.o - hash_getdescbyname ckcftp.o - hash_getdescbyid ckcftp.o - cipher_getdescbyname ckcftp.o - krypto_delete ckcftp.o - krypto_new ckcftp.o - cipher_supported ckcftp.o - krypto_msg_priv ckcftp.o - krypto_msg_safe ckcftp.o - hash_getlist ckcftp.o - cipher_getlist ckcftp.o - cipher_getdescbyid ckcftp.o - -Sent mail to Tom Wu and backed off for now. makefile, 14 Feb 2008. -(Tom Wu never answered; seems like SRP is defunct.) - -The ".blah = xxx" form of variable assignment only worked for variables -names of length 22 or less, noticed and fixed by Wolfram Sang. ckucmd.c, -5 Mar 2008. - -In "set host /pty ssh ..." connections, the INPUT command suddenly stopped -working. This is in Solaris 9. It happens with all 8.0.* versions of -C-Kermit, so it's nothing to do with ttptycmd(). Added some debug() -statements but they don't show anything. Turns out there wasn't a problem -after all. Wed Mar 26 16:04:53 2008 - -Changed cmifi() to not print "?No files match" (or whatever) if SET QUIET ON. -ckucmd.c, 26 Mar 2008. - -Added \v(remoteip) for the IP address of the host we're connected to, -and \v(inmessage) for INPUT status messages corresponding to \v(instatus). -ckuusr.h, ckcmai.c, ckuus[24].c, 26 Mar 2008. - -Made \fkeywordval() strip braces/quotes from the right-hand side so we can -handle things like: - - password="stringwithspaceatend " - -ckuus4.c, 6 Aug 2008. - -Added invisible PUTENV command for UNIX only. Value should not be enclosed -in doublequotes. Requires lge \v(buildid) 20080826. ckuusr.[ch], 26 Aug 2008. - -Added SET VARIABLE-EVALUATION { RECURSIVE, SIMPLE }. This is highly -experimental, but also highly desirable if it works out. SIMPLE inhibits -the default recursive method of evaluating \%x and \&x[] variables, which -is, quite frankly, nuts and makes programming in Kermit at best -counterintuitive. I made an exception in the case of array subscripts, -because changing how they are evaluated could break a lot of scripts, and -anyway there should never be any harm in evaluating them recursively because -their final value is always (or should be) numeric, not some string that -might contain backslashes. The SET VAR setting is on the stack, just like -SET QUIET (it follows the quiet/xquiet code in ckuus[356].c), so macros or -command files that change it can't break the script that invokes them. -Added \frecurse() to force recursive evaluation of a \%x or \&x[] variable -regardless of the VARIABLE-EVALUATION setting. Added \v(vareval) to allow -programmatic setting to current setting. Tested on Solaris 9 but should be -totally portable. ckuusr.[ch], ckuus[356].c, 11 Sep 2008. - -From Günter Knauf: 64-bit builds were failing on SuSE Linux because -libresolv and libcrypt were in lib64 rather than lib; updated the tests in -the linux makefile target to find them. makefile, 12 Jan 2009. - -Tried building on Red Hat Enterprise Linux Server release 5.3 64-bit. -There is no curses or ncurses. "make linuxnc" compiled OK but collapsed at -link time looking for crypt(), res_search(), and dn_expand(). Turned out -the linuxnc (and linuxc) targets needed the same treatment as the Linux one -for 64-bit Linuxes. makefile, 3 Mar 2009. - -Consolidated the linux targets so we no longer need three separate ones for -curses, ncurses, and no curses. "make linux" works ok on computers with and -without (n)curses. "make linux+ssl", ditto. "linux+krb5+ssl builds OK but -needs -DNO_KRB5_INIT_ETS". Makefile, 3 Mar 2009. - -Fixed copyright date announced in herald, ckuus5.c, 3 Mar 2009. - -Patch from Seth Therault to avoid deprecation warning for utmp references -in ckufio.c in Mac OS X 10.5 (later, this became a consolidated makefile -target that works automatically for at least Mac OS X 10.3.9 through -10.5.6). makefile, ckufio.c, 28 April 2009. - -zshcmd() (the function used by RUN and ! to run external commands) was not -falling back as expected in Linux RHEL4/5 if SHELL was not defined in the -environment. Also in all Unix versions, there was no indication if a RUN/! -command failed (other than the return code) because the specified shell -didn't exist or was not executable (e.g. the SHELL environment variable was -misdefined). Now it prints the name of the offending shell and the reason -it couldn't be executed (Not found, Permission denied, etc). ckufio.c, -28 April 2009. - -There is no easy way to get the last field of string; for example, the -extension from a filename, which might have any number of fields. In -general we want to be able to get "word number n" counting from the right; -\fword() lacks this ability. Now if you give it a negative word number, -that says to count from the right; for example \fword(one two three four -five, -2) returns "four". ckclib.c, ckuusr.c, 14 May 2009. - -Fixed a typo in the aix51+openssl (SSLLIBS should have been SSLLIB). -From Jason Lehr. makefile, 27 May 2009. - -Updated the linux+openssl+zlib+shadow+pam target to chain to the new main -Linux target. A bunch of other ones remain un-updated. makefile, 12 Jun 2009. - -Updates to the new Mac OS X 10.5 target from Seth Therault (which is -supposed to work on all Mac OS 10-point-anything) to avoid warnings -that came up on on Mac OS 10.4.11/Intel. Once this one is proven we should -be able to remove/consolidate lots of other ones. makefile, 12 Jun 2009. - -C-Kermit disables SSL with the message "?OpenSSL libraries do not match -required version." if the version of OpenSSL that Kermit was built with is -not exactly the same as the version that is loaded dynamically at runtime. -This is actually the proper behavior, since APIs are not guaranteed not to -change between OpenSSL versions prior to 1.0.0. Made the error message more -informative. ck_ssl.c, 26 Aug 2009, and again 28 Aug 2009. - -AIX 6.1 is out, it is really just a new name for AIX 5.4. Added makefile -targets, plus for the first I made AIX 4.2 and later figure out its version -number in the makefile target so we don't have to keep adding new -DAIXnn -sections to the code, and also get its hardware name (e.g. "powerpc") from -uname at make time, rather than hardwiring "rs6000" as I did before. -Consolidated all AIX 4.2 and later targets so now just "make aix" or "make -aix+ssl" can be used. Except not the gcc ones as they have some quirks so -I'd rather not disturb them. Tested this on AIX 5.3. -makefile, 28 Aug 2009. - -From Kinjal Shah, a correction to the Linux makefile entry that allows it -find the 64-bit curses or ncurses library. makefile, 29 Aug 2009. - -Renamed aix4[23]: to oldaix4[23]: in makefile to fix the warning messages -I didn't notice before. I didn't want to remove them because they have -some special things that might still be needed, if anybody still has these -AIX versions. makefile, 29 Aug 2009. - -Built on RHEL 5.3 64-bit, regular and with OpenSSL 0.9.8e. 31 Aug 2009. - -Built on NetBSD 5.0.1/i386, regular and with OpenSSL 0.9.9-dev, 1 Sep 2009. - -Changed SSL message to mention LD_LIBRARY_PATH (Solaris), SHLIB_PATH (HP-UX), -LIBPATH (AIX), or LD_LIBRARY_PATH (Linux). ck_ssl.c, 3 Sep 2009 - -Noticed that "make linux+openssl" fails to include -lutil a link time, which -it needs for openpty(). That's because this target is obsolete. I renamed -it to be oldlinux+openssl and added linux+openssl as a synonym for -linux+ssl. makefile, 3 Sep 2009. - -Tested linux+openssl+zlib+shadow+pam, it's OK. Also linux+krb5. Also -linux+krb5+ssl. makefile, 3 Sep 2009. - -Tried building on Solaris 9 with OpenSSL 0.9.8k with -solaris9g+openssl+shadow+pam+zlib, it failed like so: - - ck_ssl.c:2875: error: conflicting types for 'inet_aton' - /usr/include/arpa/inet.h:52: previous declaration of 'inet_aton' was here - make[2]: [ck_ssl.o] Error 1 - make[2]: Leaving directory hmt/sirius1/prv0/kd/fdc/solaris9ssl' - make[1]: [solaris2xg+openssl+zlib+pam+shadow] Error 2 - make[1]: Leaving directory hmt/sirius1/prv0/kd/fdc/solaris9ssl' - make: [solaris9g+openssl+shadow+pam+zlib] Error 2 - -The problem was caused by including an inet_aton() function ck_ssl.c for -the benefit of platforms that don't have one in their libraries. This is -defeated by including NO_DCL_INET_ATON in KFLAGS. I added this, but then -I thought it would be a good idea to automatically sense the OpenSSL -version so we can automatically set OPENSSL_097 or OPENSSL_098 rather than -bombing out, so I added code to do that too, and also to set the Solaris -version number: 9, 10, or 11. The new entry is solaris9g+openssl. -ckcdeb.h, makefile, 3 Sep 2009. - -Fixed a complaint in ckufio.c about implicit declaration of initgroups. -ckufio.c, 4 Sep 2009. - -Built on Solaris 10 with gcc and Sun CC using new solaris{9,10,11} target -that is like the new solaris{9,10,11}g one but without the gccisms. -makefile, 4 Sep 2009. - -Changed solaris{9,10,11}g+ssl target to set only the SSL-specific things and -then chain to the main solaris{9,10,11}g target. Tested OK on Solaris 9 and -10. makefile, 4 Sep 2009. - -Created solaris{9,10,11}+ssl target that is exactly like the -solaris{9,10,11}g+ssl except it chains to the solaris{9,10,11} target -instead of the solaris{9,10,11}g one. That is, it builds an SSL version of -C-Kermit using Sun CC rather than gcc. makefile, 4 Sep 2009. - -Tried building on HP-UX 10.20, bundled (non-ANSI) compiler ("make -hpux1000"). This failed until I: - - . Moved a struct inititialization out of setextern(), ckuus3.c. - . Removed an ANSIism from the declaration of sigchld_handler() in ckutio.c - . Added a cast to strcmp() in zvuser(), ckufio.c. - -Builds OK now. Built OK with "hpux1000o" (the ANSI compiler) too. -And with "hpux1000gcc". Couldn't test "hpux1000o+openssl". 21 Sep 2009. - -The Sony Playstation 2 and 3 are 64-bit PowerPC platforms that can run Linux -if it is installed as an "other OS" on its hard disk; and the Linux kernel -since 2.6.21 supports the PS3 without any patching required. Pawel Rogocz -reported that "make linuxppc" (one of the old targets that has not yet been -integrated into the main "linux" target) compiles OK on 2.6.29-ydl61.3 -(Yellow Dog Linux release 6.2 'Pyxis'), but fails at link time because -'openpty' isn't found, because -lutil was not included, because that part -was added only to the main linux target. I asked him to try "make linux" -and he sent back a transcript in which there were thousands of errors from -the curses code ckuusx.c. Later I tried it myself and it built without a -hitch. My theory is that between then and now, a missing piece of the -ncurses library (/usr/include/ncursesw) was installed. 21 Sep 2009. - -HP-UX 9.05 on PA-RISC 9000/712 building with hpux0900 (bundled compiler): - . ckutio.c compilation failed with PENDIN and FLUSHO not defined in - pty_make_raw(). I dummied definitions for them to handle this situation - on this or any other platform where it might crop up. - ckutio.c, 24 Sep 2009. - . Ditto for the PTY module, + IMAXBEL. ckupty.c, 24 Sep 2009. - . References to endusershell() were fatal in the bundled compiler. Changed - the hpux0900 target to define NODCLENDUSERSHELL, and put a special case - in ckufio.c to not put a cast in front of the call if NODCLENDUSERSHELL - is defined. Now it builds and links OK. makefile, ckufio.c, 24 Sep 2009. - -HP-UX 9.05 on PA-RISC 9000/712 building with hpux0900o (optimizing compiler): - . Warnings in ckutio.c at line 14860 about arguments to select (pointers - are not assignment-compatible). "man select" says arguments are ints. - Defining INTSELECT fixes these warnings but results in fatal errors later - around line 14881 and others in the area involving FD_SET. This was too - involved so I put it back as it was. 24 Sep 2009. - -Built OK on Solaris 10 with Sun CC. A couple warnings about implicit -function declarations for curses routines because apparently they aren't -declared in curses.h. Tuff. 25 Sep 2009. - -Tried building on Solaris 10 with Sun CC and OpenSSL 0.9.8k, and this -uncovered various loose ends in the solaris9+openssl target, which I fixed. -makefile, 25 Sep 2005. - -Fixed four typos in printfs in ck_ssl.c, \% instead of just %. 25 Sep 2009. - -Squelched 20-some complaints about a character array being referred to -directly instead of by a pointer, plus several other similar nits to get rid -of all the compilation warnings on Solaris 10 with Sun C 5.8 Patch 121015-06 -2007/10/03. ckctel.c, ckctel.h, 25 Sep 2009. - -Built the result on the same Solaris 10 system with gcc 4.2.4 using the -new solari10g+openssl target, working out a few kinks here too. -makefile, 25 Sep 2009. - -Made consolidated Solaris 9/10/11 64-bit targets for gcc, solaris9g64, -solaris10g64, solaris11g64, tested on Solaris 10 Sparc. makefile, 25 Sep 2009. - -Made consolidated Solaris 9/10/11 64-bit targets for Sun cc: solaris9_64, -solaris10_64, solaris11_64. These simply set a couple flags and chain to -the main solaris9 target. makefile, 25 Sep 2009. - -Removed a bunch of old superfluous Solaris 9 and 10 targets: oldsolaris9, -oldsolaris9lfs, solaris9g64 solaris9g_64, oldsolaris10 old solaris10lfs, -oldsolaris10+openssl, oldsolaris10g+openssl, solaris10_64, oldsolaris10g, -solaris10g_64, solaris10g64. There are still plenty more to prune but it's -a start. makefile, 25 Sep 2009. - -Added or fixed some missing prototypes in ckctel.h: -fwdx_send_xauth_to_xserver(), fwdx_parse_displayname. 25 Sep 2009. - -Improved the instructions for building secure versions in the makefile, -using this example: - - make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \ - "SSLLIB=-L/opt/openssl-0.9.8k/lib" - -makefile, http://kermit.columbia.edu/security.html, 25 Sep 2009. - -Built on HP-UX 11.11, 26 Sep 2009: - . make hpux1100 (ok) - . make hpux1100gcc (ok) - . make hpux1100o (gets a lot of warnings about sendpath and sendfile, - because they are also declared in , but builds OK) - . make hpux1000gcc+openssl \ - SSLINC=-I/opt/openssl/include SSLLIB=-L/opt/openssl/lib - -Note: sendpath and sendfile are not Kermit symbols. The warnings are coming -from socket.h: 'Redeclaration of "sendfile" with a different storage class -specifier'. This is nothing new; see notes of 2-4 Jan 2005. - -From Peter Eichhorn: - . Update to makefile to make current code build OK on HP-UX 8.00. - . Changes to format of some hints to make them more copy-and-pastable. -makefile, ckuu5.c, 28 Sep 2009. - -From Peter Eichhorn: Changes to HP-UX 7.0 target to increase the switch table -stack size, which was overflowing. makefile, 30 Sep 2009 - -HP-UX 6.5 (1989), "make hpux0650tcpc"... (8:19...) Needed to not include -arpa/inet.h (which doesn't exist) and not use host address lists (add --DNOHADDRLIST), which gets us past ckcnet.c, but in ckcftp.c we bomb out on -FD_SETSIZE undefined. Somehow we worked around this in ckcnet.c. Patched -in a definition in ckcftp.c, and also added -DINTSELECT to compiler flags. -Compiles ok, bombs at link time on bcopy, bzero, FD_ZERO, FD_SET, FD_ISSET. -Now it compiles and links OK but dumps core when started. Added --DNOCKGETFQHOST, rebuilt from scratch (takes 35 minutes). It starts OK, but -it dumps core when given a "telnet xxx" command, where xxx is a hostname. -However, it works OK if an IP address is used: "telnet 123.45.6.78". It -took all day to track this down, but now it's fixed (see the #ifdef HPUX6 -sections of ckcnet.c). So now (for the first time, I think) we have both -telnet and ftp in HP-UX 6.x, if anyone cares. ckcnet.[ch], ckcftp.c, -makefile, 2 Oct 2009. - -Changed default SET TERMINAL TYPE type for K95 from vt320 to vt220. This is -because Unix OS's such as Solaris have dropped vt320 as a terminal type. -settrmtyp(), ckuus7.c, 5 Oct 2009. - -I moved the PUTENV command code, which was inline, to a function, doputenv(). -ckuus[r7].c, ckuusr.h, 5 Oct 2009. - -Changed the UNIX version of SET TERMINAL TYPE to take a value and then do -the equivalent of "export TERM=value" by calling doputenv(). This sets -\$(TERM) correctly and passes its value along to inferior processes. -However, to make this take effect within Kermit itself (for the fullscreen -file transfer display and for the SCREEN command, Ctrl-L, etc) I also had to -reinitialize the curses database, which is tricky because normally if you -feed it an unknown terminal name, it just exits. ckuus7.c, 5 Oct 2009. - -Changed the little-known and little-used RESET command (which closes all -open files) to also put command echoing back to normal in case it got -messed up somehow (as in HP-UX 6.5, upon returning from PUSH). -ckuusx.c, 5 Oct 2009. - -For Unix, increased string buffer sizes for wildcard expansion for all -platforms that have BIGBUFOK defined from 500000 (0.5M) to 10000000 (10M) -bytes, and for 64-bit builds to 2000000000 (2G) bytes. No point making -it bigger than that because malloc's argument is a size_t, which is an int. -ckufio.c, 5 Oct 2009. - -Built on Mac OS X 10.4.11, required one minor adjustment to the makefile -(-DNODCLINITGROUPS). This was using the macosx10.5 target, which is -supposed to be universal like the linux and netbsd targets, but not yet -proven. Also built a 64-bit version (-mpowerpc64 -mcpu=G5 -mtune=G5 --arch ppc64); it compiles and links OK but won't start: "Bad CPU Type -in executable". Fix later... makefile, 5 Oct 2009. - -Changes from Seth Theriault to suppress signed vs unsigned char warnings in -Mac OS 10.5.8 from gcc4, and a new makefile target for Mac OS X (presumably -10.3.9 or later) + Kerberos 5 and OpenSSL. ckutio.c, ckuath.c, ckctel.c, -ckcnet.c, ckcftp.c, ck_crp.c, makefile, 6 Oct 2009. - - Later I had to back out of these, because although it made for a - clean build, in the resulting executable SSL connections didn't work. - -Tue Oct 6 17:23:27 2009 -FTP address resolution is broken, but ftp_hookup() hasn't changed. -So... (see the #ifdef HPUX6 sections of ckcnet.c) (I did, and I rolled -back some of the changes from the other day, but it made no difference.) -Putting back the ckcftp.c from a few weeks ago makes no difference. -Putting back the ckcnet.c from a few weeks ago makes no difference. - -Added patches from Seth Theriault so macosx10.5+krb5+openssl would build -on Mac OS X 10.3.9. makefile, ckcftp.c, 7 Oct 2009. - -Built today's code on Linux RHEL4, NetBSD 5.0.1, Solaris 9, and Mac OS X -10.4.11, both with and without SSL. The NetBSD system has OpenSSL 0.9.9-dev. -7 Oct 2009. - -In Mac OS X 10.6, the following symbols are unresolved at link time: -_des_key_sched, _des_new_random_key, _des_ecb_encrypt, -_des_init_random_number_generator, _des_fixup_key_parity. This is -with OpenSSL 0.9.8k. But it doesn't happen on other platforms that -have 0.9.8k. - -Added SET SESSION-LOG NULL-TERMINATED-TEXT. This is for the benefit of a -speech synthesizer that will speak a line of text only after receiving a -NUL character. A more general solution would be to define a filter or -whatever, but who has time. ckuus[23x].c, 7 Oct 2009. - -Consolidated Mac OS X targets, and removed experimental 64-bit ones, because -they never could work in 10.5 and earlier because 64-bit libs are missing, -and 10.6 and later are 64-bit automatically. makefile, 8 Oct 2009. - -Built on Mac OS X 10.6.1. It came out automatically as a 64-bit build -because __LP64__ is defined somewhere that I can't find. But this explains -why the 0.9.8k on 10.6 comes up with missing symbols when the 0.9.8k lib -10.5 (or on Solaris or on Linux) does not: it's a different library: "Mach-O -64-bit dynamically linked shared library x86_64", rather than "Mach-O -dynamically linked shared library ppc". Probably the 64-bit version has -some things #ifdef'd out. Added -m32 to the CFLAGS and LNKFLAGS for the -macosx+krb5+openssl targets, and it built OK one time. But then the errors -came back. makefile, 8 Oct 2009. - -Updated C-Kermit installation for Mac OS X in ckuwr.html on the website. -8 Oct 2009. - -Tried some things to get around the problem with OpenSSL in Mac OS X 10.6, -to no avail. Asked Jeff. He said, "MacOS X no longer includes DES anywhere -on the system. Not for SSL, not for Kerberos, not for anything. This will -increasingly become the situation on new operating systems. Windows 7 and -2008 R2 will also ship with no DES." Sure enough, the Mac OS X Server -Upgrading and Migrating document for 10.6 says, "Mac OS X Server v10.6 does -not support single DES encryption. It supports AES 128 and 256 encryption -types. However, during a migration or upgrade from v10.4 to v10.6, servers -that were Kerberized by the v10.5 Open Directory server will not use the AES -128 or 256 encryption types. To use the AES 128 or 256 encryption types you -must re-Kerberize all servers." 12 Oct 2009. - -DES and 3DES encryption can be excluding removing the -DCK_DES flag. I -removed this one and -DLIBDES (and -m32) and this makes a working 64-bit -version. Then I added code to the macosx+krb5+openssl target to use these -flags if the Mac OS X version was 10.5 or less and leave them out for 10.6 -or later. Tested on 10.4.11 and 10.6.1. A better way to do it might have -been "nm -gj libssl.dylib | grep des_", but that gives the same results on -10.4 and 10.6. Also, 10.6 still has /usr/include/ssl/des.h. -makefile, 13 Oct 2009. - -Next issue: - In file included from ckutio.c:15674: - /usr/lib/gcc/i386-redhat-linux/3.4.6/include/varargs.h:4:2: #error "GCC no - longer implements ." - /usr/lib/gcc/i386-redhat-linux/3.4.6/include/varargs.h:5:2: #error "Revise - your code to use ." - -The problem occurs when trying to force a non-ANSIC build with GCC. -Changing the source file to include instead of -doesn't help because evidently requires an ANSI C compiler. -Nothing can be done about this. 13 Oct 2009. - -Next issue: Can't compile ckcftp.c with -DNOCSETS or -DNOSPL; some -#ifdef/#endif doesn't match up. Sigh, this is the hardest kind of thing to -debug. There's 17,622 lines of code in this module and no tool that I know -of.... Wait, I wrote one. But it shows all the #if/#ifdef/#ifndef's and -#endifs matching up just fine. Backing off to ckcftp.c of a few days ago -(before char / unsigned char casts were added), I see that it builds OK, so -I backed off to that one, but put back the special case #ifdef for MACOSX103 -declaring CONST gss_OID_desc, and it builds OK (the other stuff was purely -cosmetic, when will I learn?). ckcftp.c, 13 Oct 2009. - -Protected cvtstring() and related functions with #ifdef NOCSETS..#endif, -and ditto for the character-set conversion code in dorename(). -ckuus6.c, 13 Oct 2009. - -Fixed an #endif /* TNCODE */ that was a line too low in ttptycmd(), -causing -DNONET builds to fail. ckutio.c, 13 Oct 2009. - -There was a reference to doputenv() that wasn't guarded by #ifndef NOPUTENV, -fixed in ckuus7.c, 13 Oct 2009. - -Moved doputenv() and settermtyp() out of an #ifdef NOLOCAL section because -these are useful even when not making connections. ckuus7.c, 13 Oct 2009. - -Moved havelfs declaration outside of #ifdef NOXFER because it was also used -for other things. ckcmai.c, 13 Oct 2009. - -COPY /PRESERVE depended on code from the Kermit protocol module, which -is omitted in -DNOXFER builds. Disabled COPY /PRESERVE in -DNOXFER -builds. ckuus6.c, 14 Oct 2009. - -SHOW PROTOCOL code for external protocols had to be #ifdef'd out for --DNOPUSH builds. ckuus4.c, 14 Oct 2009. - -There was some confusion between "No XYZMODEM" and "No extermal protocols"; -cleared up in ckuus3.c, 14 Oct 2009. - -After all that, 86 different combinations of feature selections built OK on -Linux. And the Kerberized version (K5) works OK on Linux for Telnet and FTP. -14 Oct 2009. - -Changed version number to 9.0. All modules, 16 Oct 2009. - -Need to make LOG SESSION log to a tty. Right now "log session -/dev/ttyKeySerial1" says "Write permission denied" even though the device is -crw-rw-rw-. This happens in zchko(), which is called by cmofi(). The -problem is that /dev/ is not writeable. I added a Unix-only clause that -attempts to open the file for write access using open(), in order to get a -file descriptor, which then can be passed to isatty() to check if it's a -tty, and if so, to allow access. And then close it. I tested this on Mac -OS X as follows: - - log session /dev/ttyKeySerial1 - telnet somehost - -The Mac's serial port was connected to the serial port of another computer -where Kermit displayed the incoming characters in CONNECT mode. Glitches: - - 1. The port has to be set up as desired in advance, outside of Kermit. - 2. log session /dev/ttyKeySerial1 will hang if any required modem signals - are not present when the port is opened. - 3. Bypasses lockfile mechanism - so we do this only if -DNOUUCP. - -For (2), I tried setting O_NDELAY / O_NONBLOCK, and this allowed zchko() to -continue, but then it freezes in the subsequent fopen(). So I changed -zopeno() to also check if the device is a serial port, and if so, to open() -it with O_NDELAY / O_NONBLOCK, and then convert the file descriptor into a -file pointer with fdopen(). - -Now for the speaking device that needs lines to be terminated by NUL... - - set session-log binary <-- need to put these in SHOW LOG - set session-log null-padded (and in HELP SET LOG) - set line /dev/ttyKeySerial1 - -This part works. - -This feature is enabled only for -DNOUUCP builds because serial ports aren't -like other Unix files; we would have to create a lockfile, but we can't do -that... actually, ttlock() takes a name as an argument, but ttunlck() does -not, so there would be no way to remove the lock. Anyway, there is only one -API for configuring the port (speed, flow control, etc) and it only works -with the SET LINE device, not any random file. To fix this would require -massive redesign and changes. ckuus[23].c, ckufio.c, 19-20 Oct 2009. - -I made -DNOUUCP the default for Mac OS X, since everybody winds up building -it that way anyhow. To undo this, do "make macosx KFLAGS=-UNOUUCP". -makefile, 21 Oct 2009. - -Changed SET SESSION-LOG TEXT to strip out ANSI escape sequences; -previously there wasn't that much difference between TEXT and BINARY logs. -It's still not perfect; for example it doesn't delete characters that the -user erased. (Made sure this still builds with -DNOESCSEQ.) -ckucns.c, 22 Oct 2009. - -Changed SHOW LOG to show the SET SESSION-LOG settings, as well as -SET DEBUG, which was not shown before. ckuus5.c, 22 Oct 2009. - -If a series of PUTENV commands is given, each new one undoes the previous -one, so only the last definition is seen by the new fork (or by Kermit -itself). Turns out you can't feed automatic variables to putenv(); they -have to be static, so to allow for multiple PUTENV commands Kermit has to -maintain an array of static strings. ckuus7.c, 6 Nov 2009. - -From Seth Theriault, a better way for the makefile to determine the -Mac OS X version number; there's a program for this, sw_ver. makefile, -6 Nov 2009. - -Peter Eichhorn reported that file-transfer failure hints were not coming -out since Dev.27. The only change I made since then was to skip them if -the file-transfer protocol was not Kermit. I was using the wrong variable -in the tests, 'proto' instead of 'protocol'. ckuus5.c, 6 Nov 2009. - -Changed Mac OS X targets to correctly extract the Mac OS major version -from uname -r in order to choose correctly between utmp and utmpx; this -wasn't working in 10.6.1. makefile, 6 Nov 2009. - -Fix from Seth T. for an oversight in the previous edit. Also add -MACOSX103 to "show features" display. makefile, ckuus5.c, 10 Nov 2009. - -Added REJECT as a synonym for DISCARD in SET FILE COLLISION; it's more -intuitive and more accurate. ckuus[27].c, 15 Nov 2009. - -\fsplit() and \fword() always break on 8-bit characters unless you explicitly -put every single 8-bit value into the include set, e.g. (for a TSV file): - - undef include - for \%i 128 255 1 { - if == \%i 9 continue - .include := \m(include)\fchar(\%i) - } - .\%n := \fsplit(\m(line),&a,\9,\m(include)) - -I changed cksplit() to treat all 8-bit bytes 128-255 as non-break characters -by default. It might have made more sense to do this for 160-255 (since -128-159 are traditionaly C1 control characters) but thanks to Microsoft -tradition is out the window. To treat one or more 8-bit characters as break -characters, put them in the break set. This might break some scripts, but I -doubt it because this flaw was so awful that if anyone had come up against -they would have let me know. ckclib.c, 16 Nov 2009. - -Changed the netbsd target to set -funsigned-char, since cc on NetBSD is -actually gcc. makefile, 16 Nov 2009. - -Changed macosx targets to get the CPU type from the HOSTTYPE environment -variable. Also added getenv("HOSTTYPE") as a last-resort method to set the -\v(cpu) variable at runtime (maybe it should be the first resort?)... -ckuus4.c, makefile, 16 Nov 2009. - -Made sure the solaris9_64 and solaris10 targets still work. 16 Nov 2009. - -Made sure the current source package builds OK on HP-UX 10.20... Got a lot -of "warning 6062: Optdriver: Exceeding compiler resource limits in xxx; some -optimizations skipped. Use +Onolimit if override desired" but it builds OK. -Tested long file transfer; works OK. 17 Nov 2009. - -Built on FreeBSD 7.2 with and without OpenSSL, all OK. 17 Nov 2009. - -Built on NetBSD 5.0.1 with and without OpenSSL, all OK, but netbsd+krb5 -fails with "can't find -lgssapi_krb5"; worked around this with -"K5LIB=-L/usr/local/kerblib" (where the lib actually is on this host) but -then it failed with "ckcftp.c:13868: error: 'gss_nt_service_name' undeclared". -17 Nov 2009. - -I found a VMS 6.2 system... Takes a loooong time to build there. In -ckuusy.c, DEC C didn't like the prototypes and declarations of dorlgarg() -and dotnarg() as static so I made them not static. But that didn't help, -now it fails at the very end, saying the final #ifdef is an invalid -statement. It looks like an #ifdef mismatch that affects only VMS. I ran -my #ifdef matcher, it turned up nothing. I substituted a copy of ckuusy.c -from 2007, it comes up with the same errors. Then I substituted the copy -from 8.0.211 from 2004, and this one compiled OK and, miraculously, the -whole mess even linked OK and runs OK. The Alpha binary is 2.84MB. Now I -have 4500 lines of code to compare.... I went through the two files line by -line and I can't see a single thing wrong. I gave up and tried building the -TCP/IP version. It builds fine except for ckuusy.c, with the utterly -useless error message: - - #endif /* NOCMDL */ - ...................^ - %CC-E-BADSTMT, Invalid statement. - -Indicating the last line in the file. Just for the heck of it, I put -another line after that one: - - /* This is a test */ - -and got: - - /* This is a test */ - ....................^ - %CC-E-BADSTMT, Invalid statement. - -So it is not objecting to anything in the file. Trying the old LISP trick, -I put an extraneous closing bracket after that. Success! Honestly, I don't -see anything wrong with file. It's DEC C V5.3-006. I suspect a C bug. -I'll leave it like this for now until I get access to some other VMS -versions. Another clue is that when building the network version I get a -horrible warning I never saw before from a module that hasn't been touched -in a very long time (ckvrtl.c). Also, in the network version, I note that -the FTP code is not compiled in. We have to try this again with some -command-line switches, but it'll do for now. ckuusy.c, 18 Nov 2009. - ----C-Kermit 9.0 Alpha.01--- - -From Steven Schweda (SMS), the real solution for the VMS closing brace -problem, it wasn't a DECC bug, it was a me bug. ckuusy.c, 20 Nov 2009. - -Rediscovered the new VMS build options: f for Long Files, i for Internal -FTP. "make mnf" doesn't work on VMS 6.2, it looks like the VMS definition -for CK_OFF_T got lost. Same thing with "make mfi". Come back to this later. - -From Gerry Belanger, a fix to INPUT /COUNT:n. ckuus4.c, 26 Nov 2009. - -Added \fsqueeze(s), returns string s with leading and trailing whitespace -removed, Tabs converted to Spaces, and multiple spaces converted to single -spaces. For now, ASCII only, no options. ckuusr.h, ckuus[24].c, 27 Nov 2009. - -I wrote a Kermit script to read a big file of addresses on Solaris 9, -\fsqueeze()ing each line. After about 14000 lines, there was a malloc -failure in getnct() (the command-file reader). There's nothing wrong with -\fsqueeze(), the failure is on a deeper level, because the same thing -happens if I use \fupper() (which is structurally identical to \fsqueeze()) -in the same script. The problem is not in getnct() either, because every -malloc() is freed (I checked). On the other hand, the same script (with -\fupper() instead of \fsqueeze() completes OK in C-Kermit 8.0.201. If I -remove the function call (\fsqueeze() or \fupper()) from the script, it also -runs OK in 9.0. This seems to point the finger at fnevel(), which contains -countless malloc's and free's. But comparing fneval() between 8.0.211 and -9.0, I don't see any difference that would explain this behavior -- nothing -at all that involves malloc(), makstr(), or free(). Nor any pertinent -change in the caller (zzstring) of fneval(). 27 Nov 3009. - -Another problem is that when this happens, the error is not caught (e.g. by -the IF FAIL statement after the command that contains the function call); -instead, C-Kermit returns immediately to its prompt. 27 Nov 2009. - -It could simply be that some of the buffers we allocate are much bigger now. -But again, I don't see much difference between 8.0.211 and 9.0; we were -already allocating 32K command-related buffers (malloc() takes a size_t, and -size_t is an int almost everywere). I built the same source on NetBSD and -ran the same script (with \fqueeze()), and it worked fine. Let's worry -about this later, if it comes up. 27 Nov 2009. - -Built OK on Silicon Graphics IRIX 6.5 R10000; regular build OK, SSL and -Kerberos builds failed. 30 Nov 3009. - -Tried to build on Digital Unix 4.0F but it blew up in ckutio.c, apparently -not recognizing any of the terminal struct symbols from termios.h. Tried -again with gcc, same thing. Tried explicitly #including -within #ifdef TRU64, same thing. What could have changed? 30 Nov 2009. - -Built OK on Linux RHEL5.4/Itanium-2, make linux. The secure build -required "FLAGS=-DNO_KRB5_INIT_ETS" and built OK. 30 Nov 2009. - -Built OK on Digital Unix 4.0F using "make osf" instead of "make tru64-40f". -I don't know why the specific target doesn't work, but it's not worth -chasing down. 2 Dec 2009. - -Built OK on MirBSD 10, despite a lot of gratuitous compiler warnings. Built -OK on MirBSD 10, OpenBSD 4.5, and Fedora 10. 3 Dec 2009. - -(Various other successful Unix builds in these weeks...) - -Built on VMS 7.2 and 8.3 with and without TCP/IP, no problems. 11 Jan 2010. - -Built on VMS 8.3 with "make fi" to include the FTP client and long-file -support (mid Jan 2010). - -Built on VMS 8.3 with UXC 5.6 and HP SSL 1.3, which is OpenSSL 0.9.7e. -It compiled and linked OK but when I tried to make an FTP SSL connection -it crashed in SSL$LIBSSL_SHR, which is called from ssl_auth(), after having -had TLS accepted as an authentication type, but before actually -authenticating. In Unix: - - 19. ftp open ftp.somecompany.com /user:pge.com/test_quota /password:xxxxxx -Connected to ftp.somecompany.com. -220-Somecompany FTP v6.0 for WinSock ready... -220 Welcome to the online storage FTP server. Please check the main web -site for system announcements and AUP. (O) ----> AUTH TLS -234 AUTH command OK. Initializing SSL connection. -TLS accepted as authentication type -SSL DEBUG ACTIVE -=>START SSL/TLS connect on COMMAND - -In VMS: - - 19. ftp open ftp.somecompany.com /user:pge.com/test_quota /password:xxxxxx -Connected to ftp.somecompany.com. -220 Somecompany FTP v6.0 for WinSock ready... ----> AUTH TLS -234 AUTH command OK. Initializing SSL connection. -TLS accepted as authentication type -SSL DEBUG ACTIVE -%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual -address=FFFFFFFF8001A120, PC=000000000068B118, PS=0000001B - -Note: The Unix version received the second 220 response, the VMS version did -not. That's odd, it's the same code... 25 Jan 2010. - -Added some essential details to the HELP FSEEK text. ckuus2.c, 25 Jan 2010. - -Discovered that the result returned by \fsearch() is totally unreliable. -This is probably too hard to fix. - -FSEEK did not pay attention to SET CASE, searches were always case sensitive. -Fixed in ckuus7.c, 26 Jan 2010. - -FSEEK failed to find anything if the search pattern was matched in the first -line of the file. Fixed in ckuus7.c, 26 Jan 2010. - -\fword() and \fsplit().... Another change, but not backwards-incompatible. -One may now put the word ALL (just like that, all uppercase) as the include -set (4th argument) to indicate that there will be no break characters other -than those explicitly given in the break set, e.g. \fsplit(\m(xx),&a,:,ALL) -breaks a line only on a colon (:), nothing else. The original rules for -cksplit() were more than a little counterintuitive: the default break set is -all non alphanums, and the default include set is all alphanums, so if you -wanted to parse (say) a CSV file, breaking only on comma, you had to think -of all the characters you wanted to keep. This way you just say ALL. -ckclib.c, 26 Jan 2010. - -Speaking of CSV files... How can you put comma as a function argument when -comma is the function-argument separator? Use one of these forms: - - \fsplit(\m(xx),&a,",",ALL) - \fsplit(\m(xx),&a,{,},ALL) - \fsplit(\m(xx),&a,\44,ALL) - \fsplit(\m(xx),&a,\fchar(44),ALL) - -From John Dunlap, U. of Washington Applied Physics Lab: 'When "stty -a < -/dev/ttyS0 | grep crtscts" shows "crtscts" (not "-crtscts") and when using a -three wire serial interface and when asking kermit to not use flow control -(set flow none) then "ckutio.c1" (see attachments) fails while "ckutio.c" -works. The result of "diff -u ckutio.c1 ckutio.c" is attached as "diffs"'. -ckutio.c, 26 Jan 2010. - -Changed the year from 2009 to 2010 in the modules I worked on today and in -the heralds, etc. ckckmai.c, ckuus5.c, ckutio.c, ckclib.c, ckuus7.c, -26 Jan 2010. - -Built on Linux Fedora Core 3, regular and with OpenSSL 0.9.7a. Built on -Ubuntu 9.4 OK, but SSL and Kerberos builds failed due to not finding libs -and/or header files. I'm sure this could be fixed... 27 Jan 2010. - -Added SSL, KRB4, and KRB5 to the startup herald for versions that were -built with SSL, Kerberos 4, or Kerberos 5. Built OK on Fedora 3 with -linux+krb5+ssl and new banner shows correctly. ckuus5.c, 27 Jan 2010. - -Set NO_KRB5_INIT_ETS by default in ckuath.h since krb5_init_ets() is a no-op -in Kerberos 1.4.x and later and in some installations it can't be found, -which clobbers the build. ckuath.h, 27 Jan 2010. - -Adapted to MINIX 3 1.5, the first version that has virtual memory according -to Andy T, who should know. On earlier versions (e.g. MINIX 3 1.2) any -attempt to build C-Kermit causes the compiler to crash. Now the compiler -doesn't crash but it spews out countless warnings about old-fashioned -function declarations that I don't get anywhere else. The real problems -came in ckutio.c where numerous symbols were undefined at compile time and -the POSIX function tcgetpgrp() was not found at link time, even though there -is a prototype for it in the MINIX header files, and there is no alternative -(since POSIX doesn't let us use ioctl()). Also note that there is some -confusion over the compile-time symbols MINIX, MINIX2, MINIX3, and MINIX315. -You would expect MINIX to mean "any version of MINIX" but in some parts of -ckutio.c it means MINIX 1.0. I sincerely doubt that C-Kermit 9.0 can be -built on any version of Minix before 3.1.5 so I removed the confusion and -made MINIX mean "any Minix". It builds on 3.1.5 OK now, except for the FTP -client. This can probably be fixed but... Modules changed: ckcdeb.h, -ckuver.h, ckcmai.c, ckuus5.c, ckutio.c, 1 Feb 2010. - -Later.. Andy says MINIX does not support job control, so no program is ever -in the background. That settles that! 1 Feb 2010. - -Built OK on Minix, Linux, Mac OS X, Solaris 9, NetBSD 5.0.1... 1 Feb 2010. - ----C-Kermit 9.0 Alpha.02--- - -From Christian Corti at Uni-Stuttgart.de: fixes to allow building on SunOS -4.1, which once was my main development platform but which is long-gone from -here. ckupty.c, ckutio.c, 9 Feb 2010. (He says it is also necessary to -comment out the "struct winsize" and "struct ttysize" in sys/ioctl.h; -otherwise there will be a conflict with sys/ttycom.h (included by termios.h) -which also declares these structs. But you need both includes.') - -From John Dunlap, a fix for Kermit protocol fixed packet-timeout interval -going to a unexpected value (missing else clause in two places). -ckcfn2.c, 9 Feb 2010. - -Added an aixg target to build on AIX with gcc when gcc is not installed as -cc, and also added CC=$(CC) CC2=$(CC) clauses to the aix and aix+ssl -targets. Wow, AIX really loses bigtime when receiving files through its ssh -server. Streaming can't be used, sliding windows recover from errors but -there are tons of them using the default 4K packets; 500 works much better. -Built with IBM cc and gcc, and also tested (successfully) the new aix+ibmssl -target, in which the OpenSSL headers and libs are in a standard place. -makefile, 9 Feb 2010. - -In ckupty.h, make the #include be #ifndef SUNOS41. -From Christian Corti. 10 Feb 2010. - -Built on VMS E8.4. 12 Feb 2010. - -Tried to build on a real VAX-11/785 but the machine seems to be seriously -wedged. 12-15 Feb 2010. - -Added note to CKVKER.COM to the effect the the 'f' option has no effect -on VAX architecture. 15 Feb 2010. - -Moved the #include "ckvrtl.h" in the FTP module to below the include for -utime.h, because building the VMS version with the 'i' option (meaning -"include internal ftp client") results in "struct utimbuf tp" erroring out -because struct utimbuf is not defined yet (at least in some version of VMS -with some version of C). From Rob Brown, ckcftp.c, 20 Feb 2010. - -From Martin Vorlaender: new code in VMS C-Kermit build procedure to detect -OpenSSL version automatically. ckvker.com, 22 Feb 2010. - -Added code to INPUT command to strip ANSI escape sequences. It's activated -by SET SESSION-LOG TEXT. ckuusr.h: added prototype for chkaes(); -ckucon.c, ckucns.c: made inesc[] and oldesc[] global instead of static; -ckuus4.c: doinput() code for skipping escape sequences. 1 Mar 2010. - -Peter Eichhorn complained that if you make an ssh connection with Kermit, -then log out from the ssh host, and then use a "connect" command to -make a new connection to the same host (which you can do with Telnet), -Kermit says (e.g.): - - DNS Lookup... Can't get address for ssh -e none somehostname - Sorry, can't open ssh -e none somehostname: Error 0 - -I added code to detect and handle this case and it seems to work OK, even -though it's kind of a hack. ckuusr.[ch], ckuus7.c, 1 Mar 2010. - -There has never been a clean way to put debugging messages (ECHO commands) -in a script which are executed only if debugging is desired and ignored -otherwise. You'd have to set a random variable and test it, or define a -macro or whatever. To make this more straightforward, I added SET DEBUG -MESSAGE ON/OFF/STDERR, and added a new MESSAGE (syn: MSG) command for printing -debugging messages to stdout if SET DEBUG MESSAGE is ON or to stderr if SET -DEBUG MESSAGE is STDERR. ckcmai.c, ckuus[r23].c, 12 Mar 2010. - -Also for debugging and error messages, I added \v(lastcommmand) so that -the command that failed can be included in an IF FAIL or DEBUG error message. -This works even for commands that have syntax errors. -ckuusr.h, ckuus5.c, ckucmd.c, 12 Mar 2010. - -From SMS for VMS: 'Added/documented P3 options INTSELECT, OLDFIB, OLDIP. -Disabled (commented out) automatic definition of NOSETTIME for VMS before -V7.2 (vms_ver .lts. "VMS_V72").' ckcdeb.h, ckcftp.c, ckcnet.c, ckuus[2567].c, -ckvfio.c, ckvker.com, ckvrtl.[ch], 15 Mar 2010. - -Exposed inesc[] and oldesc[] for VMS, so new INPUT command escape-sequence -stripping can work (really, chkaes() and related global variables should be -moved out of ck[uvd]con.c/ckucns.c and into a common module; do that later). -ckuusr.h, ckvcon.c, 15 Mar 2010. - -Built OK on Solaris9, Mac OS X 10.4.11, RHEL4 (32-bit), RHEL5 (64-bit), -AIX 5.3, SCO OpenServr 6.0.0... 15 Mar 2010. - -Not so good on VMS, turns out I made a typo in one of the VMS updates -(#ifndef OLDIP instead of #ifdef...). ckcnet.c, 16 Mar 2010. - -More from SMS for VMS, 16 Mar 2010: - . Set MAXPATH correctly for VMS, ckcdeb.h. - . NAM -> NAML, QIO replaces system( "SET PROTECTION"), bugfixes in - cvtdir() and nzltor(), ... (See comments): ckvfio.c, new ckvrms.h. - (The RMS code in ckvfio.c was almost totally rewritten) - . Moved "NAMX$*" (and related) macros to ckvrms.h, and renamed to - "NAMX_*" (and similar "$" -> "_"), moved "FIB_*" macros from ckvrtl.c. - -These changes are mainly to accommodate the ODS5 file system, which has -longer and mixed-case filenames, and also to execute certain commands -(e.g. for setting file protection, deleting directories) directly instead -of using a system() command. - -Built OK on VMS 8.3 (with and without network support). 16 Mar 2010. - -Failed to build on VMS 6.2. 16 Mar 2010. - -FreeBSD 8.0 has a hexdump() prototype that conflicts with the -hexdump macro defined in ckcdeb.h. Since the same thing is likely to happen -elsewhere, I changed the Kermit macro to ckhexdump as well all references to -it: ckcdeb.h, ckcftp.c, ckcnet.c, ckctel.c, ckuath.c, ckutio.c, 16 Mar 2010. - -Built OK on Digital Unix Tru-64 4.0E using "make osf", 16 Mar 2010. - -Tried again to build Digital Unix Tru64 4.0E using "make tru64-40e", but -something prevents it from picking up the termios symbols and it blows up in -ckutio.c, whereas this used to work in earlier C-Kermit versions. This is -the only Tru64 system I still have access to, so I can't tell if it's a -local peculiarity or what. Note that POSIX is not defined for this build. -But if I define it, I get into trouble with "struct timeval". Tried again -with "KFLAGS=-DPOSIX -DNOTIMEVAL" but that doesn't help. Tried "make -dec-osf" and that worked OK but oddly enough it makes a Kermit with less -features than "make osf". 16 Mar 2010. - -To go with MESSAGE and SET DEBUG MESSAGE, I added IF DEBUG, which is true -if SET DEBUG MESSAGE is not OFF and false otherwise. ckuusr.h, ckuus6.c, -16 Mar 2010. - -From SMS: Corrections to my merging of SMS's changes, ckcftp.c, ckvrtl.h. -Builds OK on VMS 6.2 now. Also did an SSL build on VMS 8.3 with OpenSSL -m0.9.7e and "OPENSSL_DISABLE_OLD_DES_SUPPORT" was included in P3 -automatically by Martin V's addition to ckvker.com. 17 Mar 2010. - -From SMS: #include earlier for VMS in ckcdeb.h to pick up off_t -before it is referenced. This allows C-Kermit to compile on VMS/Alpha 6.2 -but linking fails on fseeko() and ftello() (and yet, a functional executable -is created, and FSEEK works right). Builds the same way with no problems at -all on VMS 8.3 / Alpha. In this case we get the full 64-bit arithmetic... -Well, 62 bits: - - ATLAS::C-Kermit>( ^ 2 63) - 9223372036854775000.0 - ATLAS::C-Kermit>( ^ 2 62) - 4611686018427387904 - -whereas on VMS 6.2 we get integers only up to (^ 2 30). 17 Mar 2010. - -Changed the VMS build procedure to enable large file support automatically -for non-VAX and VMS 7.3 or greater. No reason not to include this feature. -Changed the sense of the F option to DISABLE large file support in the -unlikely case that C-Kermit is being built on a suitable platform but the -C library is older than VMS73_ACRTL-V0200, in which case fseeko() and -ftello() will come up missing at link time. ckvker.com, 18 Mar 2010. - -Changed VMS build procedure to include the FTP client in any network build -by default. Changed the sense of the I option to exclude the FTP client, -in case anybody would want to do that. ckvker.com, 18 Mar 2010. - -From SMS: updated dependencies in CKVKER.COM, fix the "don't reinclude me" -clause in CKVRTL.H. 19 Mar 2010. - -Built OK on VMS 6.2 and 8.3 with and without networking. Large file support -included automatically in VMS 8.3 FTP client included automatically in both -network builds. 19 Mar 2010. - -Changed hexdump() to ckhexdump() in ck_crp.c, which I missed before. -19 Mar 2010. - ----C-Kermit 9.0 Alpha.03--- - -In HP-UX with the bundled-non ANSI compiler, we get warnings about functions -such as endusershell(), which are declared void in the header files. But in -non-ANSI builds we defind VOID to be int rather than void, so our prototypes -are wrong. I checked that HP-UX 9, 10, and 11 all have void datatype and -changed the definition of VOID to void in those cases. ckcdeb.h, 29 Mar 2010. - -Fixed a typo in a debug() statement in cksplit() that was causing some -warnings. ckclib.c, 29 Mar 2010. - -Ditto in tls_load_certs(). ck_ssl.c, 29 Mar 2010. - -"make hpux1000o+ssl" files with: -/usr/ccs/bin/ld: Unsatisfied symbols: - __umoddi3 (code) - __udivdi3 (code) - __eprintf (code) - -It appears that OpenSSL (0.9.7c in this case) requires -lgcc. -And indeed hpux1000gcc+ssl builds fine. 29 Mar 2010. - -There are various warnings in the SSL code in ckutio.c, ckcftp.c, and -ckcnet.c about pointers not being assignment compatible, but I have learned -from experience not to try to fix these (see notes from 6 Oct 2009). -29 Mar 2010. - -connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)): In FTP, -this doesn't work on RHEL5 / Mac OX X 6.1/2 64-bit. But the connect() in -Telnet works. On Mac OS X 6.2 I tried changing the socket() call to be like -the one in ckcnet.c for Telnet, but it made no difference. On a RHEL5.4 -system on i386, FTP works fine, so it's not the Red Hat version. On Digital -Unix 4.0E 64-bit, same thing: - - 11:23:10.722 ftp_hookup[kermit.columbia.edu]=21 - 11:23:10.722 ftp hookup A[kermit.columbia.edu] - 11:23:10.722 ftp hookup C[kermit.columbia.edu] - 11:23:10.722 ftp hookup socket=4 - 11:23:10.722 ftp hookup HADDRLIST - 11:23:10.723 ftp hookup connect failed=13 - 11:23:10.723 ftp hookup bad - -13 = Permission denied: - - [EACCESS] Search permission is denied for a component of the path prefix; - or write access to the named socket is denied. - -On Gentoo Linux, also on Alpha, the errno is 51: Network is unreachable. -Clearly some data type in the sockets structs is out of whack. - -The third connect() argument is "address length". The address is a -struct sockaddr. About the third argument, RHEL5 "man connect" says: - - The third argument of connect() is in reality an int (and this is what - 4.x BSD and libc4 and libc5 have). Some POSIX confusion resulted in - the present socklen_t, also used by glibc. See also accept(2). - -Building on RHEL5 on x86_64, where size_t is 8 and socklen_t is 4, I get a -warning: - - ckcftp.c: In function 'ftp_hookup': - ckcftp.c:14667: warning: - comparison is always true due to limited range of data - -Referring to: - - if (hisctladdr.sin_addr.s_addr != (unsigned long) -1) - -This seems to be the problem; if I remove the (unsigned long) cast (in two -places), the problem goes away. Actually what I should be comparing it with -is INADDR_NONE, which is defined appropriately in some header file, e.g. as -0xffffffff. Also I define it explicitly as -1 if it is not defined in any -header file (as is the case in Solaris 9). Tested OK on 64-bit RHEL5, -32-bit RHEL5, Digital Unix 4.0E 64-bit, Solaris 9 32-bit, Mac OS X 10.4.11 -32-bit, Mac OS X 10.6.3 64-bit, AIX 5.3, Gentoo Linux 2.6.31 on Alpha -64-bit, NetBSD 5.0.1 32-bit.... ckcftp.c, 29 Mar 2010. - ----C-Kermit 9.0 Alpha.04--- - -Yesterday's VOID redefinition caused problems for HP-UX in ckuusx.c, in the -curses section where VOID is undef'd and not used to avoid a conflict with -curses.h. As a workaround I defined a new macro CKVOID with the same -definition as VOID and used it in the offending section of ckuusx. The real -solution is to replace all references to VOID with CKVOID (since VOID is -increasingly likely to cause conflicts), but a mass search and replace is -not without risks. ckcdeb.h, ckuusx.c, 30 Mar 2010. - -Changed VOID and CKVOID definition to be 'void' for all HP-UX (verified by -PeterE back to HP-UX 6.5, 1989). Still need to check this on HP-UX 5.21; -if that's an exception it can be done in the makefile. ckcdeb.h, 30 Mar 2010. - -The change I made to allow CONNECT to reestablish a previous SSH connection -prevented a new SSH connection to a different host to be made. Fixed in -ckuus7.c, 30 Mar 2010. - -Fixed mistaken extern declarations of krb4_errno and krb5_errno as strings -in nvlook(); they are ints. Built OK on Mac OS X 10.6.3. ckuus4.c, 30 Mar 2010. - -A fix to Trusted HP-UX makefile target from PeterE, to account for the -equivalence of +openssl and +ssl as target suffixes. 30 Mar 2010. - -Added a new function \fcvtcsets(string,cset1,cset1) that converts a string -from one character set to another. The csets are File Character-Set names. -ckuus4.c, 31 Mar 2010. - -Added a new function \fdecodehex(string,prefix) that decodes a string -containing prefixed hex bytes. Default prefix is %%, but any prefix of -one of two chars (such as % or 0x) can be specified. ckuusr.h, ckclib.h, -ckclib.c, ckuusr.c, 31 Mar 2010. - -Richard Nolde reports that Kermit can't find -lpam on Fedora 12 because it's -in /lib rather than /usr/lib. RHEL5 has symlinks, FC12 should too. Added a -note to the makefile. 1 Apr 2010. - -Build on Solaris 11 for the first time. Had to adjust ckuver.h to get the -version herald right. This was on a box that reported its architecture as -i86pc. 1 Apr 2010. - -Added MIME character-set names as invisible synonyms in the file and -terminal character-set tables, fcstab[] and tcstab[]. Note that not all the -character sets known to Kermit are registered in MIME. But at least now -MIME-registered character sets can be referred to by their MIME names, e.g. -ISO-8859-1, ISO646-ES, IBM437, WINDOWS-1252. These are not listed if you -type ? in a field that is parsing them, unless you type a letter first, -e.g. "i?" lists ISO- and IBM set names. Later maybe I'll make parallel -tables, or keyword attribute bit that says whether a name is MIME or not. -The real benefit of this change is that now Kermit can take its -character-set names from external sources like email headers or web logs. -ckuxla.c, 1 Apr 2010. - -Changed the IF command to accept a bare macro name its condition. This will -parse and execute correctly if the macro is defined and if it has a numeric -value, or if it is not defined, in which case it evaluates to 0 (FALSE). If -it is defined but has a non-numeric value, a parse error occurs. ckuus6.c, -2 Apr 2010. - -Added \fstringtype() function. Given a string argument, it tells whether -the string is 7bit, 8bit, utf8, binary, etc. ckuusr.h, ckuus[4x].c, -2 Apr 2010. - -Did a few builds to make sure there were no booboos. Solaris 9, NetBSD -5.01, Linux RHEL4, HP-UX 10.20 (non-ANSI compiler and ANSI optimizing -compiler), Mac OS X 10.4.11, SCO OSR 6.00. 5 Apr 2010. - ----C-Kermit 9.0 Alpha.05--- - -Increased maximum variable name length from 4K to 16K. Verified that -too-long names are caught and recovered from correctly. ckuusr.h, 6 Apr 2010. - -Implemented a new \fsplit() option for parsing CSV files, which turns out to -be a little complicated, because the separator is not just a comma, but a -comma and all its surrounding spaces. Also there are special quoting rules -for fields with embedded commas and fields with embedded quotes. ckclib.c, -7 Apr 2010. - ----C-Kermit 9.0 Alpha.06--- - -VMS changes from SMS. They build OK, Kermit file transfers are still OK, -but FTP text-mode GETs always hang on the 10th 8K network read. Couldn't -get a debug log this time. ckcmai.c, ckvfio.c, ckvrms.h, ckvker.com. -8 Apr 2010. - -Changing VNAML from 4K to 16K broke the build on HP-UX 9. Put it back to -4K. 9 Apr 2010. - -John Dunlap, running days-long stress tests between E-Kermit and C-Kermit, -found a bug in the packet-reading and -decoding code: If a NAK packet -arrives with its length field corrupted to indicate a bigger size, and there -are enough bytes following in the pipeline, ttinl() will return a too-long -packet (if there are not enough bytes waiting to be read, then ttinl() will -properly time out). In the bad case rpack() trusts the packet length, uses -it as the basis for computation of the block-check length, which is then -used to access memory that might not be there, causing (at least on John's -Linux system) a segmentation fault. John added the normal clause to check -the result of the block-check calculation, and I changed ttinl() to always -break on the eol character (normally carriage return), since this can never -appear in a packet, even if we "set control unprefix all". Also added a -check to ttinl() to protect against length fields corrupted into illegal -values. ckcfn2.c, ckutio.c, 13 Apr 2010. - -From Lewis McCarthy: - Based on code inspection, C-Kermit appears to have an SSL-related security - vulnerability analogous to that identified as CVE-2009-3767 (see e.g. - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3767). - - I'm attaching a patch for this issue relative to the revision of ck_ssl.c - obtained from a copy of http://www.columbia.edu/kermit/ftp/test/tar/x.zip - downloaded on 2010/07/30, which I believe is the latest. - - When this flaw was first widely publicized at last year's Black Hat - conference, it was claimed that some public certificate authorities had - indeed issued certificates that could be used to exploit this class of - vulnerability. As far as I know they have not revealed specifically which - public CA(s) had been found issuing such certificates. - Some references: http://www.mseclab.com/?p=180 - http://www.theregister.co.uk/2009/07/30/universal_ssl_certificate/ - -Patches added to ck_ssl.c, 4 Aug 2010. - -Peter Eichhorn reported that "RENAME ../x ." didn't work. This is a side -effect of the changes of 2006 to the RENAME command, there was a little -confusion in the renameone() routine; fixed in ckuus6.c, 4 Aug 2010. - -If only one file is FOPEN'd, FCLOSE given with no arguments would close it. -Turns out to be a bad idea. Example: program with an input and output file, -try to close the output file before it is opened by just typing FCLOSE; this -can mess up the input file. For safety FCLOSE has to require a channel -number or ALL. ckuus7.c, 4 Aug 2010. - -Added \fstrcmp(s1,s2,case,start,length), which has the advantage over IF -EQU,LGT,LLT that case senstivity can be specified as a function arg, and -also substrings can be specified. ckuusr.h, ckuus[24].c, 5 Aug 2010. - -The CSV feature of Alpha.06 had a subtle flaw, namely that if the last item -in a comma separated list was enclosed within doublequotes with a trailing -space after the closing doublequote, a spurious empty final element would be -created in the result array. Fixed in cksplit(), ckclib.c, 5 Aug 2010. - ----Alpha.07--- - -The CSV feature of \fsplit() splits a comma-separated list into an array. -To turn the array back into a comma separated list, \fjoin(&a,\44,1) almost -works, except for elements contain literal doublequotes, such as: - - Mohammad "The Greatest" Ali - -This calls for making a symbolic CSV argument for \fjoin() like the one that -was made for \fsplit(): \fjoin(&a,CSV). Also \fjoin(&a,TSV) for -Tab-separated list. Thus if Kermit reads a record in CSV format, splits it -into an array, and then joins the array back into a CSV record, the result -will be equivalent to the original, according to the CSV definition. It -might not be identical, because if the result had extraneous spaces before -or after the separating commas, these are discarded, but that does not -affect the elements themselves. Furthermore it is now possible to convert -a comma-separated list into a tab-separated list, and vice versa (which is -not a simple matter of changing commas to tabs or vice versa). ckuus4.c, -12 Aug 2010. - -From Joop Boonen 26 Juli 2010: "Added HAVE_LOCKDEV as openSuSE >= 11.3 uses -lockdev but not baudboy. They use ttylock directly. The program code has -been added so the the program works without a problem." makefile, ckcdeb.h, -ckutio.c, ckuus5.c, 23 Aug 2010. - ----Alpha.08--- - -From Gary Mills at the U of Manitoba: convert Solaris version from BSD ptys -to streams ptys because there are only 48 BSD-style ptys and he was running -out. No code changes needed, the only change necessary was to add the -following flags to the makefile target: - - -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME - -DPUSH_PTEM -DPUSH_LDTERM -DPUSH_TTCOMPAT - -makefile, ckcmai.c, 21 Sep 2010. - -Testing this in Solaris 9 I see that the DES library disappeared. Added -code to the solaris9 targets (also used by Solaris 10 and 11) to check for -this. makefile, 21 Sep 2010. - -The Solaris target checked the OpenSSL version automatically to set the -right flag, the Linux target didn't. Put the OpenSSL-version testing code -in the Linux target too. makefile, 21 Sep 2010. - -A couple minor changes to the tru64-51b makefile targets from Steven Schweda -but there still are some problems with the Tru64 Unix builds. -makefile, 21 Sep 2010. - ----Alpha.09--- - -\fcontents(\&a[3]) got an error if the array was declared but its dimension -was less than 3, which is bad when dealing with (say) an array created -dynamically by \fsplit(), which might or might not have a third element. -In case it doesn't -- i.e. in case we are referring to an out of range -element of any array that is declared -- we should just return a null -string, as we do with other types of variables that are not defined. -For that matter, ditto even if the array is not declared; what useful -purpose is served by throwing an error in this case? -ckuus4.c, 30 Dec 2010. - -cksplit() treats \ as a quoting character. If the source string contains -backslashes, they are swallowed (or, if doubled, one is kept). That's not -good for parsing external data, such as lines read from files, where there -are no quoting rules. This came up when parsing CSV files; as a workaround, -I made \fsplit() treat backslash as an ordinary character for CSV and TSV -splitting (a better solution might be yet another argument that specifies -a quote character). ckclib.c, 30 Dec 2010. - -Began converting C-Kermit to Open Source with the Simplified 3-Clause BSD -license. Updated the text for the INTRO, LICENSE, NEWS, and SUPPORT -commands. Fixed things so the copyright year to be displayed is defined in -one place (ck_cryear in ckcmai.c), rather than hardwired into text strings -all over the place. COPYING.TXT, ckcmai.c, ckuus[256].c, 2 Jun 2011. - -When I added MIME synonyms for Kermit character-set names, I left a bogus -entry in the tables ("windows-1251") that was in the wrong place -alphabetically, thus preventing most references to file character-set names -from working right. Removed the bogus entry. ckuxla.c, 2 Jun 2011. - -Most combinations work OK, but not translating Cyrillic text from UTF-8 -to Latin/Cyrillic, and probably the same would be true for any case of -converting from UTF-8 or UCS-2 to anything else. The problem was in -xgnbyte(), which converts the input stream from the specified character to -UCS2; it needed to make a special case for when the input file was already -Unicode. Believe it or not, this problem occurred at least as far back as -8.0.201 (9.5 years ago) and nobody noticed. So if the fix isn't perfect -probably nobody will notice that either. ckcfns.c, 3 Jun 2011. - -The SET BLOCK CHECK command did not parse all the items in its keyword -list. Fixed in ckuus3.c, 3 Jun 2011. - -For EM-APEX ocean floats project, where buoys in stormy waters have to -transmit data through an earth satellite using non-error-correcting modems, -John Dunlap ran exhaustive stress tests of Kermit protocol transfers through -a simulated connection that injected errors and delays and identified a -weakness in Kermit protocol when it is used under extremely bad conditions: -If a data byte of the S packet (or its Ack) is corrupted and the 1-byte -checksum is also corrupted in such a way that that the checksum matches the -corrupted data, the two Kermit programs will disagree as to the negotiated -parameters. For example, if file Sender's RPT field is changed from '~' to -'^', the receiver will decode the packet incorrectly. Ditto for most of the -other parameters. The result is that a corrupted file is received but -reported correct. John suggested a new mode of operation in which the Type -3 block check is used for all packets. Such a mode can not be negotiated -because the negotiation packet itself is assumed by all Kermit programs to -have a 1-byte checksum. Added SET BLOCK-CHECK 5 to the parser (with -invisible synonym FORCE-3". ckuus3.c, 3 Jun 2011. - -Added supporting code for SET BLOCK 5: ckcfn[23].c, ckcpro.w, ckcmai.c, -ckuus3.c, 3 Jun 2011. - -Added code to skip the heuristic that S and I packets always have block -check type 1. File transfer OK between two C-Kermits with SET BLOCK 5. -rpack(): ckcfn2.c, 5 Jun 2011. - -Made the file receiver put "5" in the block-check-type in its ACK to the -S-Packet. spar(): ckcfns.c, 5 Jun 2011. - -Now the question is: Can we make the file receiver automatically and safely -recognize a three-byte block check on an incoming S or I packet? It's -tricky because the block check field is not self-identified, it's just the -last "n" characters of string indicated by the length field, so correct -decoding of the packet depends on stateful knowledge of "n". How about this: -rpack() already knows what type of packet it is, so if it's an S or I packet -and the 8th byte of the data field is "5" and last 3 bytes, when interpreted -as the CRC, match the packet contents, then we accept the packet and switch -to BLOCK 5 mode. - -On the other hand, if the "5" was put there by corruption, the CRC should -catch the error. In that case we NAK the packet and presumabely get a -different version back. There would be no reason to try to re-read the same -packet with a different block check, because the "5" could not possibly be -there legitimately unless it had a 3-byte CRC. To be clear, this is -cheating. We read the packet contents before we know the packet is correct, -then we check that it *is* correct. I made the 4-line change to rpack() -and it works OK in the absense of transmission errors. ckcfn2.c, 3 Jun 2011. - -So the various combinations should work as desired: - - . Sender and receiver both support and are told to SET BLOCK 5 ("SB5"). - . Sender SB5, but receiver doesn't support it (errors out). - . Sender SB5, receiver supports it but wasn't told (auto-recognizes it). - . Receiver SB5 but sender no (errors out). - -Note in the last case, the receiver should NOT automatically fall back to -standard behavior because if the user said SET BLOCK 5 that means every -packet MUST be protected by CRC to prevent the I/S packets from being -corrupted. - -Installed new HELP SET BLOCK-CHECK text. ckuus2.c, 5 Jun 2011. - -Autodownload didn't work when the S or I packet had a 3-byte block check -because kstart() checked it for a 1-byte checksum. Fixed in kstart(), -ckcfn2.c, 6 Jun 2011. However, older Kermit versions and programs that -claim to do "autodownload" will never recognize this type of packet. No -big deal since even if they did, the transfer would fail anyway. - -Added 'FORCE 3' to E-Kermit, called it EK 1.7. The option is "-b 5". Works -OK for sending and receiving, both with and without the new option. Also -works with "-b 5" if you send an S packet to it with '5' in the BCT field. -Changes were minimal, I have them all in ek17.diff. - -I could probably also make a new G-Kermit in about 10 minutes, but who cares -about G-Kermit... We already have two useful Kermit programs that -interoperate with the new protocol. 6 Jun 2011. - -Replaced the very inadequate help texts for functions \fword() and -\fsplit() with new ones. ckuus2.c, 6 Jun 2011. - -There were a couple reports of file corruption that I was saving for later. -Now that now is later I dug up the messages, files, and logs and it turns -out that nobody had reported a reproducible case of Kermit corrupting a -file. There have been non-reproducible cases though, almost certainly due -to corruption of the S or I packet or its ACK, which is why we now have SET -BLOCK 5. Even with BLOCK CHECK 5, there is no guarantee that the same thing -won't happen, it is just far less likely. Even if we added a 32-bit CRC or -even 64-bit one, there would still be a small chance it could happen. - -7 Jun 2011: - -Corrected various #ifdefs (or lack of them) when building C-Kermit with -different combinations of feature-selection options such as NOCSETS, NOICP, -NOLOCAL, NOSPL, NOUNICODE, etc. ckcfns.c ckcmai.c ckcxla.h ckuus2.c -ckuus4.c ckuus5.c ckuus6.c ckuusr.c, 7 Jun 2011. After running the script -that does all these builds (84 of them) I ran it again to make sure that -none of the changes broke builds that succeeded before the changes were made. - -Built OK on Solaris9 ("make solaris9") -Ditto with Krb5 and OpenSSL 0.9.8q ("make solaris9g+openssl+shadow+pam+zlib") - -Built OK on Mac OS X 10.4.11 ("make macosx"). -Also "make macosx+krb5+openssl. - -Built OK on Linux RHEL4 ("make linux"). -Built OK on Linux RHEL4 with OpenSSL 0.9.7a ("make linux+ssl"). -Built OK on Linux RHEL5 ("make linux"). - -"make linux+ssl" fails on RHEL5 because of DES, even though the target -tests for the presence or absence of the DES libraries. In this case the -libraries are there but they lack the functions des_ecb3_encrypt, -des_random_seed, and des_set_odd_parity. The build succeeds as: - - make linux+ssl KFLAGS=-UCK_SSL - -Since DES is now considered harmful, Jeff Altman suggests that all OpenSSL -builds, even for old versions, should omit it ("If you are building with -openssl and no kerberos or srp, just disable DES. Disabling DES will impact -telnet and rlogin but it won't matter if you have no ability to negotiate a -session key"). - -From Ian Beckwith, patches for Debian Linux: - . Change all '-' to '\(hy' in man page (new pedantry): ckuker.nr. - . Make IKSD authentication (using PAM) ask for a password when an invalid - username has been given, to avoid disclosing which account names are valid: - ckufio.c, ckuus7.c. - . Fix spelling errors: ckcftp.c, ckuus2.c, ckuker.nr, ckcpro.w, ckuusr.h. - . Patch makefile to support install to a staging area with DESTDIR. - . Some other patches (mainly for typos) were for plain-text documentation - files that were generated from Web pages; I updated the web pages. - -A big corporate C-Kermit user has an application where a local C-Kermit -makes a connection to a remote one, uploads some files, and then if the -server has any new patch files for the local, it sends the patches and -does a REMOTE HOST command to run the patch program. This stopped working -in C-Kermit 6.0 or 7.0 when I put a check to prevent it, because "it makes -no sense to send REMOTE commands to the local end, because the results are -sent back to the remote to be displayed on its screen but it has no screen". -That may be true, but if the user needs to control the local from the -remote, they should be able to. I removed the checks. This doesn't solve -the problem of where the output goes; ideally it would go to the local -screen but I don't see any elegant and simple way to make that change. -However the output redirectors can still be used with the REMOTE command -so the results can be captured to a remote file, which could then be sent. -ckuus7.c, 7 Jun 2011. - -Changed SET VARIABLE-EVALUATION to SET COMMAND VARIABLE-EVALUATION, but left -the former version available. ckuusr.c, 9 Jun 2011. - -Documented the SET COMMAND VARIABLE-EVALUATION command, which I added in -2008. ck90.html, 9 Jun 2011. - -Renamed all old Mac OS X makefile targets to have the prefix "old" to avoid -confusing them with the current targets, and made macosx10 a synonym for -macosx, so those who used previous makefiles will get a current target -without having to know the new name. makefile, 9 Jun 2011. - -Added XMESSAGE, which is to MESSAGE as XECHO is ECHO: prints the text -without a line terminator, so it can be continued by subsequent [X]MESSAGE -commands. ckuusr.[ch], 9 Jun 2011. - -Back to "make linux+ssl" on RHEL5... I took the coward's way out and added -code to the makefile target to check whether the build worked (somebody let -me know if there is a better way to check), and if not to give a message -suggesting they "make clean ; make linux+ssl KFLAGS=-UCK_DES". makefile, -9 Jun 2011. - -Noticed that \frecurse() would dump core if called with no arguments. -Fixed in ckuus4.c, 9 Jun 2011. - -Added \q() as an alternative to the more verbose \fliteral() for quoting -strings that contain characters (like \) that would otherwise be significant -to Kermit. It's more efficient because it isn't a function call, and 'q' -is an intuitive letter to mean 'quote'. It also works better than -\fliteral() because functions treat commas and braces specially. ckuus4.c, -10 Jun 2011. - -Built OK on VMS 8.3 on Alpha, no net. DEC C caught a couple glitches in the -new code that gcc didn't catch, which I fixed. ckuus[25].c, 10 Jun 2011. - -Built OK on VMS 8.3 on Alpha with Multinet 5.3. The SSL build failed but -I'm not going to worry about it. 10 Jun 2011. - -Built OK on NetBSD 5.1. 10 Jun 2011. - -Tried to resurrect my old "build-all" machine, an IBM Netfinity 3500 from -1997 with 20-some mountable bootable hard disks with lots of 1990s OS's on -them. No dice. I can see the BIOS but not the hard disks. The -configuration is still correct because it tries to boot from the mountable -hard disk, but it fails (I tried six different ones). - -Tried to resurrect my old Siemens Nixdorf RM 200 MIPS machine. Booted OK, -headless even, but makes a hellish high-pitched whine, like a dentist drill. -It's pretty slow too. "make sinix542" (for SINIX 5.4.2) bombed at link -time on no rdchk(). Fixed by #including . ckutio.c, 10 Jun 2011. - -Tried to resurrect my old SCO Xenix 2.3.4 machine, also headless. Amazingly -it still works; it can't use a monitor but I can Telnet to it. Had to tweak -some #ifdefs but I got a no-net version built successfully. According to my -notes, it hasn't been possible to build with TCP/IP since C-Kermit 8.0, -but how many people ever had SCO Xenix 2.3.4 with TCP/IP anyway? Anyway we -still have the binaries for C-Kermit 7.0. ckuus4.c, 10 Jun 2011. - -Built OK on AIX 5.3. Built OK on Solaris 10. 11 Jun 2011. - -Tried harder to revive the build-all machine, now it sort of works, but not -all of the bootable OS's work. Built C-Kermit 9.0 OK on OpenBSD 3.0. Built -OK on QNX 4.25 but had to #ifdef references to IXANY in ckutio.c and ckupty. -Built OK on NetBSD 1.5.1 (2000). Tried "make netbsd+ssl" on this one, it's -OpenSSL 0.9.5a 1 Apr 2000, but it bombs out in ckuath.c, no big deal. -Another problem in NetBSD 1.5.2 is that even though off_t is 8, CK_OFF_T -is 4. Worth noting but not worth fixing unless someone else notices. -13 Jun 2011. - -SuSE 7.0... boots OK but telnet server doesn't work. Can telnet out but -it's too flaky, connection drops if I try to transfer a file. - -OpenBSD 2.5 [1999] OK. Red Hat 7.1 OK. Red Hat 7.1 with OpenSSL 0.9.6 -not OK, same error as with 0.9.5a: - -ckuath.c -In file included from ck_ssl.h:48, - from ckuath.c:225: -/usr/include/openssl/des.h:77: warning: redefinition of `Block' -ckuat2.h:86: warning: `Block' previously declared here -/usr/include/openssl/des.h:83: redefinition of `struct des_ks_struct' -/usr/include/openssl/des.h:91: warning: redefinition of `Schedule' -ckuat2.h:90: warning: `Schedule' previously declared here - -So it appears that OpenSSL support is broken for pre-0.9.7. Tried -building it again with -UCK_SSL (since the errors are originating from -from des.h)... But it still failed exactly the same way. I found -#includes for des.h in ckuath.c and and ck_ssl.h and #ifdef'd them out, -but it still fails: - -In file included from /usr/include/openssl/evp.h:89, - from /usr/include/openssl/x509.h:67, - from /usr/include/openssl/ssl.h:69, - from ck_ssl.h:51, - from ckuath.c:227: -/usr/include/openssl/des.h:77: warning: redefinition of `Block' -ckuat2.h:86: warning: `Block' previously declared here -/usr/include/openssl/des.h:83: redefinition of `struct des_ks_struct' -/usr/include/openssl/des.h:91: warning: redefinition of `Schedule' -ckuat2.h:90: warning: `Schedule' previously declared here - -Built OK on Debian 2.1. 13 Jun 2011. - -On FreeBSD 4.4, it blows up with: -ckufio.c: In function vpass': -ckufio.c:8201: conflicting types for 'initgroups' -/usr/include/unistd.h:154: previous declaration of 'initgroups' -ckufio.c:8201: warning: extern declaration of 'initgroups' doesn't match global -one. Fixed by defining NODCLINITGROUPS for FreeBSD in ckufio.c. It might not -be the right fix, but I don't have a lot of other FreeBSD versions to -compare with. Anyway now it builds OK on 4.4, and also on FreeBSD 3.3. -ckufio.c, 13 Jun 2011. - -Tried to build on SCO Open Server 5.0.7 but it fails at link time because -it can't find rdchk(). But it's supposed to be there! Come back to this -later... - -Red Hat 6.1 i386 32/64 linux 2332545 -Red Hat 7.1 i386 32/64 linux 2368528 -Red Hat EL4 i386 32/74 linux 2363067 -Red Hat EL5.6 i386 64 linux 2371279 -Solaris9 sparc 32/64 solaris9 2849896 -Solaris9+ssl sparc 32/64 solaris9 5021764 -Solaris10 sparc 32/64 solaris10 2855776 -QNX i386 32 qnx32 2012323 -NetBSD 1.5.1 i386 32/64 netbsd 2198055 -NetBSD 5.1 i386 32/64 netbsd 2159863 -OpenBSD 2.5 i386 32/64 openbsd 2236036 -Mac OS X 10.6.7 x86_64 64 macosx 2.7M -Mac OS X 10.4.11 ppc 32/64 macosx 2496304 -Debian 2.1 i386 32/64 linux 2213221 -FreeBSD 4.4 i386 32/64 freebsd 2291333 -FreeBSD 3.3 i386 32/64 freebsd 2147370 -SINIX 5.42 mips 32 sinix542 3319325 (1995) -SCO Unixware 2.1.3 i386 32 uw213 2242176 -SCO OSR6.0.0 i386 32/64 sco_osr600 2368300 - -More builds, 14 June 2011: - -VMS 6.2 alpha 32 make mn 2556928 No TCP/IP -VMS 6.2 alpha 32 make m 3112960 UCX 4.0 -Solaris 11 i386 32/64 solaris11 2823860 -Solaris 11 i386 32/64 solaris11+ssl 2993660 OpenSSL 0.9.8l -NetBSD 5.1 i386 32/64 netbsd+krb5 2307855 Kerberos 5 -Linux Slackware 12.1.0 i386 32/65 linux 2175754 -Linux Fedora 14 i386 32/64 linux 2256514 -Linux Fedora 14 i386 32/64 linux+ssl ....... OpenSSL 1.0.0d -Linux Fedora 14 i386 32/64 linux+krb 2449614 (*) - -(*) make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2" - -Noticed that netbsd+ssl build on NetBSD 5.1 said "NetBSD 1.5" in its banner. -Fixed by replacing the old hardwired target with the new "subroutinized" -target a'la linux+ssl and adapting it to NetBSD. makefile, 15 Jun 2011. - -Same deal for Kerberos 5, make a new netbsd+krb5 target and it builds ok, -at least once one figures out where the Kerberos headers and libs are. -makefile, 15 Jun 2011. - -Same deal for the netbsdnc target, now it simply defined NOCURSES and -chains to the main netbsd target. makefile, 15 Jun 2011. - -Tried to build with Kerberos 5 on Solaris, fails because the DES library -no longer exists. This one is beyond me, sorry. - -Made new targets for MirBSD, mirbsd and mirbsd+ssl, makefile 15 Jun 2011. - -In OpenSUSE 11.2 with OpenSSL 0.9.8r we bomb on undefined references from -various DES library routines. Builds OK without DES. - -Various linux+krb5 builds fail because can't find -lgssapi_krb5 - -SSL builds with OpenSSL < 0.9.7 fail even though there is code to support -the older SSL. - -Fixed some printf %ld vs int instances in the sizeofs section of SHOW FEATURES. -ckuus5.c, 15 Jun 2011. - -Fixed the new linux+ssl target to actually use the SSLINC and SSLLIBS -definitions, oops. makefile, 15 Jun 2011. - -15 June 2011 builds (Beta.01): - -AIX 5.3 ppc 32/64 aix+ssl 3283846 OpenSSL 0.9.8m -NetBSD 5.1 i386 32/64 netbsd 2159863 -NetBSD 5.1 i386 32/64 netbsd+ssl 2350274 OpenSSL 0.9.9-dev -NetBSD 5.1 i386 32/64 netbsd+krb5 2349627 MIT Krb5 1.6.3 -FreeBSD 8.2 i386 32/64 freebsd 2298414 -FreeBSD 8.2 i386 32/64 freebsd+ssl 2448961 OpenSSL 0.9.8q -OpenBSD 4.7 i386 32/64 openbsd 2266132 -OpenBSD 4.7 i386 32/64 openbsd+ssl 2409263 OpenSSL 0.9.8k -MirBSD 10 i386 32/64 mirbsd 2216601 -MirBSD 10 i386 32/64 mirbsd+ssl 2358318 OpenSSL 0.9.8r -OpenSuse 11.2 x86_64 64 linux 2348468 -OpenSuse 11.2 x86_64 64 linux+ssl (*) 2546540 OpenSSL 0.9.8r -RHEL 5.6 ia64 64 linux 4390687 -RHEL 5.6 ia64 64 linux+ssl (*) 4775007 OpenSSL 0.9.8e -Ubuntu 9.10 i386 32/64 linux 2275523 -Ubuntu 9.10 i386 32/64 linux+ssl 2466708 OpenSSL 0.9.8r -Gentoo 1.12.13 ppc 32/64 linux 2386597 -Gentoo 1.12.13 ppc64 64 linux 2749015 -Gentoo 1.12.13 ppc64 64 linux+ssl 3002150 OpenSSL 0.9.8r -Gentoo 1.12.13 sparc 32/64 linux 2478382 -Gentoo 1.12.13 sparc 32/64 linux+ssl 2690499 OpenSSL 0.9.8r -Solaris 9 sparc 32/64 solaris9 2849896 -Solaris 10 i386 32/64 solaris10 2837620 -IRIX 6.5 R10000 32/64 irix65 2869704 - -* and KFLAGS=-UCK_DES - -Tried building on NetBSD 5.1 with Heimdal Kerberos using: - -make netbsd+krb5 \ - "KFLAGS=-DHEIMDAL" \ - "K5INC=-I/usr/include" \ - "K5LIB=-L/usr/lib" - -It found all its headers OK, but it blew up in ckuath.c. Small wonder, -ckccfg.html says: - -HEIMDAL - Should be defined if Kerberos V support is provided by HEIMDAL. Support - for this option is not complete in C-Kermit 8.0. Anyone interested in - working on this should contact kermit-support. - -'krb5-config --version' gives the MIT Kerberos 5 version number. - -Make a new netbsd+krb5+ssl target based on the combination of the new -netbsd+ssl and netbsd+krb5 targets. There were lots of warnings in the -compilation but no errors, but it produced an executable that starts and -does normal things but I have no idea if the SSL or Kerberos functions work. -makefile, 16 Jun 2011. - -Changed the cu-solaris9-krb5 target to test for the presence of DES because -DES isn't there, to see if this would allow a Kerberos build to proceed. -And it worked, amazing. At least the build completed, I have no way to test -the Kerberos part. makefile, 16 Jun 2011. - -Updated the solaris9+ssl target to do the DES testing. makefile, 16 Jun 2011. - -Updated cu-solaris+krb5 target to test whether the GSSAPI library is called -libgassapi or libgassapi_krb5. makefile, 16 Jun 2011. - -Added lots of tests to the Linux Kerberos 5 entries, linux+krb5 and -linux+krb5+ssl, because some have libk5crypto and some don't; some have -libcom_err and some don't; and some have libgssapi_krb5 (e.g. RHEL5, -OpenSuse 11.2) whereas others have libgssapi (Gentoo). - -16 June 2011 builds (Beta.01): - -NetBSD 5.1 i386 32/64 netbsd+krb5+ssl 2451757 OpenSSL 0.9.9 MIT Krb5 1.6.3 -Solaris 9 sparc 32/64 solaris9+krb5 2543036 MIT Kerberos 5 1.7.1 -Solaris 9 sparc 32/64 solaris9+ssl 5021544 OpenSSL 0.9.8q (gcc) -Gentoo... ppc 32/64 linux 2386597 -Gentoo... ppc 32/64 linux+ssl 2593561 OpenSSL 0.9.8r -Gentoo... ppc64 64 linux 2749015 -Gentoo... ppc64 64 linux+ssl 3002150 OpenSSL 0.9.8r -RHEL5 x86_64 64 linux+krb5 (*) 2563878 MIT Kerberos 5 1.6.1 -RHEL5 x86_64 64 linux+krb5+ssl(*) 2563878 MIT Kerberos 5 1.6.1 -Fedora 14 i386 32/64 linux+krb5+ssl 2539891 MIT Krb5 + OpenSSL 0.9.8r - -* KFLAGS=-UCK_DES - ---- C-Kermit 9.0.299 Beta.01 --- - -sizeof() can return a long or an int, so neither printf("%d",sizeof(blah)); -or printf("%ld",sizeof(blah)); can be used everywhere. Changed the -"sizeofs" section of SHOW FEATURES in the dumbest (and therefore most -portable) way to squelch the warnings. ckuus5.c, 17 Jun 2011. - -From John Dunlap: "Watching the server screen led me to offer a cosmetic -patch for ckuusx.c. I noticed that the server screen said it was -"RESENDING" when it really wasn't. The attached patch emits blanks to -insure that old labels are completely erased." ckuusx.c, 17 Jun 2011. - -Nelson Beebe found two places where I had SSLLIBS in the makefile instead of -SSLLIB. makefile, 18 Jun 2011. - -More important he knew how to force gcc to load the right header files for -OpenSSL 1.0.0d (by using '-isystem' rather than '-I'). Previously it was -using the 0.9.8r header files but linking with the 1.0.0d libraries. This -is not in the sources or makefile; it's done when giving the 'make' command: - - export PATH=/usr/bin:$PATH - export SSLINC=-isystem/usr/include - export "SSLLIB=-L/usr/lib -Wl,-rpath,/usr/lib" - make linux+ssl - -Folded the previous linux+openssl+zlib+shadow+pam and linux+openssl+shadow -targets into linux+ssl. Checked the linuxso (scripting only) target, builds -OK, 600K. Made new subroutinized linux+krb5+krb4 target but can't find -anyplace to test it. Made new subroutinized linux+shadow+pam target, works -fine on RHEL4. Revised comments and lists again. makefile, 18 Jun 2011. - -For the pluggable-disk OS's that boot OK but lack a working network, I -rigged up a serial connection using a DB9-FF null modem cable, and then a -DB9-MF modem cable to make it reach. I don't see any modem signals on -either end, but the data goes through OK. COM1 on the desktop PC, -/dev/ttyS1 or whatever on Lab. Since there are no modem signals, can't use -RTS/CTS. At 57600bps with Xon/Xoff, 500-byte packets and sliding windows, -transfers work OK at about 5000cps using 5 window slots; takes 8 minutes to -transfer the gzipped C-Kermit tarball. Kermit to the rescue. 19 Jun 2011. - -Transferred the tarball over serial ports to SCO OSR5.0.5 at 38.4Kbps, the -highest speed supported, 12 minutes, no errors, 3300cps. Unpack, make -sco32v505udk, OK. Also built the TCP/IP version and it almost made an -outbound connection, but only once (not a Kermit program but something with -the TCP/IP stack). 19 Jun 2011. - -Ditto for Solaris 2.6/i386, except 57.6Kbps, 4K-byte packets, no problem. -Solaris 8/i386, ditto. 19 Jun 2011. - -SCO OpenServer 5.0.5 i386 32 sco32v505udk 1940964 No TCP/IP -SCO OpenServer 5.0.5 i386 32 sco32v505udknet 2314668 With TCP/IP -Sun Solaris 2.6 i386 32 solaris26g 4661368 -Sun Solaris 8 i386 32 solaris8g 4675432 - -When using compact substring notation, \s(xx[4]) returns the whole string -xx starting at position 4, but \s(xx[4:]) returns an empty string. Fixed -the latter to be like the former. ckuus5.c, 20 Jun 2010. - -Really it would have been nicer if \s(xx[4]) returned a single character, -the 4th character of xx, but it's too late now. Added another "separator" -character '.' (period) for that: \s(xx[4.]) is the 4th character of xx. -ckuus4.c, 20 Jun 2010. - -Back to SCO OSR5.0.7... This failed before because 'rdchk' came up unknown -at link time, unlike all previous OSR5's, that used rdchk() in place of the -FIONREAD ioctl. Added #ifdefs to make a special case for 5.0.7. I'm not -sure this is the best way, but this is the minimal change to get it to work. -If anybody cares, maybe the same can be done for previous OSR5 releases. -ckutio.c, 20 Jun 2010 (search for SCO_OSR507). - -SCO OpenServer 5.0.7 i386 32 sco32v507 1895724 No TCP/IP -SCO OpenServer 5.0.7 i386 32 sco32v507net 2246792 With TCP/IP - -Checked current code on RHEL4, found that my GSSAPI-lib finding makefile -target didn't look in enough places; added some more. makefile, 21 Jun 2011. - -Got reports back on HPUX from Peter Eichhorn, almost all good on HP-UX 7, 8, -9, 10, and 11. 21-22 Jun 2011. - -Got access to Debian 5.0 and 7-to-be ("Wheezy/Sid"). Regular 'make linux' is -OK in Debian 5, but in 7 can't find crypt, res_search, or dn_expand; had -to add more library search clauses to 'make linux'. makefile, 21 Jun 2011. - -In Debian 7.0, libk5crypto could not be found without adding another clause -to 'make linux+krb5'. That done, the SSL build (1.0.0d) was OK, as well as -the krb5+ssl one. makefile, 21 Jun 2011. - -I found a Linux box that had both Kerberos 4 and 5 installed and tried 'make -linux+krb5+krb4', which failed because of missing DES functions. Tried -'make linux+krb5+krb4 KFLAGS=-UCK_DES', but that fails too, even though it -doesn't fail for Kerberos 5 alone, so probably some Krb4 code is making -unguarded calls to the DES routines. What is really needed is a way to -completely strip all DES references from any given build, code and makefile, -a big deal. 21 Jun 2011. - -Fixed some typos in COPYING.TXT (noticed by Ian Beckwith). 24 Jun 2011. - -Got access to perhaps the last living 4.3BSD VAX system. It doesn't have -SEEK_CUR so I had to #ifdef out the \fpicture() function. Aside from that, -no problems. ckuus4.c, 24 Jun 2011. - -I had been wanting the S-Expression (ROUND x) to allow a second argument n, -which, if given, tells where the rounding should occur. If n is positive, -the number is rounded to n decimal places. If zero, it is rounded to the -nearest integet. If positive, the number is rounded to the nearest power of -10; e.g. -2 means "to the nearest hundred". If ROUND is used as before, -with one argument, it works as before. ckclib.c, ckuus3.c, 25 Jun 2011. - -From Arthur Marsh, a few more directories to test for libresolv in Linux. -makefile, 26 Jun 2011. - -From Martin Vorlaender, a fix for the VMS file-transfer display and -statistics, a place where a file length wasn't being cast to CK_OFF_T -in zchki(). ckvfio.c, 28 Jun 2011. - -Updated version to 9.0.300 and removed the Beta designation. -ckcmai.c, makefile, 28 Jun 2011. - -Removed solaris9_64 target from makefile. It builds but it doesn't work -at all. 30 Jun 2011. - ---- C-Kermit 9.0.300 --- - -On Solaris 10 and 11, DNS lookups don't work. It seems these Solaris -versions have INADDRX and INADDRX_NONE defined, thus triggering the code in -ckcnet.c, ckucns.c, and ckcftp.c #ifdef'd on these symbols, but that code -doesn't work in this case. This happens building with gcc as well as with -Sun cc. Put #ifdefs in ckcnet.h to undefine these symbols (if they are -defined after including all the header files) for Solaris. I didn't bother -trying to differentiate the Solaris versions because the symbols are not -defined in Solaris 9 or earlier, and they should not be used in Solaris 10 -or 11. ckcnet.h, 6 July 2011. - -From SMS: To avoid the %CC-W-PTRMISMATCH1 complaints from ck_ssl.c, add -two (harmless) type casts at lines 2460 and 2773, 6 July 2011. - -Built and tested on Solaris 9, Solaris 10, and RHEL5. 6 July 2011. - ---- C-Kermit 9.0.301 Beta.01 --- - -Updated version text and date. ckcmai.c, makefile, 11 July 2011. - ---- C-Kermit 9.0.301 --- - ---------------------------------- -*************************** diff --git a/ckc302.txt b/ckc302.txt new file mode 100644 index 0000000..13a661a --- /dev/null +++ b/ckc302.txt @@ -0,0 +1,7881 @@ +C-KERMIT 9.0 CHANGE LOG (Changes since 8.0.207 / K95 2.1.3 January 2003) + + Chronological order. + Go to the bottom to find the newest edits. + + F. da Cruz, The Kermit Project, Columbia University, NYC. + Last update: 28 June 2011. + +FTP USER, FTP ACCOUNT, plus the various prompts and switches for FTP username, +password, and account all neglected to strip quotes, and in most cases quotes +are necessary to specify a username that contains spaces. ckcftp.c, +15 Jan 2003. + +FTP MPUT f1 f2 f3... gets a parse error if any of the fn's do not match an +existing file. This is bad for scripts. In doftpput(), cmfdb() looks for +keywords (switches) or CMIFI. When it hits CMIFI, it exits from the initial +parse loop and then does additional cmifi()s in a loop until done. The most +obvious fix is to parse each field with cmfdb(CMIFI,CMFLD), i.e. fall back to +CMFLD if CMIFI doesn't match anything. Then if CMFLD was used, we don't add +the filespec to the list. This is a rather big change but it seems to work. +No error messages or failures happen for non-matching fields, but an error +message is printed (and the MPUT command fails) if none of the fields match +any files. This fix got in too late for 2.1.3; workaround: use C-Shell +like wildcard list (ftp mput "{*.abc,foo.*}"). ckcftp.c, 16 Jan 2003. + +GREP did not pass its pattern through the expander, thus variables could +not be used for patterns. This must have been an oversight -- I can't find +anything in my notes about it. Fixed in dogrep(): ckuus6.c, 24 Jan 2003. + +New makefile target for HP-UX 11.xx with OpenSSL from Tapani Tarvainen. +makefile, 31 Jan 2003. + +From Jeff: + . Avoid core dump when dereferencing tnc_get_signature(): ckuus4.c. + . Bump version numbers to 8.0.208, 2.1.4: ckcmai.c. + +Added /NOLOGIN to FTP [OPEN]. ckcftp.c, 10 Feb 2003. + +Don't dump core if FTP DEBUG is ON and FTP OPEN does not include a service. +openftp(): ckcftp.c, 10 Feb 2003. + +HELP PATTERN text incorrectly identified commands and functions with +floating and anchored patterns. The corrected lists are: +Floating: GREP, TYPE /MATCH:, /EXCEPT: patterns, \farraylook(), +Anchored: IF MATCH, file-matching wildcards, \fsearch(), \frsearch() +ckuus2.c, 10 Feb 2003. + +INPUT n \fpattern(xxx) did not work for case-independent comparisons. +Fixed in doinput(): ckuus4.c, 10 Feb 2003. + +It seems \fpattern() didn't work with MINPUT at all. There was no code to +handle \fpattern() in the MINPUT parse loop, so it never worked. The code +had to be totally rewritten to use cmfld() in a loop, rather than cmtxt() +and then cksplit(). Furthermore, whenever any of the fields was an +\fjoin(), this had to be split. ckuusr.c, 10 Feb 2003. + +Macro replacement via \m() and \fdefinition() does not work as advertised +(i.e. case sensitively) for associative array elements; e.g. \m(xxx) is +treated the same as \m(xxx), contrary to section 7.10.10 of the C-Kermit +7.0 update notes, and to the fact that the two really do exist separately. +Fixed by adding a static function isaarray(s) which succeeds if s is an +associative array reference and fails otherwise, and then having \m() +and \fdef() call mxxlook() (case-sensitive lookup) if isaarray(), otherwise +(as before) mxlook()). ckuus4.c, 11 Feb 2003. + +Fixed FTP OPEN to allow the /USER switch to override SET FTP AUTOLOGIN OFF, +just as /NOLOGIN overrides SET FTP AUTOLOGIN ON. ckcftp.c, 11 Feb 2003. + +In K95, "set key \1234 \27H" (any SET KEY command in which the first char of +the definition was backslash, and the ONLY character after the backslash +quantity was an uppercase letter, that letter would be lowercased). Diagnosis: +xlookup() poking its argument (see notes from July 2000). Jeff sent a fix. +ckucmd.c, 15 Feb 2003. + +Ran my S-Expression torture test to make sure Sexps still worked. They do, +except the bitwise & and | operators were broken, e.g. (& 7 2) and (| 1 2 4) +get "Invalid operand" errors. Jeff's code had added an early failure return +from the lookup loop when when a single-byte keyword matched a keyword that +started with the same byte but was more than one byte long. So "&" would hit +"&&" and fail instead of continuing its search (xlookup tables aren't sorted +so there can be no early return). Fixed in xlookup(): ckucmd.c, 16 Feb 2003. + +Got rid of "krbmit" target from makefile. It's still there, but we don't +use it any more. All secure targets now use "xermit", and produce a binary +called wermit, just like the regular ones do (except the old ckucon.c ones). +Non-secure targets, since they don't define any of the security symbols, +wind up compiling and linking to (mostly) empty security modules. makefile, +15 Feb 2003. + +Added \fcvtdate(xxx,3) to format its result in MDTM format (yyyymmddhhmmss, +all numeric, no spaces or punctuation). Of course these numeric strings +are too big to be 32-bit numbers and are useless for arithmetic, but they're +useful for lexical comparison, etc. ckuus[24].c, 16 Feb 2003. + +The following FTP commands did not set FAILURE when they failed: RMDIR, +CD, CDUP, Fixed in the corresponding doftpblah() routines. ckcftp.c, +16 Feb 2003. + +RENAME would sometimes not print an error message when it failed, e.g. in K95 +when the destination file already existed. ckuus6.c, 17 Feb 2003. + +Fixed COPY error messages, which did not come out in standard format when +/LIST was not included. ckuus6.c, 17 Feb 2003. + +Fixed #ifdefs in ck_crp.c to allow nonsecure builds on old platforms like +System V/68 R3. 19 Feb 2003. + +Similar treatment for ck_ssl.c. 20 Feb 2003. + +From Jeff, 21 Feb 2003: + . AIX53 and AIX52 symbols for ckcdeb.h, makefile. + . New gcc targets for various AIX 4.x/5.x versions: makefile. + . Copyright date updates: ck_crp.c, ck_ssl.c. + . ENABLE/DISABLE QUERY broken because keyword table out of order: ckuusr.c. + . Fixed the use of HTTP proxies for HTTP [RE]OPEN for Unix: ckcnet.c. + +Also for K95 only: Allow file transfer when K95 is invoked on the remote end +of a connection to a Pragma Systems Terminal Server connection; automatically +SET EXIT HANGUP OFF when invoked with open port handle ("k95 -l nnnn"). + +"cd a*" failed even when "a*" matched only one directory. Fixed in cmifi(): +ckucmd.c, 21 Feb 2003. + +In the Unix version, replace "extern int errno;" with "#include " +if __GLIBC__ is defined, since glibc now defines a thread-specific errno. +ckcdeb.h, 26 Feb 2003. + +Added #ifdefs to skip compilation of ckuath.c in nonsecure builds. Tested +by building both secure and regular versions in Linux. ckuath.c, 26 Feb 2003. + +Ran the build-in-84-different-configurations script on Linux to make sure it +still builds with all different combinations of feature selection options. +All OK. 26 Feb 2003. + +Built on VMS. Needed to add a prototype for mxxlook*() to ckuusr.h; built +OK otherwise. 26 Feb 2003. + +From Jeff: More #ifdef shuffling for nonsecure builds: ckuath.c, ck_ssl.c, +27 Feb 2003. + +Added code to ensure \v(download) ends in a directory separator in Unix, +Windows, and OS/2. ckuus7.c, 27 Feb 2003. + +Added code to K95 zfnqfp() to tack on directory separator when returning +a directory name. ckofio.c, 27 Feb 2003. + +Somehow an old copy of ckuath.c popped to replace the new one. Put the new +one back. 28 Feb 2003. + +From Jeff: Fix typo in my K95 zfnqfp() code from yesterday; fixes for handling +UNCs uniformly, no matter which way their slashes are leaning. ckofio.c, +28 Feb 2003. + +At Jeff Mezei's suggestion, separate text and binary mode open sequences +for VMS session log. ckvfio.c, 28 Feb 2003. + +Added freebsd48 target for FreeBSD 4.8. makefile, 1 Mar 2003. + +Changed Mac OS X entries to include -DUSE_STRERROR. makefile, 2 Mar 2003. + +Fixed GETOK /GUI to evaluate its text argument. ckuus6.c, 3 Mar 2003. + +Jeff fixed the K95 Dialer QUICK dialog to (a) allow templates, and (b) have +a Save-As option. 3 Mar 2003. + +Jeff fixed a problem with the Xmodem-CRC checksum being crunched whenever +there was a retransmission. 7 Mar 2003. + +Added target/banner for Tru64 5.1B. makefile, ckuver.h, 5 Mar 2003. + +In Unix, the zcopy() routine (used by the COPY command) reset the user's umask +to 0 for the remainder of the Kermit process lifetime. The bug was in +ckufio.c 8.0.194, 24 Oct 2002, and is fixed in ckufio.c 8.0.195, 6 Mar 2003. +Of course this happened after building 155 C-Kermit 8.0.208 binaries. (But +before officially releasing 8.0.208.) + +In the VMS version, changed: + + while ((n--) && xx_inc(2) > -1) ; +to: + while ((n--) && xx_inc(2) >= 0) ; + +to suppress the "...is being compared with a relational operator to a constant +whose value is not greater than zero" warning. ckvtio.c, 7 Mar 2002. + +Added a debug call to dologend in hopes of catching overzealous Locus +switching, which seems to happen only in K95. ckuus3.c, 7 Mar 2002. + +Rebuilt binaries for some of the more current Unix releases: AIX 4.3.3-5.1, +Solaris 7-9 , Red Hat 7.0-8.0, Slackware 8.1, Freebsd 4.7-4.8, NetBSD 1.6, +OpenBSD 3.2, Unixware 7.1.3, Open Unix 8, OSR5.0.6a, etc. A Unix binary with +COPY umask fix shows a 6 Mar 2003 date for "UNIX File support" in SHOW +VERSIONS; a binary without the fix shows 24 Oct 2002. + +C-Kermit 8.0.208 dated 14 March 2003 released on 10 March 2003. + +---8.0.208--- + +From Jeff 13 Mar 2003: + . Updated SSL module allows importation of tickets from host. + . freebsd50+openssl target: makefile. + . FTP PUT /PERMISSIONS error message for K95: ckcftp.c. + +Fixed MINPUT to strip quotes or braces from around targets (this was broken +on Feb 10th). Thanks to Jason Heskett for discovering and reporting this +(killer) bug. ckuusr.c, 14 Mar 2003. + +Changed version number to 209 Dev.00. ckcmai.c, 14 Mar 2003. + +While debugging the alphapage script, I found that the command "minput 8 \6\13 +\21\13 \13\27\4\13 \30\13" gets "?Not confirmed" in 8.0.208 and 8.0.209, but +not in 206 and earlier. This problem too was introduced on Feb 10th by +changing MINPUT parsing from cmtxt() followed by cksplit() to cmfld() in a +loop. cmfld() uses setatm() to return its result and of course setatm() +breaks on \13. Changing setatm() not to do this would break everything else. +But cmfld() has no arguments that let us tell it to do anything different in +this case. Changing the API would be a disaster. The only solution is to add +an "MINPUT ACTIVE" (minputactive) global variable that tells cmfld() to tell +setatm() not to break on CR. Now MINPUT with braced targets containing CR +and/or LF works in 209, 206, and 201 (but not 208). ckucmd.c, ckuusr.c, +ckuus5.c, 15 Mar 2003. + +MINPUT n \fjoin(&a) works OK if all the members of \&a[] are text strings, but +if they are strings of control chars (as above), they don't get separated by +the spaces. For example in: + + dcl \&a[] = "\4\5" "\6\7" xxx + minput 10 \fjoin(&a) + +MINPUT gets two targets: "aaa" and "\4\5 \6\7 xxx". The bug was in the +cksplit() call in the \fjoin() case of MINPUT: it needed to specify an +include set consisting of all the control characters except NUL. ckuusr.c, +16 Mar 2003. + +But there's still a problem: + + dcl \&a[] = "\4\5\13\10" "\6\7" "xxx" + +creates an array whose first member is "^D^E (one doublequote included). But +if braces are used instead, there's no problem. Same deal as MINPUT: cmfld() +breaks on CR or LF, thus the end quote is lost. If I set minputactive for +DECLARE initializers too, that fixes it. Is there any reason not to do this? +Can't think of any (famous last words)... ckuusr.c, 16 Mar 2003. + +Since it has multiple applications, changed the flag's name from minputactive +to keepallchars. ckucmd.c, ckuus[r5].c, 16 Mar 2003. + +\v(exedir) wasn't being set correctly (it included the program name as well +as the directory). Fixed in getexedir(): ckuus4.c, 16 Mar 2003. + +SET CARRIER-WATCH "auto matic" (spurious space in supplied keyword). +Cosmetic only; it still worked. Fixed in setdcd(): ckuus3.c, 16 Mar 2003. + +"directory a b c" listed too many files -- all files whose names END WITH a, +b, or c, rather than the files whose names WERE a, b, or c. Diagnosis: The +filespec is changed into a pattern: {a,b,c}, which is the correct form. It is +passed to nzxpand(), which goes through the directory getting filenames and +sending each one to ckmatch() with the given pattern. ckmatch() receives the +correct pattern but then prepends a "*" -- that's not right. It's not just +in filename matching either. The following succeeds when it shouldn't: + + if match xxxxc {{a,b,c}} + +Changing ckmatch() to not prepend the "*" to each segment fixes the command +above but breaks lots of others. Running through the "match" torture-test +script shows the problem occurs only when the {a,b,c} list is the entire +pattern, and not embedded within a larger pattern. Testing for this case +fixed the problem. ckmatch(): ckclib.c, 16 Mar 2003. + +Fixed FTP MODTIME to not print anything if QUIET ON. ckcftp.c, 16 Mar 2003. + +Picked up a new ckuath.c from Jeff, not sure what the changes are. 16 Mar 2003. + +Did a few regular and secure builds to make sure I didn't wreck anything. + +Changed version number to 209 (final). ckcmai.c, 16 Mar 2003. + +Jason Heskett found another bug: if you define a macro FOO inside the +definition of another macro BAR, and FOO's definition includes an odd number +of doublequotes (such as 1), FOO's definition absorbs the rest of BAR's +definition. Example: + + def TEST { + .foo = {X"} + sho mac foo + } + do test + sho mac foo + +Results in: + + foo = {X"}, sho mac foo + +Diagnosis: the TEST definition becomes: + + def TEST .foo = {X"}, sho mac foo + +and the macro reader is erroneously treating the doublequote as an open +quote, and then automatically closes the quote at the end of the definition. +The error is that a doublequote should be significant only at the beginning of +a field. But the macro reader isn't a command parser; it doesn't know what +a field is -- it's just looking for commas and skipping over quoted ones. +First we have to fix an oversight: SET COMMAND DOUBLEQUOTING OFF should have +worked here, but it wasn't tested in this case. Fixed in getncm(): ckuus5.c, +17 Mar 2003. + +There are only certain cases where it makes sense to treat doublequotes as +significant: + + . An open quote must be at the beginning or preceded by a space. + . A close quote is only at the end or else followed by a space. + +This too was fixed in getncm(): ckuus5.c, 17 Mar 2003. + +A fix from Jeff SSL/TLS FTP data decoding. ckcftp.c, 18 Mar 2003. + +Tried building C-Kermit on a Cray Y-MP with UNICOS 9.0. "int suspend", +declared in ckcmai.c and used in many modules, conflicts with: + + unistd.h:extern int suspend __((int _Category, int _Id)); + +The "=Dsuspend=xsuspend" trick doesn't work for this; there is no way around +the conflict other than to rename the variable: ckcmai.c, ckutio.c, +ckuus[35xy].c. 26 Mar 2003. VMS and K95 not affected. + +OK that gets us past ckcmai.c... Then in ckutio.c I had to add a new #ifdef +around the LFDEVNO setting, because the Cray didn't have mkdev.h. Could not +find a Cray-specific manifest symbol, so I made a new makefile target (cray9) +that sets this symbol. Having done this I have no idea what kind of lockfile +would be created, but I also doubt if anybody dials out from a Cray. The +binary should run a C90, J90, or Y-MP. makefile, 26 Mar 2003. + +Added a target for SCO OSR5.0.7. makefile, ckuver.h, 30 Mar 2003. + +Changed since 208: +makefile ckuver.h ckcmai.c ckclib.c ckcftp.c ckucmd.c ckuus*.c ckutio.c. + +---8.0.209--- + +From Mark Sapiro, a fix for the March 17th doublequote fix, getncm(): ckuus5.c, +4 Apr 2003. + +From Jeff, 29 Apr 2003: + . Corrected target for HP-UX 11.00 + OpenSSL: makefile, + . Do not allow WILL AUTH before WONT START_TLS: ckctel.h ckctel.c + . Add hooks for SFTP and SET/SHOW SFTP: ckcdeb.h ckuusr.h ckuusr.c ckuus3.c + . Add SKERMIT ckuusr.h ckuusr.c + . Add ADM-5 terminal emulation: ckuus7.c, ckuus5.c + . Uncomment and update HELP SET SSH V2 AUTO-REKEY: ckuus2.c + . Enable IF TERMINAL-MACRO and IF STARTED-FROM-DIALER for C-Kermit: ckuus6.c + . Fix conflicting NOSCROLL keyword definition: ckuusr.h + . Set ttname when I_AM_SSH: ckuusy.c + . Add extended arg parsing for SSH, Rlogin, Telnet: ckuusy.c, ckuus4.c + . Security updates: ckuath.c, ck_ssl.c + . Change K95 version number to 2.2.0: ckcmai.c + . Save K95 term i/o state before executing keyboard macro: ckuus4.c + . Add tests for SSH Subsystem active during INPUT/OUTPUT/CONNECT: ckuus[45].c + . Enable K95 SET SSH V2 AUTO-REKEY: ckuus3.c + +SFTP and SET SFTP subcommands are implemented up to the case statements. + +Files of mine that Jeff hadn't picked up: + ckuver.h ckcftp.c ckutio.c ckuusx.c (just minor changes for last build-all) + +On 4 Jan 2003, SET RECEIVE MOVE-TO was changed to convert is argument to an +absolute path, which made it impossible to specify a relative path, then +move to different directories and have it apply relatively to each directory. +Changed this as follows: + + . Parser uses cmtxt() rather than cmdir() so it won't fail at parse time. + . If path is absolute, we fail at parse time if directory doesn't exist. + . In reof() we run the the path through xxstring (again, in case deferred + evaluation of variables is desired) and then, if not null, use it. + . If the directory doesn't exist, rename() fails and reof() returns -4, + resulting in a protocol error (this is not a change). We do NOT create + the directory on the fly. + +I also fixed SET SEND/RECEIVE RENAME-TO to parse with cmtxt() rather than +cmdir(), since it's parsing a text template, not a directory name, e.g. +"set receive rename-to file-\v(time)-v(date)-\v(pid)". This was totally +broken, since when I don't know. We don't call xxstring() in this parse, so +evaluation is always deferred -- I'd better not change this. ckuus7.c, +ckcfns.c, 1 May 2003. + +From Jeff, Sat May 3 14:15:23 2003: + . Pick up the right isascii definition for K95: ckctel.c + . malloc... ckuath.c (new safe malloc routines for K95) + . Add author listing: ckuus5.c + . SSH Heartbeat support (K95 only): ckuus[23].c + . Prescan --height and --width to avoid window resizing at startup: ckuusy.c + . Add checks for fatal() or doexit() called from sysinit(): ckuusx.c + . Move some K95-specific definitions to ckoker.h: ckcdeb.h + . Add support for ON_CD macro in zchdir(): ckufio.c + . Add a command to let FTP client authenticate with SSLv2: ckcftp.c + . Fix parsing of FTP file facts like "UNIX.mode": ckcftp.c + +ON_CD will need some explaining (to be done). It's implemented for Unix, +VMS, WIndows, and OS/2. + +The FTP file facts fix came from first exposure to the new OpenBSD FTP +server: ftp://ftp7.usa.openbsd.org/pub/os/OpenBSD/3.3/i386/ +The period in "UNIX.mode" caused an erroneous word break, adding junk to +the filename. + +About the malloc changes, Jeff says "K95 is not behaving well in low memory +environments. I'm not sure that C-Kermit does much better. The program does +not crash but it certainly does not behave the way the user expects it to. +I'm beginning to think that any malloc() error should be treated as fatal." + +Not visible in these changes because it's in K95-specific modules: Jeff made +SET ATTRIBUTES OFF and SET ATTRIBUTES DATE OFF apply to XYZMODEM transfers. + +From Jeff, 11 May 2003: + . Add support for SSH Keepalive to relevant SET command (K95): ckuus3.c + . Reduce max overlapped i/o requests from 30 to 7 (K95): ckuus7.c + . Don't call sysinit() in fatal(): ckuusx.c. + . Some new conditionalizations for SSL module: ck_ssl.c + +The doublequote-parsing fixes from March and April broke the SWITCH statement, +which is implemented by internally defining, then executing, a macro. If I +drop back to the old dumb handling of doublequotes, everything is fixed except +the problem of March 17th. But can we really expect getncm() to pre-guess +what the parser is going to do? getncm()'s only job is to find command +boundaries, which are represented by commas. Commas, however, is needed IN +commands too. We take a comma literally if it is quoted with \, or is inside +a matched pair of braces, parens, or doublequotes. It is not unreasonable to +require a doublequote in a macro definition to be prefixed by \ when it is to +be taken literally. The proper response to Jason Heskett's complaint of March +17th should have been to leave the code alone and recommand an appropriate +form of quoting: + + def TEST { + .foo = {X\"} + sho mac foo + } + +And this is what I have done. Another reason for sticking with the old method +is that it's explainable. The "improved" method, even if it worked, would be +be impossible to explain. Btw, in testing this I noticed that the switch-test +script made 8.0.201 dump core. Today's version is fine. The problem with +quoted strings inside of IF {...} clauses and FOR and WHILE loops is fixed +too. Perhaps "unbroken" would be a better word. ckuus5.c, 11 May 2003. + +Vace discovered that FTP MGET /EXCEPT:{... (with an unterminated /EXCEPT list) +could crash Kermit. Fixed in ckcftp.c, 11 May 2003. + +CONTINUE should not affect SUCCESS/FAILURE status. ckuusr.c, 11 May 2003. + +Fixed an oversight that goes back 15 years. While \{123} is allowed for +decimal codes, \x{12} and \o{123} were never handled. ckucmd.c, 11 May 2003. + +Added support for Red Hat and /usr/sbin/lockdev. Supposedly this +allows Kermit to be installed without setuid or setgid bits and still be able +to lock and use the serial device. Compiles and starts, but not tested. +ckcdeb.h, makefile, ckutio.c, ckuus5.c, 16 May 2003. + +From Jeff: FTP ASCII send data to host when FTP /SSL was in use was broken. +ftp_dpl is set to Clear when FTP /SSL is in use. This was causing the data to +be written to the socket with send() instead of the OpenSSL routines. +ckcftp.c, ckuath.c, 21 May 2003. + +From Jeff: Stuff for Kerberos 524: ckcdeb.h. Fixes for FTP; "FTP ASCII send +data did not properly compute the end of line translations. On Unix (and +similar platforms) the end of line was correct for no character sets but +incorrect when character sets were specified. On Windows/OS2, the end of line +was correct when character sets were specified and incorrect when they were +not. On MAC, both were broken. Also, FTP Send Byte counts were incorrect +when character sets were specified." ckcftp.c. 17 Jun 2003. + +From Jeff: fixes to HTTP /AGENT: and /USER: switch action: ckcnet.c ckuus3.c +ck_crp.c ckcftp.c ckuus2.c ckuusy.c ckuusr.c ckcnet.h, 21 Jun 2003. + +From Jeff: Fix SET DIALER BACKSPACE so it can override a previous SET KEY +(e.g. from INI file): ckuus7.c. Some SSL/TLS updates: ck_ssl.c. HTTP support +for VMS and other VMS improvements (e.g. a way to not have to hardwire the +C-Kermit version number into the build script) from Martin Vorlaender: +ckcnet.h, ckuus[r3].c, ckcdeb.h, ckvtio.c, ckcnet.c, ckvker.com. Built on +Solaris (gcc/ansi) and SunOS (cc/k&r). The new VMS script tests the VMS +version and includes HTTP support only for VMS 6.2 or later. 2 Jul 2003. + +Tried to build on our last VMS system but it seems to be dead. Looks like a +head crash (makes really loud noises, boot says DKA0 not recognized) (fooey, I +just paid good money to renew the VMS license). Tried building at another +site with: + + Process Software MultiNet V4.3 Rev A-X, + Compaq AlphaServer ES40, OpenVMS AXP V7.3 + Compaq C V6.4-008 on OpenVMS Alpha V7.3 + +Had to make a few corrections to ckvker.com. But still, compilation of +ckcnet.c bombs, indicating that the SELECT definition somehow got lost +somewhere since the 209 release (i.e. no SELECT type is defined so it falls +thru to "SELECT is required for this code"). But I don't see anything in +ckcdeb.h or ckcnet.[ch] that would explain this. Not ckvker.com either +(putting the old one back gives the same result). OK, I give up, maybe it's +just that I haven't tried building it on MultiNet recently. What about UCX? +Aha, builds fine there except for warnings about mlook, dodo, and parser in +ckvfio.c (because of ON_CD) -- I suppose I have #include ... (done) +Anyhow it builds OK and the HTTP code is active and almost works (HTTP OPEN +works; HTTP GET seems to succeed but creates an empty file every time). Tried +building under MultiNet at another installation; same bad result. + +OK so why won't it build for MultiNet? Comparing ckcnet.c with the 209 +version, not a single #ifdef or #include is changed. Tried building with +p3="NOHTTP" -- builds OK, aha. Where's the problem? Not ckcnet.h... +Not ckcdeb.h... OK I give up, will revisit this next time I get time to +do anything with the code. + +Later Jeff said "Martin did not implement VMS networking for the HTTP code. +All he did was activate the #define HTTP which happens to work because his +connections are using SSL/TLS connections. http_inc(), http_tol(), etc have +no support for VMS networking regardless of whether it is UCX or MULTINET. +The vast majority of HTTP connections are not secured by SSL/TLS. It makes no +sense to support HTTP on VMS until someone is willing to either do the work or +pay have the work done to implement VMS networking in that code base." So the +fix is to not enable HTTP for VMS after all. Removed the CKHTTP definition +for VMS from ckcdeb.h, 6 Jul 2003. + +Fixed ckvfio.c to #include (instead of ) to pick up +missing prototypes. 6 Jul 2003. + +From Arthur Marsh: solaris2xg+openssl+zlib+srp+pam+shadow and the corresponding +Solaris 7 target. makefile, 6 Jul 2003. + +Remove duplicate #includes for , , and from +ckcftp.c. 6 Jul 2003. + +Add -DUSE_MEMCPY to Motorola SV/68 targets because of shuffled #includes in +ckcftp.c. 8 Jul 2003. + +From Jeff: Fix problems mixing SSL and SRP without Kerberos. Plus a few minor +#define comment changes and a reshuffling of #defines in ckcdeb.h to allow me +to build on X86 Windows without Kerberos. ckcdeb.h, ck_crp.c, ckuath.c, +10 Jul 2003. + +From Jeff: updated ckuat2.h and ckuath.c, 29 Jul 2003. + +Mats Peterson noticed that a very small Latin-1 file would be incorrectly +identified as UCS-2 by scanfile(). Fixed in ckuusx.c, 29 Jul 2003. + +Fixed ACCESS macro definition to account for the fact that FIND is now a +built-in command. ckermit.ini, 30 Jul 2003. + +From Jeff: Fix for typo in urlparse() (svc/hos): ckuusy.c, 18 Aug 2003. + +From Jeff: Redhat9 makefile targets (needed for for OpenSSL 0.9.7): +makefile, 19 Aug 2003. + +GREP /NOLIST and /COUNT did too much magic, with some undesirable fallout: +"GREP /NOLIST /COUNT:x args" printed "file:count" for each file. "GREP +/COUNT:x /NOLIST args" did not print "file:count", but neither did it set the +count variable. Removed the magic. Also one of the GREP switches, +/LINENUMBERS, was out of order. Fixed in ckuus6.c, 20 Aug 2003. + +From Jeff: "Reorganizing code to enable building with different subsets of +options; a few typos corrected as well." ckcdeb.h, ckuver.h (for RH9), +ckcnet.c, ckuus7.c, ckuus3.c: 24 Aug 2003. + +Scanfile misidentified a big PDF file as text because the first 800K of it +*was* text (most other PDF files were correctly tagged as binary). Fixed +by adding a check for the PDF signature at the beginning of the file. +scanfile(): ckuusx.c, 25 Aug 2003. + +Ditto for PostScript files, but conservatively. Signature at beginning of +file must begin with "%!PS-Ado". If it's just "%!" (or something nonstandard +like "%%Creator: Windows PSCRIPT") we do a regular scan. Also added "*.ps" +to all binary filename patterns. ckuusx.c, 4 Sep 2003. + +Ditto (but within #ifndef NOPCLSCAN) for PCL (E) and PJL (%) files, +but no binpatterns (note: ".PCL" is the extension for TOPS-20 EXEC scripts). +ckuusx.c, 4 Sep 2003. + +Added comments about OpenSSL 0.9.7 to all linux+openssl targets. +makefile, 4 Sep 2003. + +From Jeff: Added - #define ALLOW_KRB_3DES_ENCRYPT. When this symbol is defined +at compilation Kermit will allow non-DES session keys to be used during Telnet +Auth. These session keys can then be used for Telnet Encrypt. The reason +this is not compiled on by default is that the MIT Kerberos Telnet does not +follow the RFC for constructing keys for ENCRYPT DES when the keys are longer +than 8 bytes in length. ckuath.c, ckuus5.c, 4 Sep 2003. + +"ftp mget a b c" succeeded if one or more of the files did not exist, even +with "set ftp error-action proceed". This is because the server's NLST file +list does not include any files that don't exist, so the client never even +tries to get them. Fortunately, the way the code is structured, this one was +easy to fix. ckcftp.c, 14 Sep 2003. + +From Jeff: Corrected code in ckcnet.c to ensure that Reverse DNS Lookups are +not performed if tcp_rdns is OFF. Fixed ck_krb5_getrealm() to actually return +the realm of the credentials cache and not the default realm specified in the +krb5.conf file. Previously krb5_cc_get_principal() was not being called. +Fixed ck_krb5_is_tgt_valid() to test the TGT in the current ccache and not the +TGT constructed from the default realm. ckcnet.c, ckuath.c, 14 Sep 2003. + +Marco Bernardi noticed that IF DIRECTORY could produce a false positive if +the argument directory had previously been referenced but then removed. This +is because of the clever isdir() cache that was added to speed up recursion +through big directory trees. Changed IF DIRECTORY to make a second check +(definitive but more expensive) if isdir() succeeds, and changed the +directory-deleting routine, ckmkdir(), to flush the directory cache (UNIX +only -- this also should be done in K95 but it's not critical). This was +done by adding a routine, clrdircache() to ckufio.c, which sets prevstat +to -1 and prevpath[0] to NUL. ckcfn3.c, ckuus6.c, ckufio.c, 18 Sep 2003. + +Marco reported the second fix still didn't work for him (even though it did +for me). Rather than try to figure out why, I concluded that the directory +cache is just not safe: a directory found a second ago might have been deleted +or renamed not only by Kermit but by some other process. Why did I add this +in the first place? The log says: + + Some debug logs showed that isdir() is often called twice in a row on the + same file. Rather than try to sort out clients, I added a 1-element cache + to Unix isdir(). ckufio.c, 24 Apr 2000. + +Experimentation with DIR and DIR /RECURSIVE does not show this happening at +all. So I #ifdef'd out the directory cache (see #ifdef ISDIRCACHE in ckufio.c; +ISDIRCACHE is not defined) and backed off the previous changes: ckufio.c, +ckcfn3.c, ckuus6.c, 28 Sep 2003. + +From Jeff: Replace the compile time ALLOW_KRB_3DES_ENCRYPT with a run-time +command SET TELNET BUG AUTH-KRB5-DES which defaults to ON: ckctel.[ch], +ckuus[234].c, ck_crp.c, ckuath.c. 4 Oct 2003. + +Allow DIAL RETRIES to be any positive number, and catch negative ones. +Also added code to check for atoi() errors (e.g. truncation). At least on +some platforms (e.g. Solaris) atoi() is supposed to set errno, but it +doesn't. ckuus3.c, ckucmd.c, 4 Oct 2003. + +Added /DEFAULT: to ASK-class commands (ASK, ASKQ, GETOK): + + . For popups: no way to send defaults to popup_readtext() or popup_readpass(). + . For GUI ASK[Q], pass default to gui_txt_dialog(). + . For GUI GETOK, convert "yes" "ok" or "no" default to number for uq_ok(). + . For Text GETOK, add default to cmkey(). + . For Text ASK[Q], add default to cmtxt(). + . For GETC, GETKEY, and READ: no changes. + +GETOK, ASK, and ASKQ with /TIMEOUT: no longer fail when the timer goes off +if a /DEFAULT was supplied. The GUI functions (uq_blah) don't seem to +support timeouts. Only the text version has been tested. ckuus[26].c, +4 Oct 2003. + +From Jeff: add /DEFAULT: for popups. ckuus6.c. 6 Oct 2003. + +Change SET DIAL INTERVAL to be like SET DIAL RETRIES. ckuus[34].c, 6 Oct 2003. + +Added target for HP-UX 10/11 + OpenSSL built with gcc, from Chris Cheney. +Makefile, 12 Oct 2003. + +From Jeff, 6 Nov 2003: + . #ifdef adjustments: ckcftp.c, ckcdeb.h + . Fix spurious consumption of first byte(s) on Telnet connection: ckctel.c + . Another HP PJL test for scanfile: ckuusx.c. + . K95: Recognize DG4xx protected fields in DG2xx emulation: ckuus7.c. + . Add SSLeay version display to SHOW AUTH command: ckuus7.c + . Improved SET MOUSE CLEAR help text: ckuus2.c. + . Improved Kverbs help text: ckuus2.c (+ new IBM-3151 Kverbs). + . Some changes to ck_ssl.c, ckuath.c. + +From PeterE, 10 Nov 2003: + . Improved HP-UX 10/11 makefile targets for OpenSSL. + . #ifdef fix for OpenSSL on HP-UX: ck_ssl.c. + +Another new makefile from PeterE with improved and integrated HP-UX targets. +12 Nov 2003. + +A couple fixes to the solaris9g+krb5+krb4+openssl+shadow+pam+zlib target +from Jeff. Added a solaris9g+openssl+shadow+pam+zlib target. makefile, +21 Nov 2003. + +From Jeff, 30 Nov 2003: + . Fix SEND /MOVE-TO: ckuusr.c. + . Fix K95 SET TITLE to allow quotes/braces around text: ckuus7.c. + . Improved "set term autodownload ?" response: ckuus5.c. + . Fix SHOW FEATURES to specify the protocol for encryption: ckuus5.c + . Make {SEND, RECEIVE} {MOVE-TO, RENAME-TO} work for XYZMODEM (K95 only). + +From Jeff: 7 Jan 2004: + . At one point Frank started to add a timer parameter to the + uq_txt() function but he only did it for the non-ANSI + compilers. I added it for the ANSI compilers, fixed the + prototypes and provided a default value easily changed + DEFAULT_UQ_TIMEOUT: ckcker.h, ckuus[36].c, ck_ssl.c, ckcftp.c, ckuath.c. + . Fixed SET TERMINAL DEBUG ON (typo in variable name): ckuus7.c. + . Fixed BEEP INFORMATION; previously it made no sound, now uses + MB_ICONQUESTION. ckuusx.c. + +From Ian Beckwith (Debianization), 7 Jan 2004: + . Search dir/ckermit for docs, as well as dir/kermit in cmdini(): ckuus5.c. + . New linux+krb5+krb4+openssl+shadow+pam target (kitchen sink minus SRP, + which Debian does not distribute): makefile. + ? Mangles the DESTDIR support in makefile to install into a staging area: + makefile (I didn't take this one yet). + +Updated copyright notices for 2004, all modules. 7 Jan 2004. + +Added INPUT /NOMATCH, allowing INPUT to be used for a fixed amount of time +without attempting to match any text or patterns, so it's no longer +necessary to "input 600 STRING_THAT_WILL_NEVER_COME". If /NOMATCH is +included, INPUT succeeds if the timeout expires, with \v(instatus) = 1 +(meaning "timed out"); fails upon interruption or i/o error. ckuusr.h, +ckuus[r24].c, 7 Jan 2004. + +Added SET INPUT SCALE-FACTOR . This scales all INPUT timeouts by the +given factor, allowing time-sensitive scripts to be adjusted to changing +conditions such as congested networks or different-speed modems without +having to change each INPUT-class command. This affects only those timeouts +that are given in seconds, not as wall-clock times. Although the scale +factor can have a fractional part, the INPUT timeout is still an integer. +Added this to SHOW INPUT, and added a \v(inscale) variable for it. +ckuusr.h, ckuus[r257].c, 7 Jan 2004. + +undef \%a, \fverify(abc,\%a) returns 0, which makes it look as if \%a is a +string composed of a's, b's, and/or c's, when in fact it contains nothing. +Changed \fverify() to return -1 in this case. ckuus4.c, 12 Jan 2004. + +\fcode(xxx) returned an empty string if its argument string was empty. This +makes it unsafe to use in arithmetic or boolean expressions. Changed it to +return 0 if its argument was missing, null, or empty. ckuus4.c, 12 Jan 2004. + +Updated \verify() and \fcode() help text. ckuus2.c, 12 Jan 2004. + +While setting up IKSD, Ian Beckwith noticed that including the --initfile: +option caused Kermit to start parsing its own Copyright string as if it were +the command line, and eventually crash. I couldn't reproduce on Solaris / +Sparc but I could in Linux / i386 (what Ian is using) -- a change from Jeff +on 28 Apr 2003 set the command-line arg pointer to a literal empty string in +prescan() about line 1740 of of ckuus4.c; the pointer is incremented next +time thru the loop, resulting in random memory being referenced. Fixed by +setting the pointer to NULL instead of "". ckuus4.c, 12 Jan 2004. + +declare \&a[999999999999999] would dump core on some platforms. atoi() +or whatever would truncate the dimension to maxint. When we add 1 to the +result, we get a negative number, which is used as an index, loop test, etc. +Fixed both dodcl() and dclarray() to check for (n+1 < 0). ckuus[r5].c, +12 Jan 2004. + +Unix zchki() would fail on /dev/tty, which is unreasonable. This prevented +FOPEN /READ from reading from the terminal. zchki() already allowed for +/dev/null, so I added /dev/tty to the list of specials. Ditto for FOPEN +/WRITE and zchko(). ckufio.c 13 Jan 2004. + +Added untabify() routine to ckclib.[ch], 13 Jan 2004. +Added FREAD /TRIM and /UNTABIFY. ckuus[27].c, 13 Jan 2004. +Added \funtabify(). ckuusr.h, ckuus[24].c, 13 Jan 2004. + +Dat Nguyen noticed that (setq u 'p') followed by (u) dumped core. This was +caused by an over-clever optimization that skipped mallocs for short +literals, but then went on later to try to free one that hadn't been +malloc'd. Fixed in dosexp(): ckuus3.c, 14 Jan 2004. + +Catch another copyright date. ckuus5.c, 14 Jan 2004. + +Fixed SWITCH to work even when SET COMMAND DOUBLEQUOTE OFF (from Mark +Sapiro). ckuus5.c, 15 Jan 2004. + +Changed version to 8.0.211 so scripts can test for recently added features. +ckcmai.c, 15 Jan 2004. + +Fixed a glitch in K95 "help set port". ckuus2.c, 20 Jan 2004. + +Fix from Jeff: Connections to a TLS-aware protocol which require a reconnect +upon certificate verification failure could not reconnect if the connection +was initiated from the command line or via a URL. ckctel.c ckcmai.c +ckuusr.c ckuus7.c ckuusy.c, 20 Jan 2004. + +From Alex Lewin: makefile target and #ifdef for Mac OS X 10.3 (Panther): +makefile, ckcnet.c, 7 Feb 2004. + +Added KFLAGS to sco32v507 targets to make PTY and SSH commands work. The +same flags could probably also be added to earlier OSR5 targets but they +have not been tested there. makefile, 7 Feb 2004. + +Checked a complaint that "LOCAL &a" did not make array \&a[] local. Indeed +it did not, and can not. You have to use the full syntax in the LOCAL +command, "LOCAL \&a[]", or else it doesn't know it's not a macro named &a. +7 Feb 2004. + +Fixed some confusion in creating IKSD database file and temp-file names. +I was calling zfnqfp() without remembering that the path member of the +returned struct included the filename, so to get just the directory name, +I needed to strip the filename from the right. ckuusy.c, 2 Mar 2004. + +New ckuath.c, ck_ssl.c from Jeff. 2 Mar 2004. + +Updated Jeff's affiliation in VERSION command text. ckuusr.c, 2 Mar 2004. + +Designation changed from Dev.00 to Beta.01. ckcmai.c, 2 Mar 2004. + +Fixed zrename() syslogging -- it had success and failure reversed. +Beta.02: ckufio.c, 4 Mar 2004. + +Problem: when accessing IKSD via a kermit:// or iksd:// URL, and a user ID +is given but no password, doxarg() set the password to "" instead of leaving +it NULL, but all the tests in dourl() are for NULL. Fixed in doxarg(): +ckuusy.c, 5 Mar 2004. + +The logic in dourl() about which macro to construct (login and connect, +login and get directory listing, or login and fetch a file) was a bit off, +so all three cases were not handled. ckcmai.c, 5 Mar 2004. + +Trial Beta builds: + . HP-UX B.11.11 PA-RISC + . HP-UX B.11.23 IA64 + . Tru64 4.0G Alpha + . Tru64 5.1B Alpha + . Debian 3.0 i386 + . Red Hat ES 2.1 i386 + . Slackware 9.1 i386 + . VMS 7.3-1 Alpha + UCX 5.3 + . VMS 7.3-1 Alpha no TCP/IP + . VMS 7.3 Alpha MultiNet 4.3 A-X + . SCO UnixWare 7.1.4 i386 + . SCO OSR5.0.7 i386 + . Solaris 9 Sparc + +Fixed compiler warning in doxarg() caused by typo (NULL instead of NUL) in +the 5 March doxarg() edit. ckuusy.c, 9 Mar 2004. + +IKSD (kermit://) command-line URLs did not work right if the client had +already preauthenticated with Kerberos or somesuch because they tried to log +in again with REMOTE LOGIN. The macros constructed in doxarg() needed to +check \v(authstate) before attempting REMOTE LOGIN. ckcmai.c, 10 Mar 2004. + +Added ckuker.nr to x.sh (ckdaily upload) and updated ckuker.nr with current +version number and dates. 10 Mar 2004. + +Replaced hardwired references to /usr/local in makefile with $(prefix) +(which defaults to /usr/local, but can be overridden on the command line), +suggested by Nelson Beebe for use with Configure. 10 Mar 2004. + +From Nelson Beebe: In the Kermit makefile in the install target commands, +line 981 reads: + + cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\ + +Could you please add this line before it: + + rm -f $(DESTDIR)$(BINDIR)/kermit;\ + +Some sites (mine included) keep multiple versions of software around, +with hard links between $(prefix)/progname and $(prefix)/progname-x.y.z. +Failure to remove the $(prefix)/progname at "make install" time then +replaces the old $(prefix)/progname-x.y.z with the new one, destroying +an old version that the site wanted to be preserved. makefile, 10 Mar 2004. + +Minor syntax and typo fixes (mostly prototypes): ckcdeb.h, ckcfns.c, +ckclib.c, ckufio.c, ckuusr.h, ckuusx.c, 10 Mar 2004. (I still have a few +more to do.) + +Added CC=$(CC) CC2=$(CC2) to many (but not all) makefile targets that +reference other makefile targets. On some platforms (notably AIX, Solaris, +SunOS) there are specific targets for different compilers, so I skipped +those. makefile, 10 Mar 2004. + +Added error checking to kermit:// URL macros, so they don't plow ahead +after the connection is closed. ckcmai.c, 11 Mar 2004. + +Added FreeBSD 4.9 and 5.1 targets (only the herald is affected). +makefile, ckuver.h, 11 Mar 2004. + +Added "LIBS=-lcrypt" to bsd44 targets since nowadays crypt is almost always +unbundled from libc. Also added explanatory notes. makefile, 11 Mar 2004. + +Changed MANDIR to default to $(manroot)/man/man1, and manroot to default +to $(prefix). More adding of CC=$(CC) clauses: {Free,Net,Open}BSD, 4.4BSD. +makefile, 11 Mar 2004. + +Miscellaneous cleanups: ckuusx.c, ckcnet.c, ckufio.c, 11 Mar 2004. + +Corrected the check in the linux target to see if /usr/include/crypt.h +exists, and if so to define HAVE_CRYPT_H, which is used in ckcdeb.h to +#include to get the prototype for crypt() and prevent bogus +conversions on its return type on 64-bit platforms (the previous test wasn't +quite right and the resulting symbol wasn't spelled right). makefile, +12 Mar 2004. + +From Jeff, 14 Mar 2004: + . Initialize localuidbuf[] in tn_snenv(): ckctel.c. + . Remove remote-mode checks in hupok() for K95G only (why?): ckuus3.c. + . Add help text for new K95-only TYPE /GUI switches: ckuus2.c. + . TYPE /GUI parsing, ...: ckuusr.c. + . TYPE /GUI action, dotype(): ckuus6.c + . Change Jeff's affiliation: most modules. + +20 Mar 2004: Looked into adding long file support, i.e. handling files more +than 2GB (or 4GB) long. Discovered very quickly this would be a major +project. Each platform has a different API, or environment, or transition +plan, or whatever -- a nightmare to handle in portable code. At the very +least we'll need to convert a lot of Kermit variables from long or unsigned +long to some new Kermit type, which in turn is #defined or typedef'd +appropriately for each platform (to off_t or size_t or whatever). Then we +have to worry about the details of open() vs fopen(); printf() formats (%lld +vs %Ld vs %"PRId64"...), platforms like HP-UX where you might have to use +different APIs for different file systems on the same computer, etc. We'll +need to confront this soon, but let's get a good stable 8.0.211 release out +first! Meanwhile, for future reference, here are a few articles: + +General: http://freshmeat.net/articles/view/709/ +Linux: http://www.ece.utexas.edu/~luo/linux_lfs.html +HP-UX: http://devrsrc1.external.hp.com/STK/partner/lg_files.pdf +Solaris: http://wwws.sun.com/software/whitepapers/wp-largefiles/largefiles.pdf + +Looked into FTP timeouts. It appears I can just call empty() (which is +nothing more than a front end for select()) with the desired timeout before +any kind of network read. If it returns <= 0, we have a timeout. This is +not quite the same as using alarm() / signal() around a recv() (which could +get stuck) but alarm() / signal() are not not used in the FTP module and are +not naturally portable to Windows, but select() is already in use in the FTP +module for both Unix and Windows. This form of timeout could be used +portably for both command response and data reads. What about writes to the +command or data socket? They can get stuck for hours and hours without +returning too, but the select() approach won't help here -- we need the +actual send() or recv() to time out, or be wrapped in an alarm()/signal() +kind of mechanism. But if we can do that for sends, we can also do it for +receives. Better check with Jeff before I start programming anything. +20 Mar 2004. + +Later: Decided to postpone the above two projects (ditto IPv6) until after +8.0.211 is released because both will have major impacts on portability. +Grumble: all i/o APIs should have been designed from the beginning with a +timeout parameter. To this day, hardly any have this feature. + +3-4 Apr 2004: More 8.0.211 Beta.02+ test builds: + + . FreeBSD 3.3 + . FreeBSD 4.4 + . Linux Debian 2.1 + . Linux RH 6.1 + . Linux RH 7.1 + . Linux RH 7.2 + . Linux RH 9 (with 84 different combinations of feature selection) + . Linux SuSE 6.4 + . Linux SuSE 7.0 + . NetBSD 1.4.1 + . NetBSD 1.5.2 + . OpenBSD 2.5 + . OpenBSD 3.0 + . QNX 4.25 + . SCO UnixWare 2.1.3 + . SCO UnixWare 7.1.4 + . SCO OpenServer 5.0.7 + . SCO XENIX 2.3.4 (no TCP) + +Changes needed: None. + +Problem: SCO XENIX 2.3.4 network build failed in the FTP module with +header-file syntax and conflicting-definitions trouble. I'm not going to +try to fix it; 8.0.209 built OK with FTP, so we'll just keep that one +available. + +Got access to VMS 8.1 on IA64. Building the nonet version of C-Kermit +required minor modifications to ckvvms.h, ckv[ft]io.c, and ckvcon.c, to +account for a third architecture. Also to SHOW FEATURES in ckuus5.c. Once +that was done, the UCX 5.5 version built OK too. Starts OK, makes Telnet +connection OK, sends files. Has some obvious glitches though -- "stat" +after a file transfer reports 0 elapsed time (in fact it was 00:09:48) and +1219174400 cps (when in fact it was 10364). This doesn't happen on the +Alpha. Btw, the IA64 binary is twice as big as the Alpha one. Changed +to Beta.03. 5 Apr 2004. + +Fixed the ckdaily script to include the makefile and man page in the Zip +file (they were not included because the Zip file was intended mainly for +VMS users, but some Unix users prefer Zip to tar.gz). 6 Apr 2004. + +Traced problems in VMS/IA64 statistics report to rftimer()/gftimer() in +ckvtio.c, which use sys$ and lib$ calls to figure elapsed time. These work +on VAX and Alpha but not IA64. Sent a report to the chief engineer of the +IA64 VMS port; he says it's probably a bug in VMS 8.1 (which is not a real +release); he'll make sure it's fixed in 8.2. As an experiment, tried +swapping in the Unix versions of these routines (which call gettimeofday() +etc). They seem work just fine (it hung a couple times but I think that's +because the underlying system hung too; trying it later on a new connection, +it was fine; however I noticed a BIG discrepancy in throughput between +sending and receiving). Moved definitions for VMS64BIT and VMSI64 to +ckcdeb.h so all modules can use them and added them to the SHOW FEATURES +display. Added VMSV80 definition to build procedure. Beta.03+. ckcdeb.h, +ckcuus5.c, ckcvvms.h, ckvtio.c, ckvker.com, 6 Apr 2004. + +While doing the build-all, I noticed the VMS version did not build with +Multinet or older UCX versions, always with the same errors -- undeclared +variables, undefined symbols, all TCP/IP related. This didn't happen a +couple weeks ago... Somehow the order of #includes was messed up -- +ckuusr.h depended on symbols that are defined in ckcnet.h, but ckcnet.h +was being included after ckuusr.h... this was compounded by two missing +commas in ckvker.com. 11 Apr 2004. + +Removed Beta designation, released as 8.0.211, 10 Apr 2004. + +I had somehow lost the edit to ckutio.c that changed the UUCP lockfile for +Mac OS X from /var/spool/uucp to /var/spool/lock. So I slipped it in and +re-uploaded version 8.0.211. You can tell the difference because SHOW +VERSIONS has 17 Apr 2004 for the Communications I/O module. Also the 10.3 +executable now has a designer banner: "Mac OS X 10.3". makefile, ckuver.h, +ckutio.c, ckuus[45].c, 17 Apr 2004. + +---8.0.211--- + +Removed "wermit" from "make clean" (how did it get there?). makefile. + +From Jeff, applied 10 May 2004. + . Rearrange #ifdefs that define OS/2-only features. ckcdeb.h. + . Fix two strncat()s that should have been ckstrncat()s. ckuus7.c. + . Fix two strncat()s that should have been ckstrncat()s. ckuus4.c. + . Fix one strncat(). ckcfns.c. + . SET FTP CHAR ON used backwards byte order when output to screen. ckcfns.c. + . Fix two strncat()s. ckuus3.c. + . Add SET NETWORK TYPE NAMED-PIPE for K95. ckuus3.c. + . Add "No active connections" message to hupok(). ckuus3.c. + . Fix many strncat()s. ckcnet.c. + . Fix some strncat()s. ckcftp.c + . Make FTP port unsigned short for 16383 < port < 65536. ckcftp.c. + . Improvements to FTP USER command. ckcftp.c. + . Fix FEAT parsing to allow for various forms of whitespace. ckcftp.c. + +S-Expression (AND FOO BAR) would not short-circuit if FOO's value was 0, +even though short-circuiting code has been there since Day 1. Similarly for +(OR BAR FOO). Turns out the first operand was a special case that bypassed +the short-circuit check. Fixed in dosexp(): ckuus3.c, 10 May 2004. + +Red Hat 7.3 (and maybe others) referenced open() without first +ensuring it was declared. The declaration is in , which is after + in ckutio.c series of #includes. Made a special case for this. +ckutio.c (see comments), 10 May 2004. + +If the local Kermit's parity is set to SPACE and then a file arrives via +autodownload, automatic parity detection improperly switches it to NONE. +Fixed in rpack() by switching parity automatically only if parchk() returns +> 0 (rather than > -1), since NONE and SPACE are indistinguishable. A +bigger problem still remains: autodownload does not work at all if the +sender is using actual parity bits (even, odd, or mark) and the receiver's +parity is NONE. ckcfn2.c, 10 May 2004. + +When a DIAL MACRO is defined and the phone number is comprised of more than +one "word" (i.e. contains spaces), the dial macro loses the second and +subsequent words after the first call. Fixed in xdial() by inserting quotes +around phone number before passing it to xdial(). ckuus6.c, 10 May 2004. + +DIAL MACRO fix was not right; the quotes were kept as part of the phone +number and sent to the modem. dodo() pokes its argument to separate the +macro argument string into its component arguments. xdial() is called +repeatedly on the same string, so after the first time, a NUL has been +deposited after the first word of the telephone number. The fix is to have +xdial() create a pokeable copy of its argument string before calling +dodo(dial-macro,args...). It might seem odd that dodo pokes its argument, +but making copies would be would be prohibitive in space and time. +ckuus6.c, 23 May 2004. + +FTP CD did not strip braces or quotes from around its argument. Fixed in +doftprmt(): ckcftp.c, 23 May 2004. + +Added client side of REMOTE MESSAGE/RMESSAGE/RMSG: ckuus[r27].c, 23 May 2004. + +Server side of REMOTE MESSAGE: ckcpro.w, 23 May 2004. + +From Dave Sneddon: an updated CKVKER.COM containing a fix where the +COMPAQ_SSL symbol was not defined but later referenced which generated an +undefined symbol error. ckvker.com, 5 Jan 2005. + +From Andy Tanenbaum (28 May 2005): + . Fix an errant prototype in ckcker.h and ckucmd.h - () instead of (void). + . Add support for MINIX 3.0. makefile, ckutio.c, ckufio.c, ckuver.h. + +Fixed messed-up sndhlp() call which apparently had been jiggered to +compensate for the bad prototype which has now been fixed, ckcpro.w, +12 Jun 2005. + +From Jeff (12 June 2005): + . Security updates. ck_ssl.c, ck_crp.c, ckuath.c. + . Fix bug in K95 SET PRINTER CHARACTER-SET. ckuus3.c. + . Add printer character-set to K95 SHOW PRINTER display. ckuus5,c + . Add SET MSKERMIT FILE-RENAMING to K95. ckuus7.c, ckuusr.h. + . Add help for K95 SET MSKERMIT. ckuus2.c. + . Add SET GUI CLOSE to K95. ckuusr.h, ckuus2.c, ckuus3.c + . Add help text for K95 SET GUI MENUBAR and TOOLBAR. ckuus2.c. + . Add --noclose command-line option for K95. ckuusy.c + . Add PAM support for Mac OS X. ckufio.c. + . Add GSSAPI support for Mac OS X. ckcftp.c. + . Pick up more URL options. ckcker.h, ckuusy.c. + . Fix bug in delta-time calculation across year boundary. ckucmd.c. + . Add Secure Endpoints to copyright notices. ckcmai.c. + . Fix FTP HELP to override unverbose setting. ckcftp.c. + . Fix assorted minor typos. + +From Matthias Kurz: automatic herald generation for NetBSD 2.0 and later, +"make netbsd2". ckuver.h, makefile, 12 Jun 2005. + +Added SET TERMINAL LF-DISPLAY, like CR-DISPLAY but for linefeed rather than +carriage return. ckuusr.h, ckuus[257x].c, 12 Jun 2005. + +Made a command-line option --unbuffered to do what the -DNONOSETBUF +compile-time option does, i.e. force unbuffered console i/o. Unix only. +ckuusr.h, ckuusy.c, ckutio.c, 12 Jun 2005. + +Fixed getiact() (which displays TERM IDLE-ACTION setting) to display +space as \{32}. ckuus7.c, 12 Jun 2005. + +Added LMV as a synonym for LRENAME, which is itself a synonym for LOCAL +RENAME. ckuusr.c, 12 Jun 2005. + +Put HELP SET TERMINAL DG-UNIX-MODE text where it belonged. ckuus2.c, +12 Jun 2005. + +Added IF LINK (Unix only) to test if a filename is a symlink. Uses the most +simpleminded possible method, calls readlink() to see if it succeeds or fails. +No other method is dependable across different Unixes. This code should be +portable because I already use readlink() elsewhere within exactly the same +#ifdefs. ckufio.c, ckuus2.c, ckuus6.c, 12 Jun 2005. + +Fixed a bug in which \fdir() wouldn't work when its argument was the nonwild +name of a directory file. zxpand(): ckufio.c, 12 Jun 2005. + +Made \fdirectory() a synonym for \fdirectories(). Made \fdir() an +acceptable abbreviation for these, even though it clashes with \fdirname(), +which still works as before. ckuus4.c, 12 Jun 2005. + +Added the long-needed \flopx() function, to return rightmost pieces of +strings, such as file extensions. \fstripx() and \flopx() are the +orthogonal functions we need to pick filenames apart from the right: +\stripx(foo.tar.gz) = foo.tar; flopx(foo.tar.gz) = gz. ckuusr.h, ckuusr.c, +ckuus2.c, 12 Jun 2005. + +Removed reference to defunct fax number, ckcmai.c, 12 Jun 2005. + +Added -DHAVE_PTMX to linux+krb5+openssl+zlib+shadow+pam. From Timothy Folks. +makefile, 12 Jun 2005. + +Built on Solaris 9 and NetBSD 2.0. + +From Jeff: New build target for Mac OS X 10.3 with Kerberos 5 and SSL. +makefile, 14 Jun 2005. + +Fixed error in ckuver.h NetBSD #ifdefs. 15 Jun 2005. + +Fixed SET TERMINAL IDLE-ACTION OUTPUT to work as documented, namely if the +output string is empty, to send a NUL. Previously there was no way to make +it send a NUL. ckuus7.c, 15 Jun 2005. + +Suppose (in Unix, for example) a filename contains wildcard characters, such +as {abc}.txt. When referring to such a file (e.g. in a SEND command), these +characters can be quoted, e.g. \{abc\}.txt. But if the file list has been +obtained programmatically, e.g. stored in an array, there is no way, short +of tedious, complicated, and error-prone string processing, to reference the +file. For this we need a way to disable wildcard processing. I added { ON, +OFF } choices for the SET WILD and SHOW FILE commands: ckuusr.h, ckuus[234].c. +{ ON, OFF } turns wildcarding off and on without affecting the { KERMIT, +SHELL } agent choice; it does this by setting a new and separate global +variable, wildena. Added semantics to ckufio.c. Crude but effective. It +might have been more Unixlike to add Yet Another form of quoting but we +have enough of that already (later maybe I'll add a \function() for this). +Needs to be propagated to Windows and VMS. 15 Jun 2005. + +Improved and fixed typos in HELP WILDCARD and HELP PATTERN. ckuus2.c, +15 Jun 2005. + +The GREP command, and probably anything else that uses ckmatch() for pattern +matching, failed on patterns like */[0-3]*.html. The [a-b] handler, when +failing to match at the current position, neglected to back up the pattern +and try again on the remainder of the string. I also fixed another case, in +which matching a literal string a*b?c against the pattern a[*?]*[?*]c caused +ckmatch() to recurse until it blew up. ckclib.c, 16 Jun 2005. + +Added builds and designer banner for Solaris 10. makefile, ckuver.h, +27 Jun 2005. + +Defined CKHTTP for NetBSD, the HTTP code builds and works fine there. +ckcdeb.h, 2 Jul 2005. + +Added #ifndef OSF40..#endif around definition of inet_aton() in ck_ssl() +to allow building in Tru64. Added tru64-51b+openssl to makefile. +15 Jul 2005. + +HTTP GET would fail if the URL contained any metacharacters, no matter how +much you quoted them. Although it uses cmfld() to parse the (partial) URL, +it then uses cmofi() to get the output filename, which by default is the +"filename" from the URL, which might be something like "rankem.asp?id=1639". +cmofi() refuses to accept unquoted metacharacters in "filenames" and that's +what happens in this case if the output filename is not specified. Worked +around this by disabling wildcard processing around HTTP GET using the new +"wildena" variable from June 15th. ckuusr.c, 18 Jul 2005. + +Fixed the June 16th fix to the pattern matcher. I fixed a real problem, but +I made an unrelated optimization that introduced new ones. ckclib.c, +18 Jul 2005. + +Added missing help text for \fb64encode() and \fb64decode(). ckuus2.c, +18 Jul 2005. + +Changed SET WILD OFF help text to warn that this setting prevents the +creation of backup files (later I'll have to see if something more useful +can be done about this). ckuus2.c, 18 Jul 2005. + +Built OK on Mac OS X 10.4.2 using macosx103 target (but with some +"signedness" warnings in ckcnet.c and ckcftp.c). Built on Unixware 7.1.4 +with uw7 target. 27-28 Jul 2005. + +Added -DCKHTTP to Mac OS X 10.3-.4 KFLAGS. Makefile, 4 Aug 2005. + +Built on BSDI 4.3.1. Added -DCKHTTP. + +Compact substring notation extended to accept not only start:length but also +start-end notation. Thus \s(foo[12:18]) means the substring of foo starting +at position 12 of length 18, and tne new \s(foo[12-18]) means the substring +of foo starting at position 12 and ending with position 18. Ditto for +\:(\%a), etc. ckuus4.c, 9 Aug 2005. + +See correspondence with Mark Sapiro, Nov 2003 and Sep 2004, about certain +variations on IF syntax having been broken by the introduction of "immediate +macros" circa 1999. It seems the problem -- variables not being expanded -- +always occurs in the ELSE part when (a) the IF condition is false; (b) the +ELSE command is "standalone", i.e. expressed as a separate command after the +IF command (original C-Kermit 5A syntax), and (c) its command list is a block. +This would suggest the problem is in the XXELS parser. + +Going back to 1999, I find this: + Fixed a problem Jim Whitby noticed with quoting in ELSE statements. This + problem was introduced when I unified IF and XIF, and occurs only when + ELSE begins on a line, followed by a { command list } rather than a single + command. The solution (gross) was to make a special version of pushcmd() + (called pushqcmd()) for this situation, which doubles backslashes while + copying, BUT ONLY IF it's a command list (i.e. starts with "{"); otherwise + we break lots of other stuff. Result passes Jim's test and still passes + ckedemo.ksc and iftest.ksc. ckucmd.c, ckuus6.c, 27 Sep 99. + +I undid this change and it made no difference to all the other IF +constructions (in fact, it fixed an unrelated one that was broken, so now +iftest scores 54 out of 54, instead of 53). However, it does not fix the +ELSE problem; in fact it pushes it all the way in the other direction: + + The opposite occurs any time you try to execute an immediate macro inside a + macro or any other { block }: not only is the variable evaluated, it is + evaluated into nothing. It looks like this happens only in immediate + macros, i.e. *commands* that start with '{'. So maybe we really have two + isolated problems, that can each be fixed. + +The situation is illustrated by this simple script: + + def xx { + if false { echo \%1, echo \%2 } + else { echo \%3, echo \%4 } + } + xx one two three four + +With pushqcmd() it echoes the variable names literally; with pushcmd() it +echoes empty lines. Since ELSE, when its argument is a block, dispatches +to the immediate-macro handler, it seems we have unified the two problems, +so fixing one should fix the other. + +The problem is that we define a new temporary macro and then call dodo() to +execute it. But if the definition contains macro arguments, we have added a +new level of macro invocation, thus wiping out the current level of args. +The cure is to expand the variables in the immediate macro in the current +context, before executing it. This means simply changing the cmtxt() call +that reads the immediate macro to specify xxsting as its processing +function, rather than NULL, which is used for real macros to defer their +argument evaluation until after the macro entered. ckuusr.c, 11 Aug 2005. + +Added a new makefile target, macosx10.4, for Mac OS X 10.4. This one uses +an undocumented trick to get the otherwise unavailable-except-by-clicking +Mac OS X version number (in this case 10.4.2) and stuff it into the HERALD +string. makefile, 11 Aug 2005. + +Built OK on Solaris 9, Solaris 10 (with a few implicit declaration warnings +in ckuusx.c), Mac OS X 10.4.2 (with some warnings in ckcnet.c and ckcftp.c), +Mac OS X 10.3.9 (also using the macos10.4 entry, which gets the right +version number, and gets no warnings at all), RH Enterprise Linux AS4 on AMD +x86_64, Tru64 Unix 4.0F, SCO UnixWare 7.1.4 + +For docs and/or scriptlib: Unix C-Kermit can be a stdin/out filter. The +trick is to use the ASK, ASKQ, or GETC command for input, specifying no +prompt, and ECHO or XECHO for output, e.g.: + +while true { + ask line + if fail exit 0 + echo \freverse(\m(line)) +} +exit 0 + +FOPEN didn't do anything with the channel number if the open failed, so any +subsequent command that tried to reference it would get a parse error it was +undefined or non-numeric, not very helpful. Changed FOPEN to set the +channel number to -1 if the file can't be opened. Now subsequent operations +on the channel fail with "Channel -1: File not open". I also added two +magic channel numbers: -8 means that any FILE command (besides OPEN and +STATUS) on that channel is a noop that succeeds silently; -9 is a noop that +fails silently. So now it's possible to simply set a channel number to one +of these values to disable i/o to certain file without getting lots of error +messages. dofile(): ckuus7.c, 12 Aug 2005. + +Added automatic herald construction for UnixWare 7. makefile, 12 Aug 2005. + +Unix isdir() never allowed for arguments that started with tilde, so gave +incorrect results for ~/tmp/ or ~fdc. The problem was mainly invisible +since most commands that parsed file or directory names used cmifi(), cmdir(), +etc, which did the conversions themselves. But IF DIRECTORY was an exception, +since its operand had to be treated as just text, and then tested after it +was parsed. ckufio.c, 13 Aug 2005. + +Fixed the following: +"ckuusx.c", line 8959: warning: implicit function declaration: ckgetpeer +"ckufio.c", line 1869: warning: implicit function declaration: ttwait +"ckufio.c", line 2941: warning: implicit function declaration: mlook +"ckufio.c", line 2943: warning: implicit function declaration: dodo +"ckufio.c", line 2944: warning: implicit function declaration: parser +"ckcftp.c", line 2625: warning: implicit function declaration: delta2sec +"ckcftp.c", line 4071: warning: no explicit type given for parameter: prm +"ckcftp.c", line 8389: warning: no explicit type given for parameter: brief +ckuusx.c, ckufio.c, ckcftp.c, ckucmd.h. 13 Aug 2005. + +Unbuffered stdout code has never worked because the setbuf(stdout,NULL) call +has to occur before the stdout has been used. The reason it's needed is +that some Kermit code writes to stderr (which is unbuffered) and other code +writes to stdout, and therefore typescripts can come out jumbled. Robert +Simmons provided the needed clue when he insisted it +worked only when executed at the very beginning of main(). So I moved the +code to that spot. But since now we also want to make unbuffered a runtime +(command-line) option, I had to do a clunky by-hand pre-prescan inline in +main() to look thru argv[], even before prescan() was called. ckcmai.c, +ckutio.c, ckuusy.c, 13 Aug 2005. (Now that this works, it might be a good +idea to remove all use of stderr from Kermit.) + +Managed, after some finagling, to build a 64-bit version on Solaris 10 at +Utah Math with Sun cc. (Can't make any gcc builds at all, 32- or 64-bit, +they all blow up in .) New target: solaris10_64. makefile, +15 Aug 2005. + +The 64-bit Solaris 10 version compiles and links OK and transfers files in +remote mode. It can make FTP connections and use them, but Telnet connections +always fail with "network unreachable". This is with all default libs and +include files. Nelson has a separate set in /usr/local, which he references +explicitly in all his 64-bit builds, but using these makes no difference. +Some data type is wrong in ckcnet.c. But telnet works fine in 64-bit Linux +and Tru64 builds. Debug logs trace the difference to netopen() (of course), +the spot where we test the results of inet_addr(), which is already marked +suspicious for 64-bit builds. It seems that inet_addr() is of type in_addr_t, +which in turn is u_int32, i.e. an unsigned 32-bit int. Yet the man page says +that failure is indicated by returning -1. I guess this doesn't matter in +32-bit builds, but in the 64-bit world, the test for failure didn't work +right. I made a Solaris-specific workaround, and checked that it works in +both 32-bit and 64-builds. I really hate typedefs. ckcnet.c, 15 Aug 2005. + +Changed the plain-text version (as opposed to the popup or GUI version - the +GUI version, at least, already does this) of ASKQ to echo keystrokes +asterisks rather than simply not echo anything, so it's easier to see what +you're doing, the effects of editing, etc. Experimental; for now, there's +no way to disable this. Not sure if there needs to be. Anyway, to get this +working required a fair amount of cleaning up of gtword(), which was echoing +different ways in different places. ckuus6.c, ckucmd.c, 15 Aug 2005. + +Added a solaris9_64 target for building a 64-bit version on Solaris 9 with +Sun cc. Verified, using the DIR command and \fsize() function on a 4.4GB +file, that the Solaris 64-bit version of Kermit gets the size correctly, and +that it can copy such a file (thus its fopen/fread/fwrite/fclose interface +works right). Initiated a large-file transfer between here and Utah over +SSH and verified that it puts the correct file size in the A packet when +sending; the right quantities are shown on the file transfer display (file +size CPS, percent done, etc). But even at 5Mb/sec, it takes a good while to +transfer 4.4GB, more than 2 hours (not streaming; 30 window slots, 4K +packets, maybe it would go faster with streaming)... After an hour or so, +it filled up the partition and gave up (gracefully) before it reached the +2GB frontier (drained its pending packets, closed the partial file). +Restarted at 12:54, this time with streaming and 8K packets (the speed +wasn't significantly different). This time it transferred 95% of the file +(4187660288 bytes) before failing because the disk filled up. Went to Utah +and started a transfer between two Solaris 10/Sparc hosts; this goes about 8 +times faster. The transfer completed successfully after 17m41s. All fields +in the f.t. display looked right the whole time. Then I verified various +other 64-bit combinations transferring the same 4.4GB file: + + To................ + From Sol Amd i64 Tru + Sol OK OK OK OK Sol = Solaris 10 / Sparc + Amd OK Amd = AMD x86_64 RH Enterprise Linux AS4 + i64 OK i64 = Intel IA64, RH 2.1AS + Tru Tru = Tru64 Unix 4.0F Alpha + +(The other combinations are difficult to test for logistical reasons.) + +Tried sending the same long file with Kermit's FTP client. It chugged along +for a while until I stopped it; it would have taken hours to complete. +There is no indication that it wouldn't have worked, assuming the FTP server +could also handle long files, which who knows. Anyway, Kermit showed all +the right data on the display screen. 17 Aug 2005. + +On AMD x86_64 and IA64 native 64-bit Linux builds, the pty routines did not +work at all. ptsname() dumped core. If I commented out ptsname(), then the +next thing dumped core. The same code works on the other 64-bit builds. +Poking around, I see that this version of Linux has an openpty() function, +which I could try using instead of the current API -- grantpty(), etc. Then +I see that openpty() is already coded into Kermit's pty module, +conditionalized under HAVE_OPENPTY, which has never before been defined for +any build. I added a test to the makefile linux target (look for the +openpty() prototype in , if found define HAVE_OPENPTY as a CFLAG and +also add -lutil to LNKFLAGS). Works fine on the problem builds, and also +on previously working 32-bit builds. makefile, 17 Aug 2005. + +Fixed a bug in the ASKQ echo asterisks code, which made the VMS version of +C-Kermit always echo asterisks. Turns out that some code in the main parse +loop to reset command-specific flags was in the wrong place, which had other +effects too, for example ASKQ temporarily turns off debug logging as a +security measure, but the code to turn it back on was skipped in most cases. +Some other side effects related to the DIRECTORY and CD commands might have +been possible but I haven't seen them. ckuus[56].c, 23 Aug 2005. + +Problem reported when sending a file to VMS when the name in the F packet +starts with a device specification and does not include a directory field, +and PATHNAMES are RELATIVE. Example: dsk:foo.bar becomes f_oo.bar. The +code assumes that if there is a device field, it is followed by a directory +field, and it inserts a dot after the '[', which in this case is not there. +Later the dot becomes '_' because of the only-one-dot rule. Solution: only +insert the dot if there really is an opening bracket. nzrtol(): ckvfio.c, +23 Aug 2005. + +A report on the newsgroup complains that C-Kermit and K95 servers were +sending REMOTE DIR listings with only #J line terminators, rather than #M#J. +Yet all the other REMOTE xxx responses arrived with #M#J. snddir() was +neglecting to switch to text mode. ckcfns.c, 26 Aug 2005. + +Back to long files. What happens if 32-bit Kermit is sent a long file? +It gets an A-packet that looks like this: + + ^A_"A."U1""B8#120050815 18:28:03!'42920641*4395073536,#775-!7@ )CP + +The 32-bit receiver reacts like so: + + gattr length[4395073536]=100106240 + +the first number being the string from the A-packet, the second being the +value of the long int it was converted to by atol(). Clearly not equal in +this case. When this happens Kermit should reject the file instead of +accepting it and then getting a horrible error a long time later. Added +code to gattr() to convert the result of atol() back to a string and compare +it with the original string; if they're not equal, reject the file on the +assumption that the only reason this could happen is overflow. Also some +other code in case the sender sends the only LENGTHK attribute. Now files +whose lengths are too big for a long int are rejected right away, provided +the sender sends the length in an A packet ahead of the file itself. If +this new code should ever cause a problem, it can be bypassed with SET +ATTRIBUTE LENGTH OFF. ckcfn3.c, 26 Aug 2005. + +As I recall from when I was testing this a few weeks ago, when the too-big +length is not caught at A-packet time, the transfer fails more or less +gracefully when the first attempt is made to write past the limit. I went +to doublecheck this by sending a big file from the 64-bit Solaris10 version +to a 32-bit Mac OS X version that does not have today's code. The Mac +thinks the incoming file is 2GB long when it's really 4GB+. But in this +case, something new happens! Although the percent done and transfer rate go +negative, the file keeps coming. It would seem that Mac OS X lets us create +long files without using any special APIs. The transfer runs to completion. +Mac OS X Kermit says SUCCESS (but gets the byte count and cps wrong, of +course). But then a STATUS command says FAILURE. The file was, however, +transferred successfully; it is exactly the same length and compares byte +for byte with the original. This tells me that in the Mac OS X version -- +and how many others like it??? -- today's rejection code should not be +enabled. Meanwhile I put today's new code in #ifndef NOCHECKOVERFLOW..#endif, +and defined this symbol in the Mac OS X 10.4 target. Over time, I'll have +to find out what other platforms have this characteristic. And of course +I'll also have to do something about file-transfer display, statistics, and +status. makefile, ckcfn3.c, 26 Aug 2005. + +From now on I'm going to bump the Dev.xx number each time I upload a new +ckdaily. This one will be Dev.02. ckckmai.c, 26 Aug 2005. + +Got rid of all the extraneous FreeBSD 4 and 5 build targets. Now there's +one (freebsd) for all FreeBSD 4.1 and later. makefile, 27 Aug 2005. + +Mac OS X 10.4 (Tiger) is a 64-bit OS. Building C-Kermit 0n 10.4.2 without +any special switches stilll gives a 32-bit executable. Ditto building with +-mpowerpc64. Further investigation turned up a tip sheet on MySQL that says +you have to include all of these: -mpowerpc64 -mcpu=G5 -mtune=G5 -arch +ppc64. That did the trick. New makefile target: macosx10.4_64. But the +10.4.2 system I tried did not have 64-bit [n]curses or resolv libs, so this +build has no -DNOCURSES -DNO_DNS_SRV. makefile, 27 Aug 2005. + +Created a symbol CK_64BIT to indicate true 64-bit builds at compile time. +Added 64-bit announcement to the startup herald and the VERSION text. +ckcdeb.h, ckuus[r5].c, 27 Aug 2005. + +Added a built-in variable \v(bits) to indicate the size of the build +(16, 32, 64, or whatever else sizeof() might report). ckuusr.h, ckuus4.c, +27 Aug 2005. + +Got rid of all the warnings in 64-bit Mac OS X about args to getsockopt(), +getsockname(), and getpeername(), and the comparisons on the return value +of inet_addr(). ckcnet.[ch], 27 Aug 2005. + +Now to check the effects on other builds... + Linux on AMD64: ok. + Linux on IA64: ok. + Linux on i386: ok. + Mac OS X 10.3.9 32-bit: ok. + Solaris 10 64-bit: ok. + Solaris 9 32-bit: ok. + Tru64 4.0F: ok. + FreeBSD 4.11: ok. + FreeBSD 5.4 ia64 (64-bit): ok. + FreeBSD 5.4 i386 (32-bit): ok. + +The Tru64 5.1B build totally blew up because they have their own unique +sockopt/etc length-argument data type (int!), so I had to roll back on using +socklen_t for this in all 64-bit builds. Checked to make sure it still +builds on Tru64 4.0F after this change (it does). ckcnet.h, 27 Aug 2005. + +The HP-UX 11i/ia64 build comes out to be 32-bit but thinks it's 64-bit. +CK_64BIT is set because __ia64 is defined. So how do I actually make a +64-bit HP-UX build? I tried adding +DD64 to CFLAGS, and this generates +64-bit object files but linking fails to find the needed 64-bit libs +(e.g. -lm). For now I added an exception for HPUX to the CK_64BIT +definition section. ckcdeb.h, 27 Aug 2005. + +Took the time to verify my recollection about the "graceful failure" on a +regular Pentium Linux system when receiving a too-big file... OK, it's not +exactly graceful. It gets a "File size limit exceeded" error; the message +is printed in the middle of the file-transfer display, apparently not by +Kermit, and Kermit exits immediately. Looks like a trap... Yup. "File +size limit exceeded" is SIGXFSZ (25). What happens if we set it to SIG_IGN? +Just the right thing: The receiver gets "Error writing data" at 2147483647 +bytes, sends E-packet to sender with this message, and recovers with total +grace (drains packet buffers, returns to prompt). ckutio.c, 27 Aug 2005. + +Backed off from rejecting a file because its announced size overflows a +long. Now instead, I set the file size to -2 (a negative size means the +size is unknown, but we have always used -1 for this; -2 means "unknown and +probably too big"). In this case, the f-t display says: + + File Size: POSSIBLY EXCEEDS LOCAL FILE SIZE LIMIT + +then the user can interrupt it with X or whatever, or can let it run and +see if maybe (as in the case of Mac OS X) it will be accepted anyway. This +way, we skip all the bogus calculations of percent done, time remaining, etc. +ckcfn3.c, ckuusx.c, 27 Aug 2005. + +Discovered that VMS C-Kermit on Alpha and IA64 is a 32-bit application; +sizeof(long) == sizeof(char *) == 4. Tried adding /POINTER_SIZE=64 to VMS +DECC builds on Alpha and IA64, but the results aren't great. Tons of +warnings about pointer size mismatches between Kermit pointers and RMS ones, +and the executable doesn't run. It appears that access to long files +would require a lot of hacking, similar to what's needed for 32-bit Linux. + +--- Dev.02: 27 Aug 2005 --- + +From Jeff, 28 Aug 2005. + . Fix SSH GLOBAL-KNOWN-HOSTS-FILE / USER-KNOWN-HOSTS-FILE parsing, ckuus3.c. + . Pick up K95STARTFLAGS from environment, ckuus4.c. + . Fix some typos in command-line processing (-q), ckuus4.c. + . Be sure to suppress herald if started with -q, ckuus7.c. + . Fix ssh command-line switches, ckuusy.c. + +Eric Smutz complained that HTTP POST was adding an extraneous blank line, +which prevented his application from successfully posting. RFC 2616 states +(in Section 4.1): + + In the interest of robustness, servers SHOULD ignore any empty + line(s) received where a Request-Line is expected. In other words, if + the server is reading the protocol stream at the beginning of a + message and receives a CRLF first, it should ignore the CRLF. + + Certain buggy HTTP/1.0 client implementations generate extra CRLF's + after a POST request. To restate what is explicitly forbidden by the + BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an + extra CRLF. + +This seems pretty clear. One section of code in http_post() (just above the +postopen: label) was appending a CRLF to a buffer whose last already was +terminated by CRLF, and then appended a second CRLF; thus two empty lines. +I removed the second one. ckcnet.c, 28 Aug 2005. + +I looked into the 64-bitness of NetBSD, it seems to be like Linux and +FreeBSD on 64-bit hardware, i.e. you just build it there and it works, at +least on Alpha and AMD64, going back to NetBSD 1.4 or 1.5. But I don't have +access to any of these for verification and documentation on the Web is +scanty. + +Checked PeterE's complaint again of warnings in ckutio.c about parameter +list of get[ug]id() and gete[ug]id(). When I "make hpux1100o" on HP-UX +11.11 (PA-RISC), there are definitely no warnings. He says the same thing +happens on 10.xx, but I don't have access to that any more. I also did +"make hpux1100o" on HP-UX 11.23 (11i v2) (PA-RISC), also no warnings. +(Except in both cases, a warning about a comment within a comment in +/usr/include/sys/ptyio.h). On HP-UX 11i v2 on Itanium, however, there are +TONS of warnings, mostly of the "variable set but never used" kind. Also +"dollar sign used in identifier". Tracking this last one down, I see it's +complaining about code that's in #ifdefs for other platforms, such as +Apollo Aegis. Is "aegis" defined in HP-UX 11i v2/IA64? No! (It would show +up in SHOW FEATURES if it was.) Some phase of the compiler is complaining +about code that it should be skipping (and that, in fact, it *is* skipping +it because the build is successful). It's as if cc is running lint for me +but not telling lint which macros are defined and which are not. + +Verified that 64-bit linking fails in the same way for HP-UX 11i v2 on both +IA64 and PA-RISC. Sent a query to HP. + +Compiling ckcnet.c and ckcftp.c got the familiar sockopt-related warnings on +HP-UX 11i v2; turns out it is just like Tru64 Unix in using an int for the +length argument. Added another special case and the warnings went away. +ckcnet.h, 28 Aug 2005. + +Added some stuff to SHOW FEATURES to see what kinds of macros are exposed +(e.g. INT_MAX, LONG_MAX, LLONG_MAX, etc) and also show sizeof(long long) and +sizeof(off_t). Building this code all over the place will give me an idea +of how widespread these data types are, and to what extent I can tell +whether they are available from clues in the header files. (At first +glance, it appears that I'm not picking up , but adding an +#include for it is just asking for trouble.) No complaints about long long +or off_t from Solaris 9 or recent Linuxes. ckuus5.c, 28 Aug 2005. + +Fixed a warning in HP-UX 10 and 11 stemming from some old-style prototypes +in ckutio.c for get[re][gu]id(). ckutio.c, 29 Aug 2005. + +Updated minix3 target from Andy Tanenbaum. makefile, 29 Aug 2005. + +PeterE confirms that "long long" and off_t are available in all HP-UX 10 and +11, and in HP-UX 9 on PA-RISC but not Motorola. 30 Aug 2005. + +Got 64-bit builds to work on HP-UX. According to my notes, John Bigg of HP +said (in 1999) that HP-UX 10.30 and later require PA-RISC 1.1, and do not +work on PA-RISC 1.0. But is PA 1.0 64-bit or what? Today, Alex McKale of +HP said "The 64-bit binaries will work on all machines that have the same or +later release of HP-UX (excluding PA-RISC 1.1 machines)". Still need +clarification... Maybe it's that all IA64 builds can be 64-bit but I need +dual builds for PA-RISC. Meanwhile I started transfer of a 4GB+ file from +Solaris to HP-UX 11i but it exceeded some quota on the HP long before it +approached the 2G point. It failed cleanly and up until then it was working +fine (numbers, stats, etc). 30 Aug 2005. + +Support of large files in 32-bit builds began in 10.20. 64-bit application +support began in 11.00, but not all machines that run 11.00 support 64 bits. +About long files, see HP /usr/share/doc/lg_files.txt. + +PeterE found that certain patterns can still make Kermit loop; example: + + if match T01011-00856-21-632-073 *[abc] { echo GOOD } else { echo BAD } + if match T01011-00856-21-632-073 *[a-z] { echo GOOD } else { echo BAD } + +The minimum offending pattern is * followed immediately by an [xxx] +construction, followed by anything else, including nothing. Previous +versions of Kermit handled this one correctly, without looping (but failed +certain matches that should have succeeded). The new section of code I +added on 15 June, upon failure to match, advances the string pointer and +backs up the pattern to the previous pattern, and starts again +(recursively). However, there needed to be a corresponding check at entry +for an empty target string. ckmatch(): ckclib.c, 12 Sep 2005. + +PeterE discovered that "kermit -y filethatdoesnotexit" gives an erroneous +error message that names the user's customization, rather than the name +given on the command line. doinit(): ckuus5.c, 12 Sep 2005. + +FREAD does not get an error if it tries to read a record or file or piece of +file that is too big for its buffer. In particular, FREAD /SIZE:xxx seems +to succeed even if less than xxx was read. It should fail unless, perhaps, +it successfully read up to the end of the file. Furthermore, if xxx is +bigger than the file buffer size, it should complain. The buffer is +line[LINBUFSIZ], 32K. The lack of failure was due to code in dofile() that +adjusted the given size silently if it was greater than the buffer size, +which I removed, and also added a check when parsing the /SIZE: switch. +dofile(): ckuus7.c, 12 Sep 2005. + +That still didn't help with FREAD /SIZE:n returning less than n bytes, even +when they were available. That's because the underlying routine, z_in(), +didn't check fread()'s return code, which is the number of bytes read. +If fread() has smaller buffers, it needs to be called in a loop. z_in(): +ckuus7.c, 12 Sep 2005. + +Flen() fails on strings of length 8192 or more. The limitation is in the +callers of zzstring, which seem to be specifying an 8K buffer, in this case +fneval(). The operable symbols are FNVALL (max length of value returned by +a function) and MAXARGLEN (maximum length of an argument to a function). I +changed both of these for BIGBUFOK builds to be CMDBL. Buffers can never be +infinite, there has to be a limit. It's important to make everything work +consistently within that limit, and to make something useful happen when the +limit is exceeded. At this point, I can probably also increase the limits +for modern 32-bit systems, and certainly for 64-bit ones. Also there's no +point in worrying about 16-bit platforms any more; earlier C-Kermit versions +can still be used on them if necessary. ckuusr.h, 12 Sep 2005. + +Special #ifdefs for finding resolv.h and nameser.h in MINIX3 from Andy +Tanenbaum. ckcnet.c, 20 Sep 2005. + +PeterE noticed that ckmatch(), even though it works pretty well now, does a +lot of extra and unnecessary recursion after determining the string and +pattern do not match, at least when the pattern is of the form *[abc]. +After several false starts I was able reduce this effect to a minor level +(but not eliminate it all together) by changing a while loop into a do loop. +ckmatch(): ckclib.c, 15 Oct 2005. + +Added -DNOLONGLONG to HP-UX 8.00 and earlier builds, and to Motorola-based +HP-UX 9.00 builds. This is simply to inhibit the test for whether "long +long" is supported by the compiler, since when it isn't, the module +containing the test won't compile. makefile, ckuus5.c, 16 Oct 2005. + +Making ASKQ always echo asterisks is a bad idea, because when it doesn't +echo, it's the perfect way to read silently from stdin, e.g. in a CGI script +(INPUT can also be used for this but it's not as straightforward). So I put +the default for ASKQ back to no echoing, then gave ASKQ its own switch +table, which is the same as for ASK with the addition of an /ECHO:x switch, +which tells what character to echo. ckucmd.c, ckuus[26].c, 17 Oct 2005. + +Fixed a bug in FTP GET /COMMAND filename commandname; it always dumped core +dereferencing a null string (the nonexistent local asname). ckcftp.c, +17 Oct 2005. + +For docs: if you don't like the funny business that happens when you type +an IF command at the prompt, use XIF instead and it won't happen. Also note +that commands like "if xxx { echo blah } else { echo blah blah }" don't +work when typed at the prompt; you have to use XIF for this. + +Back to ckmatch()... Under certain conditions (e.g. patterns like *[abc]) +failure to match would not stop the recursion because the string and pattern +arguments are on the stack, as they must be, so there was no way for level +n-1 to know that level n had detected a definitive nonmatch and that no +further attempts at matching were required. The right way to handle this is +to recode the whole thing as coroutines, the cheap way out is with a global +static flag. Works perfectly, in the sense that the match.ksc test results +are identical to what they were before and the extra backing up and +recursion are eliminated. (The Oct 15th fix wasn't really a fix, it broke +a couple of cases.) ckclib.c, 20 Oct 2005. + +ckuus7.c(2987): warning #267: the format string requires additional arguments +(in PURGE command); fixed 20 Oct 2005. + +From Andy Tanenbaum, final changes for MINIX3: #ifdef out the inline +definitions for gettimeofday() and readlink(). ckutio.c, 23 Oct 2005. + +From Jeff: struct gss_trials initializers changed from gss_mech_krb5 to +ck_gss_mech_krb5. ckcftp.c, 23 Oct 2005. + +From Jeff: some improvements to K95 GUI SHOW TERMINAL. ckuus5.c, 23 Oct 2005. + +Found and corrected some misplaced #ifdefs in shofeat(), ckuus5.c, 23 Oct 2005. + +--- Dev.03 --- + +Fixed a compiler warning in a debug() statement in zzstring() by adding +parens. ckuus4.c, 24 Oct 2005. + +Added -DNOLONGLONG to sv68r3v6 target, makefile, 25 Oct 2005. + +New makefile targets for HP-UX from PeterE to handle the 'long long' +situation. 26 Oct 2005. + +From Jeff: changes to support OpenSSL 0.9.8, ck_ssl.h. ckcasc.h has had +short names defined for ASCII control characters for 20-some years but now +they are causing conflicts, so EM becomes XEM (also for OpenSSL 0.9.8). +Changed K95's default terminal type from VT320 to VT220 because VT320 +termcaps/terminfos are disappearing from Unix hosts: ckuus7.c. Reorganize +the data-types section of SHOW FEATURES to add more macro tests for integral +sizes and to provide for the proper printf formatting in order to allow the +sizes to be output ("You are going to need to be careful because %llx is not +supported on all platforms. On Windows, it is the same as %lx, 32 bits"): +ckuus5.c, 26 Oct 2005. + +Defined NOLONGLONG ckcdeb.h for various old platforms where we know we are +never going to need 64-bit ints (even if they support a long long datatype, +chances are pretty slim they supported 64-bit file sizes). ckcdeb.h, +26 Oct 2005. + +PeterE noticed that GOTO targets can only be 50 characters long. This was +by design, a long time ago, on the assumption that nobody would make longer +labels. But in SWITCH statements, case labels can be variables that expand +to anything at all. If we chop them off at 50, we might execute the wrong +case. Changed the maximum label size to be 8K, and added code to dogoto() +to check when a label or target is too long and fail, to prevent spurious +GOTO or SWITCH results. ckuusr.h, ckuus[r6].c, 26 Oct 2005. + +Testing revealed there was still a problem with SWITCH case labels that were +variables that expanded into long strings. Turns out that I was being +too clever when I decided that, if the SWITCH macro was n1 characters long +and the case-label search target was n2 characters long, I only had to +search the first n1-n2+1 characters of the macro definition. That was true +before I allowed case labels to be variables, but not any more! Fixed in +dogoto(): ckuus5.c, 26 Oct 2005. + +--- Dev.04 --- + +Dev.04 didn't actually contain Jeff's data-type changes to shofeat(), +I think I saved the wrong buffer in EMACS... Fixed now. 27 Oct 2005. + +PeterE corrected a typo in the HP-UX 7.00 makefile target. 27 Oct 2005. + +PeterE had been reporting problems stress-testing the new SWITCH code, but +only on HP-UX 9, primarily stack overrun. Turns out to be the HP-UX 9 +optimizing compiler's fault. No optimization, no problems. + +PeterE found that even when dogoto() detects a string that is too long +and fails, this does not stop SWITCH from producing a result, which can not +possibly be trusted. Changed the part of dogoto() that handles this to +not just fail, but also to exit the script immediately and return to top +level. ckuus6.c, 28 Oct 2005. + +An idea popped into my head after having typed too many commands like "dir +ck[cuw]*.[cwh]" to check the list of matching files, and then having to +retype the same filespec in a SEND command: Why not unleash some unused +control character such as Ctrl-K to spit out the most recently entered input +filespec? It was easy, just a few lines in cmifi2() and gtword(), plus a +couple declarations. To see all the changes, search for "lastfile" (all the +new code is protected by #ifndef NOLASTFILE). ckucmd.c, 28 Oct 2005. + +I added a new variable \v(lastfilespec) that expands to the same last +filespec, for use in scripts. ckuusr.h, ckuus4.c, 28 Oct 2005. + +The Unix version of C-Kermit failed to put anything in the session log if +SET TERMINAL DEBUG ON. Rearranged the pertinent clause so logging happens +independent of TERMINAL DEBUG. For now, since the user who noticed this +wanted debug format to go into the session log, that's what I do. The +alternative would be to just log the raw incoming stream as usual, or to add +Yet Another SET Command to choose. ckucns.c, 11 Nov 2005. + +Fixed HELP INTRO text. ckuus2.c, 11 Nov 2005. + +Added NOLONGLONG for SV68. ckcdeb.h, 11 Nov 2005. + +--- Dev.05 --- + +Added a debug() statement in FTP secure_getbyte() to see what's going on +with Muhamad Taufiq Tajuddin's 205-byte-per-second FTP/SSL downloads. + +--- Dev.06 --- + +Result: nothing, SSL_get_error() does not report any errors. Suggested +testing SSL_read()'s return code, if 0 don't update the screen. + +Created a new data type CK_OFF_T in ckcdeb.h that will eventually resolve +to whatever each platform uses for file sizes and offsets. ckcdeb.h, +17 Nov 2005. + +Made a new library routine ckfstoa() that converts a file size or offset to +a string. This is to solve the problem with having to use different +printf() formats for different representations of file size (int, long, long +long, off_t, signed, unsigned, etc). Replaced a few printf("%l",size) with +printf("%s",ckfstoa(size)) with the expected results. This is just a start, +the definitions will need adjustment for many platforms, variables need to +be redeclared, and all the offending printf's (and printw's) will have to +hunted down and converted. ckclib.[ch], ckuus4.c, 17 Nov 2005. + +Built a minimal version on Linux with: +make linux "KFLAGS=-DNOLOCAL -DNOICP -DNOCSETS -DNODEBUG" +Worked fine, result was 260K on i686. 21 Nov 2005. + +Discovered that Kermit's date parser, contrary to the documentation, failed +to handle strings like "Wed, 13 Feb 2002 17:43:02 -0800 (PST)", which are +commonly found in email. This was because of an overzealous and misguided +check in the code; once removed, all was well. ckucmd.c, 26 Nov 2005. + +Added a new format code 4 to \fcvtdate() to emit asctime() format, used in +BSD-format email message envelopes (i.e. the "From " line). shuffledate(), +ckucmd.c, ckuus[24].c, 26 Nov 2005. + +Added a new function \femailaddress(). Given a From: or Sender: header line +from an RFC2822-format email address, extracts and returns the actual email +address, such as kermit@columbia.edu. ckuusr.h, ckuus[42].c, 26 Nov 2005. + +Using the new functions, I wrote a script to fetch mail from a POP3 server +over a TLS connection. But the line-at-a-time input (needed for changing +line terminators and byte-stuffing text lines that start with "From ") is +slow, 17 sec to read 29 messages totaling 175K. + +Added INPUT /CLEAR so INPUT can be started with a clean buffer without +requiring a separate CLEAR INPUT command. ckuusr.h, ckuus[r24].c, +27 Nov 2005. + +One thing that INPUT was never able to do well was read and save the +complete incoming data stream. That's because, while waiting for its +target, the buffer might overflow wrap around. Yet there was never a way to +tell it to stop when its buffer fills up and let me save it. I added a +/NOWRAP switch that does this. If the buffer fills up before any other +completion criterion is met, INPUT returns failure, but with \v(instatus) +set to 6 (the next available instatus value). Thus a program that wants to +read and save (say) an email message from a POP server, which could be any +length at all, and which terminates with . could do this: + + set flag off + while open connection { + input /nowrap 10 \13\10.\13\10 # Wait for . + if success { + frwrite /string \%o {\freplace(\v(input),\13\10.\13\10,\13\10)} + set flag on + break + } else if ( == \v(instatus) 6 || == \v(instatus) 1 ) { + frwrite /string \%o {\v(input)} + continue + } + break + } + if flag (handle success) + +Note carefully the braces around the FWRITE text; without them, trailing +spaces would be lost. + +Previously the only way to INPUT an entire data stream without losing +anything (assuming it was ordinary lines of text that were not "too long"), +was line-by-line: + + while open connection { + input /clear 10 \13\10 + if fail break + if eq "\v(input)" "$ \13\10" break + fwrite /string \%o {\freplace(\v(input),\13\10,\10)} + } + +The new code is 3 times faster using the default INPUT buffer length of 4K. +Raising it to 16K makes it 3.6 times faster (not worth it). Changing the +POP3 script to use INPUT /NOWRAP makes it about twice as fast (it does more; +it has to do all the byte-stuffing and unstuffing). 27 Nov 2005. + +Changed ssl_display_xxx() to just return if SET QUIET ON. Otherwise there +is no way to suppress the messages. Also protected a previously unprotected +printf("[SSL - OK]\r\n"); by if ( ssl_verbose_flag ). ck_ssl.c, +28 Nov 2005. + +Discovered that FOPEN /APPEND doesn't work if the file doesn't exist. It +uses cmiofi() which is a super-hokey front end to cmifi2(). I had code to +call it but for some reason it was commented out, with a note to the effect +it didn't work. I uncommented it but that didn't help much. So I wrote an +entirely new cmiofi() that works exactly as it should, using chained FDBs, +_CMIFI to _CMOFI (I think the original cmiofi() predated chained FDBs). +ckuus7.c, ckucmd.c, 29 Nov 2005. + +Getting rid of the awful hacks required to call cmiofi() meant I also had to +change the EDIT command, which is the only other place where it's used. +Unfortunately now it's no longer possible to give EDIT without a filename +(to just start an empty editor) but I doubt anyone will notice. ckuusr.c, +29 Nov 2005. + +IF KERBANG didn't always work right. If a kerbang script TAKEs another +kerbang script, the second one should have IF KERBANG false, but it didn't. +Added a check for \v(cmdlevel) == 1. Now you can write a wrapper that runs +a kerbang script in a loop, and the latter can use IF KERBANG to know +whether to EXIT (if called at top level) or END (if called by another +script, thus allowing -- in this case -- the loop to continue). ckuus6.c, +29 Nov 2005. + +Changed \flop() and flopx() functions to take a third argument, a number +signifying at which occurrence of the break character to lop, so: + + \flopx(sesame.cc.columbia.edu) = edu + \flopx(sesame.cc.columbia.edu,,2) = columbia.edu + +ckuus[24].c, 1 Dec 2005. + +Built OK on VMS 7.2-1 with MultiNet 4.4. Built with and without OpenSSL on +Linux OK, ditto Solaris 9. Built OK on RH Linux AS4 on X86_64 (64-bit); +"show var fsize" (using new ckfstoa()) works OK there. Also Mac OS X 10.3.9 +(32-bit), Tru64 UNIX 4.0F (64-bit), HP-UX 11iv2 (64-bit) (picky new compiler +spews out tons of useless warnings), FreeBSD 6.0 on ia64 (64-bit). + +--- Dev.07 --- + +Changed "make netbsd" to be a synonym for "make netbsd2" because the +original netbsd target was ancient. Renamed it to netbsd-old. makefile, +3 Dec 2005. + +Updated INPUT and MINPUT help text. ckuus2.c, 3 Dec 2005. + +Discovered that on a SET PORT /SSL connection, Kermit treats incoming +0xff data bytes (e.g. sent from the POP server) as IACs and goes into Telnet +negotiations. Jeff says "You will need to implement NP_SSLRAW and NP_TLSRAW +that do the same as NP_TCPRAW but negotiate SSL or TLS as appropriate." +This was not as easy as it sounded, because apparently a lot of the Telnet +code is used by SSL and TLS even when Telnet protocol is not being executed. +I wound up doing this as follows: I added /SSL-RAW and /TLS-RAW to the +switch table. Rather than disable Telnet, they do exactly what the /SSL and +/TLS switches do, but also set a special flag. This flag is checked in only +two place: netclos() (to prevent Kermit from sending TELNET LOGOUT when +closing the connection), and tn_doop() (to prevent Kermit from reacting to +incoming IACs; it makes tn_doop() return(3), which means "quoted IAC", which +causes the caller to keep the IAC as data). ckcnet.h, ckctel.h, ckctel.c, +ckuus7.c, 4 Dec 2005. + +The INPUT command did not account for tn_doop() returning 3. Fixed in +doinput(), ckuus4.c, 4 Dec 2005. + +Added another debug() statement in FTP secure_getbyte() to see what's going on +with Muhamad Taufiq Tajuddin's 205-byte-per-second FTP/SSL downloads, plus +new code to test SSL_read()'s return code (byte count); if 0 don't update +the screen. ckcftp.c, 4 Dec 2005. + +--- Dev.08 --- + +Fixed a typo in the non-ANSIC definition of ckfstoa(). ckclib.c, 7 Dec 2005. + +Our Ctrl-C trap (the ON_CTRLC macro) wasn't working for kerbang files. +Rearranged some code to make it work. ckcmai.c, 8 Dec 2005. + +Started converting code to use CK_OFF_T for file sizes and offsets, and +all [s]printf's to replace "%ld" or whatever with "%s", and the size +variable with a call to ckfstoa(). Since I haven't actually changed the +definition of CK_OFF_T from what all the size variables were to begin +with (i.e. long), it shouldn't do any harm. So far just ckcfn3.c +10 Dec 2005. + +An updated HP-UX 9.xx makefile target from PeterE to fix a core dump that +happens on that platform due to insufficient resources. 14 Dec 2005. + +Added debug() statements to http_blah() routines to tell whether the +connection is "chunked". There seems to be a bad performance problem. +ckcnet.c, 14 Dec 2005. + +PeterE complained about ugly DIRECTORY error message, ?No files match - +"{blah}". The braces are used internally in case the user typed more than +one filespec. I changed the error message to remove them. Ditto DELETE. +ckuus6.c, 15 Dec 2005. + +The problem with HTTP downloads is that Kermit always does single-character +read() or socket_read() calls (or the SSL equivalent); see http_inc(). I +added buffering code for non-SSL connections only but it's gross because it +has to swap ttyfd and httpfd before calling nettchk(). I tried making a +nettchk() clone that accepts a file descriptor as an argument but it didn't +work because too many other routines that are invoked directly or implicitly +by nettchk() (such as in_chk()) are still hardwired to use ttyfd. HTTP GETs +are now 20 times faster on the local network (the improvement is less +dramatic over a clogged Internet). ckcnet.[ch], 15 Dec 2005. + +--- Dev.09 --- + +HTTP file-descriptor swapping is not thread safe. Doing it right, of +course, is a big deal, so for now I just don't define HTTP_BUFFERING for +Windows. ckcnet.c, 15 Dec 2005. + +Noticed that HTTP not included in FreeBSD and OpenBSD builds. Fixed in +ckcdeb.h, 22 Dec 2005. + +Fleshed out 32/64-bit data type definitions and changed struct zattr +(file attribute structure) members length and lengthk to have the new +CK_OFF_T type. Changed final arguments of debug() and tlog() to be the new +LONGLONG type. ckcdeb.h, 22 Dec 2005. + +Changed ckfstoa() to return a signed number in string form, rather than an +unsigned one. That's because off_t is signed (thank goodness). Added the +inverse function, ckatofs() so we can convert file sizes and offsets back +and forth between binary number and string. ckclib.c, 22 Dec 2005. + +Changed Attribute Packet reader to convert incoming file size attribute +with ckatofs() rather than atol(). ckcfn3.c, 22 Dec 2005. + +Converted debug(), tlog(), ckscreen(), etc, to handle potentially "long long" +arguments by making their "n" argument CK_OFF_T. ckuusx.c, ckcdeb.h, +22 Dec 2005. + +Converted the rest of the source files to use CK_OFF_T for all file size +and offset and byte-count related variables, and converted all references to +these variables in printfs to go through ckfstoa(). Then I built it on +Linux/i386 with: + + make linux "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + +which makes off_t be 64 bits and magically makes all the regular file APIs +use 64-bit sizes and offsets without changing the API calls in the source +code. It's going to be a lot of work to get through all the kinks but I was +able to send a long file, do directory listings of long files, do +\fsize(longfile), etc. When it sends a file, the length is shown correctly +in the A packet. If the receiver does not support big numbers, it receives +the file OK anyway, without showing the size, the thermometer, or percent +done (and then will get an error when the file keeps coming after the 2G +mark). Kermit 95 actually refuses long files for "Size", but only if the +announced is less than 2^63 bytes. When today's Linux version receives a +file, it shows the length correctly in the file-transfer display, as well as +percent done, thermometer, etc. Also built this version on true 64-bit +Linux, and it worked fine. Many files changed, 22 Dec 2005. + +For the record, this API is specified in X/Open's Single UNIX Specification +Version 2, which is branded as UNIX 98. It is called Large File Support, or +LFS, and was developed at the Large File Summit. + +It looks like the operative feature-test macro in glibc for transitional +large file support is __USE_LARGEFILE64. So if this is defined, we can also +supply _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64 automatically for 32-bit +Linux builds. But there's a Catch-22, you don't know if this is defined +until you read the header files, but you have to define _LARGEFILE_SOURCE +and _FILE_OFFSET_BITS before you read the header files. Maybe it's good +enough to grep through for __USE_LARGEFILE64. makefile, +23 Dec 2005. + +Checked this on true 64-bit Linux. The same symbols are defined in CFLAGS, +but they do no harm; it builds without complaint and works fine. 24 Dec 2005. + +Built it on Red Hat Linux 6.1 from 1999. This picked up the long file +support too. Guess 6.1 isn't old enough to not have it! Kermit seems to +work OK on regular files but I don't have enough disk space to create a long +file, and my bigfile.c program (which creates a long file containing only 1 +byte) doesn't work ("fseeko: invalid argument"). It looks like parts of +this API were visible in Linux before they were actually working. +24 Dec 2005. + +Converted all fseek() and ftell() to macros that expand to fseek() and ftell() +or fseeko() and ftello() depending on whether _LARGEFILE_SOURCE is defined. +ckufio.c, ckuus7.c, ckuusx.c, 24 Dec 2005. + +Made a CK_OFF_T version of cmnum(). It would be a very big deal to just +change cmnum() to return a new type, so another idea is to rename cmnum() to +something else, cmnumw(), change its result argument to CK_OFF_T, and then +make a stub cmnum() to call it to get an int, then call cmnumw() explicitly +any time we need a big number. ckucmd.c, 24 Dec 2005. + +Calling cmnumw() directly requires changes to each routine that uses it. +The INCREMENT and DECREMENT commands, for example, required changes to +doincr(), varval(), and incvar(), and all references to them. ckuusr.[ch], +ckuus[56].c, 24 Dec 2005. + +Calling cmnumw() in chained FDBs required defining a new function code, +_CMNUW, adding a new member to the OFDB struct for returning wide results, +and adding a new case to cmfdb(). ckucmd.[ch], 24 Dec 2005. + +Changed FSEEK and FCOUNT to use the new chained FDB interface, now we can +seek and look past 2GB. ckuus7.c, 24 Dec 2005. + +Next come switches, which store their results in a struct stringint. This +struct was defined in each module where it was used (ckuus[r367].c, ckcftp.c). +I moved the definition to ckuusr.h and added a wval member, which can be +referenced by any switch-parsing code that calls cmnumw(). 24 Dec 2005. + +Changed SEND /CALIBRATE:n to allow big values of n. This makes it possible +to test the protocol aspects of long-file transfer without actually having a +long file handy. ckuusr.c, 24 Dec 2005. + +SEND /SMALLER-THAN:n, SEND /LARGER-THAN:n, and and SEND /START:n also now +allow large values of n. ckuusr.c, 24 Dec 2005. + +Changed the algebraic expression evaluator to use wide values. +ckuus5.c, 24 Dec 2005. + +Fixed ckfstoa() to handle the case when n is negative and (0 - n) is also +negative, which happens for numbers 2^(n-1) or greater, where n is the +number of bits in the word size we're dealing with, e.g. 64, in which case +2^63 has its sign bit set so seems to be negative. In such cases, ckfstoa() +returns "OVERFLOW" instead of a numeric string. We'll have to see how this +plays out but I think it's better to cause a parse error and stop things +dead than to return a spurious number. ckclib.c, 24 Dec 2005. + +Converted the S-Expression handler to use wide integers. ckuus3.c, 24 Dec 2005. + +Took all the LONGLONG stuff out of ckcdeb.h, we don't need it. + +All of these changes result in 64-bit arithmetic (more or less) on 32-bit +Linux, as well as on true 64-bit platforms. + +Rebuilt today's code on Solaris 9 in the 32-bit and 64-bit worlds, on Red +Hat 6.1, Red Hat AS4.2. I haven't bothered trying a 32/64 hybrid build for +Solaris, since I can build a pure 64-bit version there. Quick tests show +the large-number arithmetic works OK in all cases except, of course, on pure +32-bit builds (unfortunately I can't find a running Linux system old enough +to verify this for Linux, but it's true for other 32-bit platforms). +24 Dec 2005. + +Tried building a hybrid version on Solaris 9 after all since the LFS API is +ostensibly the same as for Linux: + + make solaris9 "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + +It built smoothly and the resulting binary is 2.5MB compared to 3.4MB for +the 100% 64-bit version. Looks like a keeper. For now, added solaris9lfs +and solaris10lfs entries to the makefile but if these work on PCs we can +make these the regular entries for Solaris 9 and 10. 27 Dec 2005. + +Built on Mac OS X 10.4 with the regular target. It seems that in that case, +off_t is 64 bits anyway. Noticed that a lot of stuff didn't work, like +exponentiation in S-Expressions. Tried building it as above, which worked, +and now CK_OFF_T is 64 bits instead of 32, but (^ 2 30) is still 2.0. In +fact 2-to-the-any-power is 2.0. It seems that the Mac OS X version did not +have FNFLOAT defined. It also seems that every test in dosexp() like: + + if (result != fpresult) fpflag++; + +should have been protected by #ifdef FNFLOAT..#endif /* FNFLOAT */ -- a +double-ended break, as they say in the nuclear power industry. ckuus3.c, +27 Dec 2005. + +Added GREP /EXCEPT:pattern. ckuus[26].c, 27 Dec 2005. + +Fixed a problem with uninitialized pv[].wval (switch-parsing parameter-value) +members that showed up on certain platforms or with certain compilers. Now +the Mac OS X 10.4 version works. ckuus[r367].c, ckcftp.c, 28 Dec 2005. + +Built on Unixware 7.1.1, a pure 32-bit build, seems fine. Rebuilt on Red +Hat AS 4.2 just to make sure I didn't break anything, it's OK. No testing +on HP-UX, etc, because HP testdrive file system is full, can't upload +anything. 29 Dec 2005. + +Commented out the SHOW FEATURES section that displays constants like +INT_MAX, CHAR_MAX, etc, because printing each value in the appropriate +format is too tricky, and we don't need them anyway. ckuus5.c, 29 Dec 2005. + +Updated ckvfio.c to use CK_OFF_T for the relevant variables. Built and +tested on VMS/Alpha 7.2: file transfer in remote mode; making a Telnet +connection and then local-mode file transfer; S-Expressions, all OK. Also +built a no-net version OK. 29 Dec 2005. + +Built and tested on Red Hat AS4 AMD X86_64, used it to upload new sources to +FreeBSD 4.11. Built on FreeBSD 4.11/i386. Here's another one where off_t +is 64 bits, even though long is 32 bits. But it seems to work ok, not sure +why, when CK_OFF_T is 32 bits. There is no _LARGEFILE_SOURCE stuff in the +header files. 29 Dec 2005. + +Built on Mac OS X 10.3.9 using the new macosx10.4 target to pick up LFS. +Works fine. + +Built on Red Hat Linux 4WS on IA64 (64-bit). Now this one is odd, stat() +fails on big files. It happens also if I use the "linuxnolfs" target, which +does not define _USE_LARGEFILE or _FILE_OFFSET_BITS=64. DIRECTORY BIGFILE +shows the size as -1, but if "log debug", it says "no files match", i.e. +different behavior, observer effect. I hate when that happens. + +Let's see if that's an anomaly... Built on Tru64 Unix 4.0F (64-bit Alpha). +It sees long files just fine. Rebuilt and checked on x86_64 again... fine. +OK, let's not worry about IA64 yet. + +Another small fix to the HP-UX 9.0 target from PeterE. makefile, 29 Dec 2005. + +---Dev.10--- + +Code adjustments from Jeff, mainly to the SSL and TLS Raw mode code from +several weeks ago, plus changing some data types in the security code to +CK_OFF_T, plus a different data type for CK_OFF_T for K95 because Windows +size_T isn't signed. This presumably will allow large-number arithmetic but +it will not give large file access because that will require replacing all C +library file i/o calls (esp. in ckofio.c) with native Windows APIs. Build +on Solaris 9 with and without SSL and on Linux RH AS4.2 with and without +SSL. ck_crp.c, ck_ssl.c, ck_ssl.h, ckcdeb.h, ckcftp.c, ckcmai.c, ckcnet.c, +ckcnet.h, ckctel.c, ckuat2.h, ckuus4.c, ckuus7.c, ckuusr.c, 30 Dec 2005. + +It was reported that WRITE SESSION always returned a failure status, even +when it succeeded. The problem was that Unix versions of zsout() and +zsoutl(), for the session log only, were using write() and returning +write()'s return code, which is different from what zsout() and zsoutl() are +documented to return. Also plugged a couple potential holes in zsoutx() +that I noticed while I was in the neighborhood. ckufio.c, 30 Dec 2005. + +Added FSEEK /FIND:pattern. This form of FSEEK accepts all the other +switches and arguments and performs the desired seek. Then, if the seek was +successful, it starts from that point and reads through the file, line by +line, searching for the first line that contains the given string or matches +the given (unanchored) pattern and, if found, sets the file pointer to the +beginning of that line. Useful, e.g., for very long timestamped logs, where +you want to start processing at a certain date or time; searching for a +particular string is much faster than doing date comparisons on each line. +ckuus[27].c, 30 Dec 2005. + +It was annoying me that FILE STATUS (FSTATUS) required a channel number to +be given even if only one file was open, so I supplied the correct default +in that case. ckuus7.c, 30 Dec 2005. + +INPUT /NOWRAP, added recently, is used for efficiently copying the INPUT +stream intact, but it's not good for matching because if the INPUT target is +broken between the end of the previous buffer and the beginning of the next +one, the context is lost and the match does not occur. I thought of several +ways around this, but they all involve saving a huge amount of context -- +old input buffers, the arrays of target strings and corresponding match +positions, etc. The alternative is fairly simple but it's not transparent +to the user. Here's what I did in a POP script: + + .eom := "\13\10.\13\10" + set flag off # FLAG ON = success + while ( open connection && not flag ) { + .oldinput := \fright(\v(input),8) # Save tail of previous INPUT buffer + input /clear /nowrap 4 \m(eom) # Get new INPUT buffer + if success { # INPUT matched - good + .s := {\freplace(\v(input),\m(eom),\13\10)} + set flag on + } else { # No match + .s := \v(input) # Check if target crossed the border + .oldinput := \m(oldinput)\fsubstr(\v(input),1,8) + if \findex(\m(eom),\m(oldinput)) set flag on + } + ... + } + +I think this will be easier to explain than any dangerous and grotesque +magic I might put into doinput() itself. For now, added a few words about +this to HELP INPUT. ckuus2.c, 30 Dec 2005. + +Back to the pattern matcher. Noticed that "IF MATCH index.html [a-hj-z]*" +succeeded when it should have failed. In ckmatch(), the clist section +needed one more clause: it can't float the pattern if an asterisk does not +occur in the pattern before the clist. This change fixes the problem +without breaking any other cases that weren't already broken, most of which +involve slists, i.e. {string,string,string,...}. ckclib.c, 30 Dec 2005. + +Tried FSEEK /FIND: on a largish file (over 100,000 lines), using it to seek +to a line near the end. It took 0.756 seconds, compared with Unix grep, +which did the same thing in 0.151 sec. That's because C-Kermit is using +ckmatch(). But if the search target is not a pattern, it should be a bit +faster to use ckindex(). Yup, 0.554 sec, a 36% improvement. Can't expect +to compete with grep, though; it's highly tuned for its single purpose. +ckclib.[ch], ckuus7.c, 1 Jan 2006. + +Updated visible copyright dates to 2006: ckcmai.c, ckuus2.c, ckuus5.c, +1 Jan 2006. + +Noticed that NetBSD 2.0.3 has 64-bit off_t, and that _LARGEFILE_SOURCE is +mentioned in . Tried building Kermit with _LARGEFILE_SOURCE added +to CFLAGS, it's good. Added it to the netbsd target. makefile, 1 Jan 2006. + +Fixed typo, #ifdef CK_NOLONGLONG in ckuus5.c should have been #ifndef +CK_LONGLONG (which, it turns out, we don't use anyway). 2 Jan 2005. + +Observed that FreeBSD 4.x has a 64-bit off_t, but does not use the +_LARGEFILE_SOURCE convention. Reasoning that all versions of FreeBSD have +off_t (I was able to check back to FreeBSD 3.3), I simply #define CK_OFF_T +to be off_t in ckcdeb.h within #ifdef __FreeBSD__ .. #endif. Another one +down. This can be done for any platform that is guaranteed to have off_t. +Turns out FreeBSD 3.3 has 64-bit off_t too. 2 Jan 2005. + +OpenBSD, same as FreeBSD. Also, added OS-version-getting thing to makefile +target for the program herald, as in the other BSDs. Built on OpenBSD 2.5 +from 1998, it has 64-bit off_t too. ckcdeb.h, makefile, 2 Jan 2005. + +Dumping the command stack every time there's an error is really too much. +I added SET COMMAND ERROR-DISPLAY {0,1,2,3} to set the verbosity level of +error messages. Only level 3 dumps the stack. ckuus[235].c, 2 Jan 2005. + +Built on HP-UX 11.11 with _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64. The +result works fine as far as I can tell. It sees big files, it can open +them, seek to positions past the 2^31 boundary. It can send large files. +It can do large-number arithmetic (^ 2 62). The only problem is that during +compilation, every single modules warns: + + cc: "/usr/include/sys/socket.h", line 504: warning 562: Redeclaration of + "sendfile" with a different storage class specifier: "sendfile" will have + internal linkage. + cc: "/usr/include/sys/socket.h", line 505: warning 562: Redeclaration of + "sendpath" with a different storage class specifier: "sendpath" will have + internal linkage. + +These warnings should be perfectly harmless since they are not coming from +C-Kermit code, nor does C-Kermit use either one of those functions. These +warnings don't come out in HP-UX 11i v2, but on that one we get tons and tons +of picky compiler warnings (variables set but not used, defined but not +referenced, etc). A couple, however, turned out to be valid; one case of +"expression has no effect", and two of "string format incompatible with +data type" (I missed a couple file-size printfs). + +There were also numerous warnings about signedness mismatch or sign +conversion of constants like IAC (0xff). Does the HP-UX Optimizing Compiler +have a compiler flag to make all chars unsigned? Yes, +uc, but the man page +says "Be careful when using this option. Your application may have problems +interfacing with HP-UX system libraries and other libraries that do not use +this option". Sigh, better not use it. + +After reviewing "HP-UX Large Files White Paper Version 1.4" and HP's +"Writing Portable Code" documents, I added -D_LARGEFILE_SOURCE +-D_FILE_OFFSET_BITS=64 to the hpux1000 target, which is the basis for all +HP-UX 10.00 and later builds. Large files are available in HP-UX 10.20 and +later. 10.00 and 10.10 were not real releases, and anyway these flags +should be harmless there unless the large-file implementation was only +partly done. Built OK on both PA-RISC and IA64, optimized and plain. +makefile, 4 Jan 2006. + +Built on FreeBSD 6.0 on IA64. All OK except I got a warning about the +argument passed to time() in logwtmp() in ckufio.c. This section had +already been partially fixed; thus I put the improved version into +#ifdef CK_64BIT, which is our newly available symbol that should be +automatically defined for any true 64-bit build. ckufio.c, 4 Jan 2006. + +Finally got around to testing Jeff's changes to SSL/TLS RAW mode from +December 30th against our POP server. It didn't work, couldn't log in. +Tried backing off the ckctel.c changes first; that allowed login and +communication, but it did not suppress activation of Telnet protocol +whenever a 0xff byte arrived. Backed off the rest of the changes and now +all is OK again. ckctel.c, ckcnet.c, ckuus7.c, 9 Jan 2006. + +Built on NetBSD 1.4.1 (1999), found that it did not like the large file +assumption -- fseeko() and ftello() do not exist; added a clause to the +netbsd target to check for fseeko and not define _LARGEFILE_SOURCE if not +found. Oddly enough, off_t is 64 bits anyway, but it doesn't look like the +APIs are half-done. For example, stat() uses off_t (64 bits) for the file +length, but fseek() uses long (32 bits) and there is no 64-bit analog. +Anyway the new netbsd target works on both 1.4.1 and 1.5.2 (no large files) +and on 2.0.3 (large files). makefile, 9 Jan 2006. + +Built on QNX-32 4.25, which has no large file support. Got a few strange +compiler (WatCom) warnings, but it built and runs OK. Noticed that file +transfers into QNX over a Telnet connection can't use streaming, but that's +nothing new to this version; same thing happens with C-Kermit 7.0. 9 Jan 2006. + +Built on IRIX 6.5. I didn't bother with large files there because it does +not support the _LARGEFILE_SOURCE interface; you have to change all the APIs +at the source level from blah() to blah64(). Seems to work fine as a 32-bit +app even though its off_t is 64 bits. Tried a pure 64-bit IRIX 6.5 build +but it dies in ckcnet.c when it hits SOCKOPT_T and GSOCKNAME_T with "The +identifier 'socklen_t' is undefined". + +Looks like I no longer have access to SCO OSR5. + +Made a pure 32-bit build on SCO UnixWare 7.1.4, all OK. Found that this +version also supports LFS, added it to the uw7 target. makefile, 9 Jan 2006. + +--- Dev.11 --- + +Evidently the HP-UX bundled (non-ANSI non-optimizing) compiler doesn't like +long integers in switch expressions. Changed three examples of these in the +S-expression code. ckuus3.c, 10 Jan 2006. + +A section of tstats() where GFTIMER isn't defined (e.g. on Motorola +sv68r3v6) was garbled. Fixed in ckcfn2.c, 10 Jan 2006. + +A fix for setting 921600 bps on Linux from Paul Fulghum, Microgate Systems Ltd. +ttgspd(): ckutio.c, 11 Jan 2006. + +Noticed that when I changed the compact substring notation code back on +August 9th, I broke the ability to use arithmetic expressions within the +brackets, which explains some rather odd behavior I saw with some of my +scripts. Looking more deeply into this, I also see that all the parsers I +have been using up to now for this, as well as for array bounds pairs, have +been inadequate because they never allowed for nested constructions, such as +a member of a bounds pair that itself was an array element, possibly with +another array element as a subscript. I wrote a new routine for this, +called boundspair(), which is like arraybounds() except it accepts an extra +argument, an array of characters that can serve as bounds-pair delimiters, +and it returns the pair separator that was encountered in another new +argument. For the alternative substring notation for [startpos-endpos] I +had to change the delimiter from '-' to '_' because '-' can be used in +arithmetic but '_' is not a recognized operator. This is so I can parse, +e.g. [a:b] or [a_b] in the same context, and then find out which form was +used, e.g. \s(line[9:12]) or \s(line[9_12]); the first string is 4 bytes +long, the second is 12. Everything seems to be OK now. \s(line[10]) gives +everything starting at 10, but \s(line[10:0]) gives the null string. Bad +syntax in the bounds pairs results in a null string; missing pieces of the +bounds pair result in defaults that should be compatible with previous +behavior. ckuus[45].c, ckuusr.h, 13 Jan 2005. + +Changed arraybounds() to call boundspair(). This was a rather drastic +change, not strictly necessary, but I think I got all the kinks out. +ckuus5.c, 13 Jan 2005. + +Changes from PeterE to the makefile for HP-UX 6 and 7, to accommodate bigger +symbol tables, etc. 19 Jan 2005. + +Determined that SCO OSR5.0.6 (and earlier) do(es) not support large files. +Don't know about 5.0.7. 30 Jan 2005. + +Created a new build target for SCO OSR6.0.0. Gets the exact 6.x.x version +dynamically. Supports large files and big-number arithmetic via CK_OFF_T. +The sockopt() family of functions changed the data types of some of their +arguments since OSR5. It was already possible to define SOCKOPT_T and +GSOCKNAME_T from the command line but I had to add code to also allow this +for GPEERNAME_T too. ckcnet.c, makefile, 30 Jan 2005. + +Apparently, ever since C-Kermit 7.0 was released, it has never been possible +to use a variable for the as-name in a RECEIVE command in Kermit 95. This +is because evaluation of the as-name field was deferred until after we could +check whether it might be a directory name (which, in Windows, could start +with a backslash). This little bit of magic was not a good idea, magic +hardly ever is. I changed the code to evaluate both as-name fields in the +normal way. If they want to receive to a directory called "\%1", they'll +just have to spell it differently. The workaround is to turn the whole +command into a macro and evaluate it before executing it, e.g.: + + assign xx receive /as-name:\%1 + do xx + +ckuus6.c, 1 Feb 2006. + +Built OK on FreeBSD 6.1 on AMD64. Adjusted some copyrights and date stamps. +ckcmai.c, makefile, 8 Feb 2006. + +--- Dev.12 --- + +Fixed a signed/unsigned char warning in the new boundspair() calling code +in the compact substring notation handler. ckuus4.c, 9 Feb 2006. + +Removed a spurious extra linux+openssl label from the makefile, added +solaris10g_64 synonym. 9 Feb 2006. + +Satisfied myself that LFS is OK on Solaris 10 i386, and I'm going to assume +it's also OK on Solaris 9. Made LFS standard for all Solaris 9 and 10 +builds (including the secure ones) except the explicitly 64-bit ones, and +made the provisional solarisXXlfs targets into synonyms. makefile, 9 Feb 2006. + +--- Dev.13 --- + +Further attempts at SSL/TLS message suppression when QUIET is ON. +ck_ssl.c, 16 Feb 2006. + +From J.Scott Kasten: (quote...) I just uploaded a patch to /kermit/incoming. +The file name is "jsk-patch-for-cku211.diff". I have also included the +patch as ASCII text in this email below. This patch may be applied to the +cku211.tar.gz source code via: + cd cku211, patch -p1 <../jsk-patch-for-cku211.diff +The patch adds 4 new build targets: + netbsdwoc - a stripped no curses target for iksd used. + netbsdse - security enhanced target with srp, ssl, and zlib. + irix65gcc - build on SGI Irix 6.5 platform using gcc. + irix65se - security enhanced target with srp, ssl, and zlib. +The patch fixes one build target: + irix64gcc - The "-s" option is not supported by gcc under Irix. +I thank all of you in the Kermit Project for such a fine utility. I +recently had to get a 16 MB file overseas across a spotty communications +link to repair a computer remotely. Kermit was the only thing that could do +the job, so I wanted to contribute these patches back to the mainstream to +say thanks. This digitally signed email is a binding contract that +officially assigns the rights to the source code patch (shown below) that I +developed to the Kermit Project at Columbia University. (...end quote) +ck_ssl.c, makefile, 23 Feb 2006. + +Changed the new NetBSD target names to be consistent with the conventions +used in most other targets: + + netbsdwoc -> netbsdnc + netbsdse -> netbsd+ssl+srp+zlib + irix65se -> irix65+ssl+srp+zlib + +and removed old, now superfluous, NetBSD targets (old-netbsd, netbst15, +netbst16), leaving synonym labels in their place. Also updated (crudely) +the Linux target variations (curses instead of nocurses, no curses at all) +to be (appropriately modified) copies of the current linux target. It would +be nicer to combine them, but this gets the job done. makefile, 23 Feb 2006. + +--- Dev.14 --- + +Fixed the HELP command when used with tokens like @, ^, #, and ;. The first +two had been omitted from the table. The second two required a new path +into the guts of the parser, since comments are normally stripped at a very +low level. ckuus[r2].c, ckucmd.c, 24 Feb 2006. + +Built on AIX 5.1 ("make aix51") without incident. Then I tried: + + make aix51 "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + +This had no effect. I found the relevant document ath the IBM website. It +says to use -D_LARGE_FILES instead. I added this to the AIX 4.2 target +since (a) IBM says large files are supported by AIX 4.2 and later, and (b) +all Kermit AIX targets past 4.2 use the 4.2 one. Plus a clause to make +sure CK_OFF_T is defined appropriately. ckcdeb.h, makefile, 6 Mar 2006. + +Added a 32-bit aix51+openssl target. Builds OK, works fine (tested against +our SSL POP server). Tried I tried adding -D_LARGE_FILES. It seems to work +fine, so we'll keep it. Cleaned up the other aix5blah entries a bit also. +makefile, 6 Mar 2006. + +Fixes from J. Scott Kasten to the IRIX 6.4 and 6.5 makefile targets. They +were badly wrong. makefile, 6 Mar 2006. + +The reason Kermit was looping on directories in IRIX was a classic +"double-ended break". The makefile targets failed to define DIRENT so +Kermit was open/read on directories rather than opendir()/readdir(). But +then it was also failing to account for the fact that read() would return -1 +on error. The makefile fix adds -DDIRENT, and the read() case in traverse() +now properly terminates its loop on error. ckufio.c, 6 Mar 2006. + +--- Dev.14 --- + +In response to a complaint that C-Kermit would not build on HP-UX 11 with +OpenSSL, I tried it myself on both 11.11/PA-RISC and 11i v2/Itanium. It built +OK on both but I had to add a new target (hpux1000o+openssl-nozlib) for no +Zlib since these boxes did not have it installed. makefile, 9 Mar 2006. + +Added OpenSSL version number display to SHOW FEATURES. ckuus5.c, 9 Mar 2006. + +Gavin Graham noticed that FTP [M]GET /DELETE /MOVE-TO: was rejected with +"?Sorry, /DELETE conflicts with /MOVE or /RENAME". This check belongs in the +PUT code but not in the GET code. Commented it out and tested the result. +The combination is now accepted but then Kermit refuses the incoming file as +if it had been given a /SMALLER-THAN: or /LARGER-THAN: switch, which it didn't +happen. Turns out there was one more place where I wasn't initializing the +new "wide int" member of the switch-parsing pv[] struct. Once this was fixed, +the /MOVE-TO part still didn't work. Turned out the /DELETE case was part of +a long if-else-if-else- chain, which effectively made /DELETE and /MOVE-TO: or +/RENAME-TO: mutually exclusive. Fixed this, now it works fine. ckcftp.c, +13 Mar 2006. + +Got access to AIX 5.3, built there, all OK, including large files. 13 Mar 2006. + +--- Dev.16 --- + +Patches from Mark Sapiro to suppress getsockopt() and getsockname() warnings +in Mac OS X. ckcnet.[ch], 18 Mar 2006. + +In response to a complaint from Clarence Dold, tried "make redhat9" (which +is the rather dated target that tried to include all forms of security) on +RH Linux AS4.3, it failed miserably. I made a new makefile target, removing +Kerberos IV and got a lot farther. But then in ckcftp.c, the following +struct definition: + + struct { + CONST gss_OID_desc * CONST * mech_type; + char *service_name; + } gss_trials[] = { + { &ck_gss_mech_krb5, "ftp" }, + { &ck_gss_mech_krb5, "host" }, + }; + +refers to a variable, ck_gss_mech_krb5, that is not defined anywhere. Up +above, however, is a static definition for gss_mech_krb5, so I changed the +struct definition to match. Next, in ckuath.c, the compiler could not find +the com_err.h file. Turns out in Linux this is in a subdirectory, et, so we +have to add a -I clause to the makefile target for this. Made a target for +Linux+SSL only. Made a target for Linux+Krb5 only; this required moving an +#ifdef in ckuus7.c to prevent an unguarded reference to SSLEAY_VERSION. +New targets: linux+krb5+ssl, linux+krb5, linux+krb5. ckcftp.c, ckuus7.c, +makefile, 27 Mar 2006. + +New targets of HP-UX 10/11 with OpenSSL from PeterE. makefile, 27 Mar 2006. + +Added large file/integer support to SHOW FEATURES. ckuus5.c, 27 Mar 2006. + +Built OK on Solaris 9 and 10 with gcc (someone was complaining that this +didn't work, but that was 8.0.211). + +Started build on a Sun 3/80 mc68030 with NetBSD 2.0 and gcc 3.3.3. But it +died with an assembler error in ckcfn2.c (compiler bug). 27 Mar 2006. + +--- Dev.17 --- + +NebBSD 2.0 build completed by turning off optimization on ckcfn2.c +("KFLAGS=-O0"). Result supports 64-bit ints and, presumably, large files. +uname -p = "m68k", -m = "sun3". 29 Mar 2006. + +Corrected an omission in applying PeterE's updates to the HP-UX targets. +makefile, 28 Mar 2006. + +solaris2xg+krb5+krb4+openssl+shadow: + +Tried resurrecting the solaris2xg+krb5+krb4+openssl+shadow target. It asks +to link with libdes but there is no libdes. Removed -ldes from the target, +now at least it builds and runs wart. The compilation blows up in ckcftp.c +for missing header files: + + ckcftp.c:462: kerberosIV/krb.h: No such file or directory + ckcftp.c:500: gssapi/gssapi_generic.h: No such file or directory + ckcftp.c:501: gssapi/gssapi_krb5.h: No such file or directory + +Got a bit farther by adding appropriate -I's and -L's to KFLAGS but it still +dies compiling (or linking?) ckcftp.c, but it doesn't say exactly why. OK, +deferred. + +Added SET SEXPRESSION TRUNCATE-ALL-RESULTS { ON, OFF }. This can be used +for force integer arithmetic in any kind of calculation that requires it, +such as date calculations. This is a global setting, not on any kind of +stack. Also, updated SHOW SEXP and added HELP SET SEXP which wasn't there +before. ckuus[23].c, 30 Mar 2006. + +To make the RENAME command a bit more useful, need to add some switches. +But it shares a switch table, qvswtab[], with some other commands. Broke +this off into its own switch table. ckuus6.c, 17 Apr 2006. + +Added RENAME switch values that can be used in the same table with the DELETE +switch values, which are shared by many commands. ckuusr.h, 17 Apr 2006. + +Discovered that the RENAME command could be entered without any arguments +and it would still succeed. Fixed in dorenam(): ckuus6.c, 17 Apr 2006. + +Added parsing for RENAME /UPPER:option (to uppercase the file name(s)), +/LOWER:option (to lowercase), and /REPLACE:{{s1}{s2}} (to do string +replacement on the filename(s)), but not the semantics. When any of these +switches is given, the target ("to") name is not parsed; they act on the +source name. The /LOWER: switch takes keyword args to specify whether it +should act only only files that have all UPPER case latters, or on ALL files +(i.e., including files with mixed-case names); similarly for the /UPPER: +switch. There is some creative parsing allowing these to be given with or +without a colon and keyword argument, which works fine except if you include +the colon but no argument, execute the command (which works fine), and then +recall the command. I haven't yet decided about the interaction among these +switches. Clearly if /UPPER is given after /LOWER, it overrides. But if +/UPPER (or /LOWER) is given with /REPLACE, what should happen? ckuus6.c, +17 Apr 2006. + +Filled in actions for RENAME /UPPER: and /LOWER: for the single file case, +and tested all combinations of switch values and filename configurations. +Once that was OK, moved the code out into a separate routine, renameone(), +and then called it from both the single-file case and the multifile case. +ckuus6.c, 19 Apr 2006. + +Added RENAME /SIMULATE. Filled in the code for string replacement, needs +testing. ckuus6.c, 20 Apr 2006. + +Changed /REPLACE options to allow a negative number to specify an occurrence +from the right, so -1 means the last occurrence, -2 means the next-to-last, +etc. ckuus6.c, 24 Apr 2006. + +Added RENAME /COLLISION:{OVERWRITE,PROCEED,FAIL}. This is implemented but +not tested. ckuus6.c, 24 Apr 2006. + +Worked on RENAME /COLLISION:FAIL. I decided it was less than useful to ... + +Added SET RENAME { COLLISION, LIST } to let user change default collision +and listing actions. ckuusr.[ch], ckuus[36].c, 25 Apr 2006. + +Experimented with parsing for /CONVERT:cset1:cset2. The problem here is +that there is no straightforward way for a switch to have multiple +arguments. Or is there...? If I parse cset1 with cmswi() rather than +cmkey(), it almost works; the only problem is that the character-set +keywords don't have CM_ARG set, so they don't know to stop on, and ignore, a +colon. If I make a copy of the table and set CM_ARG in the flags field for +each keyword, it works fine: if I Tab in the first name, it fills itself +out, supplies a colon, and waits for the second name. So in the code, the +first time that RENAME /CONVERT is invoked, I put code to copy fcstab[] and +set CM_ARG in each flags field. Works fine, and now we know how to make a +switch that takes multiple arguments. ckuus6.c, 24 Apr 2006. + +I thought I had a function to convert the character set of a string but I +don't, so actually implementing /CONVERT: will be difficult. + +Actually the parsing wasn't that easy either. It works OK interactively, +but not in a TAKE file. To make a long story short, I had to change +gtword() and cmkey2() to not require "/" at the beginning of a switch, and +then to parse arguments-that-are-followed-by-other-arguments as if they were +switches, so that they can end with colon rather than space. This might +seem dangerous, but switches always have "/" at the beginning, so the check +is superfluous. ckucmd.c, 26 Apr 2006. + +Back to /CONVERT... Once I was able to get the code to call cvtstring() I +was able to debug it (at first it was skipping every second character). And +now we have a general-purpose string-translating function we can call from +anywhere. Requires that C-Kermit be built with Unicode support. +ckuus6.c, 26 Apr 2006. + +Added SHOW RENAME. ckuusr.h, ckuus[r5].c, 26 Apr 2006. + +Conditionalized some Unix/Windows assumptions in renameone() so the code +could work in VMS. ckuus6.c, 2 May 2006. + +Added RENAME /FIXSPACES to change all spaces in the filename(s) to +underscore or any other character or string that is given. This is just a +special case of RENAME /REPLACE:{{ }{x}} with easier syntax. +ckuusr.h, ckuus6.c, 2 May 2006. + +Added an "all-but" control to the /REPLACE options: +/REPLACE:{{.}{_}{~1}} means replace all but the first (this one works); +/REPLACE:{{.}{_}{~-1}} means replace all but the last (this one not yet). +ckuus6.c, 2 May 2006. + +Filled in the second one ("all but" the given occurrence). The algorithm is +simply to reverse the three strings and then use the same code as we use in +the left-right-case, and then unreverse the result. At first I used +yystring() for this but yikes, what a bad design! So I made a better +string-reversal routine, gnirts(), for this (luckily yystring() is only used +in one place, for which its design is appropriate). ckuus6.c, 3-4 May 2006. + +Added code to handle the case where the file being renamed includes a path +specification. In this case we separate the path, apply the renaming +functions to the filename only, and then at the end rejoin the original +filename with the path, and join the new name with same path or, if a +destination directory was given, with that. ckuus6.c, 4 May 2006. + +Added HELP SET RENAME and updated HELP RENAME. ckuus2.c, 4 May 2006. + +"Tom Violin" (Tom Hansen) noticed that the first time you FOPEN a file, +Kermit's memory consumption goes way up. In fact there's a warning to that +effect in the code, where, upon first open, a potentially big array of +potentially big structs is allocated. I rewrote the code to allocate each +array member (struct ckz_file) as needed, i.e. when a file is opened, and to +free it when the file is closed (or the open fails). This was actually +quite a lot of work, which is why I didn't do it the first time around: +every single "." had to be changed to "->". Every check for a valid +channel first had to check if the channel's struct was allocated and every +other reference to z_file[i]->anything had to be prechecked that z_file[i] +was not a NULL pointer. Also I made some improvements to FILE STATUS, and I +fixed FILE CLOSE to default the channel number if only one channel was open, +as I did for FILE STATUS a while back. ckuus7.c, Cinco de mayo 2006. + +Ran my old BUILDS script that builds C-Kermit with about 100 different +combinations of feature-selection switches. Fixed a few small glitches so +now they all build OK (except can't do NOANSI builds any more on recent +Linuxes because of varargs()). ckuus3.c, ckuus5.c, ckuus6.c, ckuus7.c, +ckucmd.c, ckcfns.c, 6 May 2006. + +Fixed RENAME /LOWER and /UPPER, when given with no colon or argument, to +default to ALL. ckuus6.c, 13 May 2006. + +Built on VMS 7.2-1, tested new RENAME command there; seems to be OK. +13 May 2006. + +--- Dev.18 --- + +I wanted to test large files against RESEND but I don't have access to any +system that can run C-Kermit and that also has enough space for a large +file. I created a "fake" large file on Linux (3G hole plus 1 byte), and +sent it over a localhost connection, and interrupted it repeatedly and then +initiated a RESEND at the sender. In each case, it picked up where it left +off. But before the 2G boundary was crossed the disk filled up. +Inconclusive. 14 May 2006. + +PeterE got a warning in the new FILE OPEN code when building in HP-UX 9. +I added a cast, built on HP-UX 11, no more complaint. However there +are warnings about internal vs external bindings of sendpath and sendfile +in every module. Too bad, these are not Kermit tokens, it's a conflict in +HP's header files. Marc Sapiro doesn't see them; probably it's something +on the HP testdrive site. ckuus7.c, 17 May 2006. + +Fixed the tru64-51b+openssl target -- the terminating doublequote of KFLAGS +was missing -- and also the osf target, which failed to import the LIBS +definition from whatever other target invoked it. Now the SSL build goes OK +on Tru64 5.1B. Replaced x.tar.z in the download areas without declaring a +new Dev number. The new one has a makefile with today's date. Software +engineering at its best! makefile, 18 May 2006. + +Scott Kasten noted that the estimated-time-remaining calculation would go +bonkers on LFS systems when RESENDing a large file. It looks like the +shocps() and shoetl() functions escaped the CK_OFF_T conversion. I made +what seemed to be the right adjustments, and then was lucky enough to find a +computer that had enough free disk space for me to send a large file, +interrupt it several times, resend it, all seems to be OK. 28 May 2006. +Later Scott verified these changes independently for Linux, but the problems +in IRIX remain. + +Patches from Scott Kasten for large files on IRIX 6.5: ckcdeb.h, makefile, +12 Jun 2006. + +--- Dev.19 --- + +Added a new function for dealing with JPGs and GIFs: + +\fpicture(filename,&a) + returns 0 if file not recognized or can't be opened; + returns 1 if landscape, 2 if portrait or square. + If array given, element 1 is width, element 2 is height. + +ckuusr.h, ckuus4.c, 19 Jun 2006. + +Scott Kasten reports that the FTP client can transfer large files OK, at +least in Linux, but has trouble with recovery: + + . Kermit takes a very long time to start the transfer, sometimes over + 30 minutes. Suspect the ftp server is counting the bytes in a long file? + Or maybe it's a text-mode transfer and it's counting the lines? Probably + in response to Kermit's SIZE command. + + . The size shown in the FT display is wrong by a random amount. And of + course so are the progress bar, percent done, and time remaining. + + . The file, however, is transferred correctly. REGET works correctly too. + +I tried setting up a test scenario locally but our Solaris FTP server does +not support large files: + + FTP SENT [SIZE BIGFILE] + FTP RCVD [550 BIGFILE: not a plain file.] + FTP SENT [PASV] + FTP RCVD [227 Entering Passive Mode (128,59,48,24,246,37)] + FTP SENT [RETR BIGFILE] + FTP RCVD [550 BIGFILE: Value too large for defined data type.] + +Created the same 3GB on a Tru64 Unix system that allows FTP access. Made +the connection from C-Kermit on Solaris (32-bit with LFS): + + 16:46:12.908 FTP SENT [SIZE BIGFILE] + 16:46:12.947 FTP RCVD [213 3000000001] + +Note that it takes less than half a second to get the reply. Now I start +the download and then interrupt it at about 2%: + + 16:46:12.979 FTP SENT [TYPE I] + 16:46:13.174 FTP RCVD [200 Type set to I.] + 16:46:13.226 FTP SENT [PASV] + 16:46:13.262 FTP RCVD [227 Entering Passive Mode (15,170,178,171,11,37)] + 16:46:13.299 FTP SENT [RETR BIGFILE] + 16:46:13.337 FTP RCVD [150 Opening BINARY mode data connection for BIGFILE..] + 16:47:24.895 FTP RCVD [426 Transfer aborted. Data connection closed.] + 16:47:24.934 FTP RCVD [226 Abort successful] + 16:47:24.991 FTP SENT [MDTM BIGFILE] + 16:47:25.028 FTP RCVD [213 20060706204458] + +Now I do a REGET: + + 16:51:55.321 FTP SENT [PASV] + 16:51:55.357 FTP RCVD [227 Entering Passive Mode (15,170,178,171,11,43)] + 16:51:55.394 FTP SENT [REST 122736640] + 16:51:55.430 FTP RCVD [350 Restarting at 122736640. Send STORE or RETRIEVE..] + 16:51:55.431 FTP SENT [RETR BIGFILE] + 16:51:55.469 FTP RCVD [150 Opening BINARY mode data connection for BIGFILE..] + +This worked perfectly, as far as I can tell; the FT display picked up in the +right place; the thermometer, percent done, and estimated time remaining +were the same as when we left off last time. I did the same thing several +more times, everything was OK. It would have taken a really long time to +let this run to completion, but I think this demonstrates that Scott's +symptoms are server-dependent. No changes. 6 July 2006. + +Checked current code on VMS 8.2-1 on IA64 / UCX 5.5, builds fine. +No changes. Updated listing at HP. 6 July 2006. + +Checked FTP GET of large file in ASCII mode against Tru64 FTP server. It +was fine, and there was no delay in the server's response to our SIZE command +(as there would be if it were scanning the entire file to count how many +bytes would be required to send it in text mode). 7 Jul 2006. + +Tested FTP PUT big file against Tru64, OK. Ditto FTP RESEND big file: + + C-Kermit>resend BIGFILE + PUT BIGFILE (binary) (3000000001 bytes)---> PASV + 227 Entering Passive Mode (15,170,178,171,13,186) + ---> SIZE BIGFILE + 213 343211280 + ---> MDTM BIGFILE + 213 20060707141243 + ---> APPE BIGFILE + 150 Opening BINARY mode data connection for BIGFILE (128.59.59.56,45470). + +Made REPUT a synonym for RESEND. ckuusr.c, 7 Jul 2006. + +Added FTP REPUT and FTP RESEND since previously there was no FTP-prefixed +command for recovering uploads, only the regular RESEND command, which might +not have been obvious to people. ckcftp.c, 7 Jul 2006. + +Added help text for FTP RESEND and REPUT and amended RESEND help text. +ckcftp.c, ckuus2.c, 7 Jul 2006. + +Changed name of \fpicture() to \fpictureinfo() and added help text. By the +way, ImageMagick can do this too: identify -format "%w %h" dscf0520.jpg. +The advantage of having it in Kermit is that not everybody has ImageMagick. +ckuus[24].c, 7 Jul 2006. + +Changed the numeric comparisons = < > <= >= != to allow long integers by +changing the data type to CK_OFF_T, etc. ckuus6.c, 7 Jul 2006. + +Noticed that \fkeywordvalue(foo=this is a string) only kept the first word. +Fixed it to keep the whole definition. Also added \fkwvalue() as a briefer +synonym. ckuus4.c, 7 Jul 2006 + +Sometimes we want to check if a file's status before we've FOPEN'd it, in +which case the channel variable is likely to be empty and \f_status(\%c) +would get an error. Making the obvious change didn't fix this, however. It +turns out that the function evaluator failed to adjust argn (argument count) +when trailing arguments were empty, and argn was being used in this case, +and probably others, to test whether an argument existed. I added code to +adjust argn to reflect the number of arguments up to and including the +rightmost non-empty one. ckuus4.c, 7 Jul 2006. + +Fixed \fstripb() to not dump core if second argument is missing. +ckuus4.c, 7 Jul 2006. + +Discovered that it was not obvious what pattern to use to match strings +enclosed in square brackets. "if match [abc] \[*\]" didn't work. Neither +did various other tricks like NCRs for the brackets. However, "if match +[abc] \\[*\\]" does work. Trying to fix this would no doubt break 100 other +things, so let's call it a feature. 7 Jul 2006. + +Added \fgetpidinfo(n) to return info about a process ID; for now it simply +returns 1 if the process is alive and 0 if not (or -1 if the argument is +bad or missing or on any kind of error). ckuusr.h, ckuus[24].c, 7 Jul 2006. + +The "where-did-my-file-go" message seemed to be ending with a LF rather +than CRLF, probably because the terminal modes had not yet been restored, +leaving the next prompt hanging below it, rather than on the left margin, +if C-Kermit exited immediately after the transfer. Fixed by changing +all \n's to \r\n's in wheremsg(): ckcpro.w, 8 Jul 2006. + +Added \v(lastkwval) so we can retrieve programmatically the keyword most +recently processed by \fkeywordval(). ckuusr.h, ckuus4.c, 9 Jul 2006. + +--- Dev.20 --- + +Added #ifdef SV68, #include , #endif because Unix System V/68 on +Motorola choked on the SEEK_CUR reference without it. ckuus4.c, 10 Jul 2006. + +Make \fkeywordval(xxx) undefine xxx (i.e. when a keyword is given with no +value). This way command-line keywords will always override preexisting +default definitions, whether they have a value or not, which makes it easier +to parse command lines like "foo=bar blah xx=yy". ckuus[24].c, 12 Jul 2006. + +On 29 Nov 2005 I changed IF KERBANG to solve a problem (see entry for that +date), but introduced a new one; namely that you can't have (e.g.) a FATAL +macro that uses IF KERBANG to decide whether to EXIT all the way or STOP +back to the prompt. Changed it again, this time to require not that the +command level be 1, but that the command *file* level be 0 (i.e. that we are +in the top-level command file, irrespective of the command or macro level, +but not in a subfile). ckuus6.c, 12 Jul 2006. + +It is unhelpful when Kermit gets a syntax error in the middle of a big +compound statement block (e.g. FOR or WHILE loop) and dumps out the whole +thing in an error message. I changed the two places where this can happen +to call a new routine that, instead of dumping out the entire cmdbuf, +checks its length first and if it's more than a line long, truncates it +and adds an ellipsis. ckuus6.c, 12 Jul 2006. + +The new RENAME command didn't give very good error messages, e.g. if the +filespec didn't match any files. Fixed in dorenam(): ckuus6.c, 12 Jul 2006. + +Fixed DIR /TOP to work if the /TOP:n argument was omitted, defaulting +to 10. domydir(): ckuus6.c, 12 Jul 2006. + +Added DIR /COUNT:v to count the number of files that match the given +criteria and store result in the variable v. ckuusr.h, ckuus[r26].c, +24 Aug 2006. + +Added HDIRECTORY as an invisible synonym for DIR /SORT:SIZE /REVERSE. +Can be used with other switches, of course, so (e.g.) HD /TOP shows the +ten biggest files. ckuusr.h, ckuus[r26].c, 24 Aug 2006. + +DIR /FOLLOWLINKS and /NOFOLLOWLINKS always did the same thing; the switch +was ignored, a symlink is always followed. Fixed in ckuus6.c, 24 Aug 2006. + +Added DIR /NOLINKS, which means don't show or count symlinks at all. +ckuusr.h, ckuus[r26].c, 24 Aug 2006. + +Build on Solaris 9 and NetBSD 3.0, 24 Aug 2006. + +Added a missing definition for LOCK_DIR in the Linux HAVE_BAUDBOY case, +suggested by Gerry Belanger. ckutio.c, 6 Oct 2006. + +Suggested by Jim Crapuchettes: \v(dialmessage) is the text string +corresponding to \v(dialstatus). ckuusr.h, ckuus4.c, 6 Oct 2006. + +Soewono Effendi sent code for exit sequence to leave DTR on; this amounted +to unsetting HPUCL in c_cflag. I did it a simpler way, hopefully portable +to all Unixes, but who knows at this late date. The code is inside +#ifndef CK_NOHUPCL..#endif in case it causes trouble. It is executed if +SET EXIT HANGUP is OFF and a serial port was open at the time Kermit exits +(or closes it explicitly). ttclos(): ckutio.c, 6 Oct 2006. + +Built on Solaris9/Sparc; FreeBSD 6.2/AMD64; NetBSD 3.0/i386; HP-UX 11i v2; +SCO OSR6.00. + +--- Dev.21 --- + +Added netbsd+openssl target to makefile. Built OK (NetBSD 3.0, OpenSSL +0.9.7d) except with some warnings in ck_crp.c. Connects and logs in OK to a +secure site. 10 Oct 2006. + +Added a debug statement to ftp_hookup() to record the TCP port that was used. +ckcftp.c, 11 Oct 2006. + +Built with OpenSSL 0.9.7l on Solaris 9. Built with OpenSSL 0.9.8d on +Solaris 9; connects and logs in to a secure site. 11 Oct 2006. + +The new RENAME command didn't work if both the source and destination names +included directory segments, e.g. "rename /tmp/foo ~/bar" (see notes of +4 May 2006). This was fixed in renameone() by a special case in which +the second argument is given but it is a filename, not a directory name. +ckuus6.c, 11 Oct 2006. + +Fixed unguarded reference to dialmsg[] for \fdialmessage(), noticed by +Gerry Belanger. ckuus4.c, 12 Oct 2006. + +Added a TOUCH command that does what UNIX touch does: creates the file if it +does not exist, updates the timestamp if it does. If a wildcard is given, +it operates only on existing files. It shares the DIRECTORY command parser, +so all the same file selection switches can be given. ckuusr.[ch], +ckuus[26].c, 12 Oct 2006. + +PeterE noticed that if you FOPEN a file, do some seeks or reads, then FCLOSE +it, then FOPEN it again (or open a different one), some of the old +information is still there (e.g. current line number). This is an artifact +of the changes of May 4th. Now the file closing and opening routines are a +bit more careful about scrubbing and initializing the file info struct. +ckuus7.c, 12 Oct 2006. + +--- Dev.22 --- + +Built OK on Red Hat Linux AS4 with both "make linux" and "make linuxnc". +15 Oct 2006. + +DIRECTORY /BRIEF ignored file selection switches and always listed all +files. This was because of how I cleverly called filhelp() (the routine +that lists matching files when ? is typed in a filename field) and, of +course, filhelp() doesn't know anything about the DIRECTORY command's file +selections. Changed filhelp() to accept all the args needed for passing +along to fileselect(), renamed it to xfilhelp(), and made a filhelp() stub +that chains to xfilhelp() with null selections. ckcker.h, ckucmd.[ch], +ckuus6.c, 29 Nov 2006. + +SHOW CONNECTION for an SSH connection said the connection type was "NET" +rather than "SSH". Fixed in dolognet(): ckuus3.c, 29 Nov 2006. + +SHOW CONNECTION didn't show the TCP port number. This command works by +parsing the current connection log entry string, which doesn't have a field +for this, but which sometimes shows the port number as part of the hostname +(but more often not). Added code to dolognet() to log the TCP port number, +if known. This involved adding a gettcpport() function to ckcnet.c. +ckcnet.[ch], ckuus3.c, 29 Nov 2006. + +This was impossible: def \%1 upper, echo \f\%1(abc) -- i.e. to "compose" a +function name. Fixed in zzstring(). But note that it's still not possible +to do this: def \%1 \fupper, echo \%1(abc) -- because at the point where +"\fupper" is encountered, which is automatically fed to fneval(), the +argument list hasn't been read yet. ckuus4.c, 29 Nov 2006. + +The meaningless Lisp command (=) would cause Kermit to hang. Due to some +idiosyncracy in the parser, it would see this as ((=) and would go into +"wait for the closing paren" mode. There was already a hack in the code to +compensate for this, but it didn't work. I fixed the hack but I don't +understand the real problem. Anyway, comparing Kermit with real (Franz) +Lisp I discovered that comparison operators do not require two arguments, as +Kermit has been doing, although they do require at least one. I changed +Kermit to not require two, so now all the comparison predicates behave +exactly like Franz Lisp, including getting an error if there are no args). +ckuus[r3].c, 29 Nov 2006. + +From to-do list: Make a way to inhibit pattern matching in SWITCH labels. +It's already there; just quote the wildcard characters; the only trick is +that for some reason (such as that SWITCH is really an internally defined +macro), a double quote is needed: + + switch \%1 { + :a\\*z, echo literally "a*z", break + :abcxyz, echo literally "abcxyz", break + :a*z, echo a...z, break + :default, echo NO MATCH + } + +In first case, the asterisk is taken literally; in the third it's a +metacharacter and the label matches any string that starts with 'a' and +ends with 'z'. + +Array initialization would quit early if any initializers were undefined, +e.g. "decl \&a[] = \%a \%b \%c" would stop at the first element if \%b +was not defined, even though \%c might be defined. Fixed in dodcl(): +ckuusr.c, 30 Nov 2006. + +DIR /ARRAY:a filespec, when the filespec does not match any files, +terminates with the array undeclared. It would be better to return a +declared but empty array (\&a[0] = 0). The code is already there to do +that, but isn't working. And yet "declare \&a[0]" does indeed create a +0-element array ("show array" shows a dimension of 0). Turns out there were +two problems; one was the careless recycling of a local variable ("array"), +resulting in failure to create \&a[] (but not any other array). Fixed in +domydir(): ckuus6.c, 30 Nov 2006. + +The other problem was that dclarray(), when called with an array name and a +dimension of zero, does two different things depending on whether the array +already existed. There is still a fair amount of confusion about whether a +dimension of 0 indicates an array with 1 element (as it should) or a +nonexistent array. We call dclarray() with a size of 0 to undeclare an +array but we also need to able able to declare an array with only element 0. +I changed dclarray() to treat a negative dimension as a command to destroy +the array, and 0 or positive as a command to create the array with the given +dimension. ckuus[r56].c, 30 Nov 2006. + +Next problem: when chkarray() returns 0, this should not be interpreted to +mean the array does not exist. Looks like the only place this happened was +in \fcontents(); fixed in ckuus4.c, 30 Nov 2006. + +If we include file selectors with DIR /ARRAY:&a and some of the files that +match the given filespec but don't fit the selectors, the array's dimension +is bigger than its number of elements. Added code at the end of domydir() +to resize the array so \fdim() returns the number of filenames in the array, +and also made sure that element 0 contains that number too. ckuus6.c, +30 Nov 2006. + +This would be a nice elegant way to loop over a bunch of files, if it worked: + + for \%i 1 \ffiles(*) 1 { rename \fnextfile() xxx_\flpad(\%i,3,0) } + +But in this loop, Kermit skips every other file (beginning with the first) +and then runs out of files halfway through the loop. Why? Because in +commands like RENAME and DELETE, the filename parser is in a chained FDB +with the switch parser. First the switch parser, cmswi(), gets its hands on +\fnextfile(), passing it through the evaluator and thus getting the first +filename, which it then sees is not a switch, so now the field is parsed by +the next parser in the chain, cmifi(), which causes \fnextfile() to be +executed again. In fact, the FOR loop has nothing to do with; the same +thing happens like this: + + void \ffiles(*) + delete \fnextfile() + +This deletes not the first file, but the second one. Obviously users can be +told not to refer to \fnextfile() in chained-fdb fields: + + for \%i 1 \ffiles(*) 1 { .f := \fnextfile(), delete \m(f) } + +but this is hardly intuitive. I had some clever ideas of how to make +\fnextfile() work as expected in this context but it's way too much magic. +Better to simply document that \fnextfile() is "deprecated" and the array +format should be used: + + for \%i 1 \ffiles(*,&a) 1 { delete \&a[\%i] } + +The difference is, an array element doesn't change every time it's referred to! + +Added a /PRESERVE switch to the COPY command to preserve the timestamp and +permissions of the file. I did this using the Kermit APIs so it should work +for any version of C-Kermit or K95. ckuus[26].c, 30 Nov 2006. + +Added COPY /OVERWRITE:{ALWAYS,NEVER,OLDER,NEWER} to control name collisions +when copying across directories. ckuus[26].c, 1 Dec 2006. + +--- Dev.23 --- + +Fixed a bug in SET TELNET PROMPT-FOR-USERID, SET AUTH KERBEROS[45] PROMPT, +and SET AUTH SRP PROMPT in which the user's string was compared with a +literal (s == ""), reported by Pavol Rusnak. Worse, empty strings (if the +test succeeded) were turned into null pointers, and then fed to strlen(). +Fixed in ckuus3.c, 5 Dec 2006. + +Added an optional 4th argument to \findex(), \frindex(), \fsearch(), and +\frsearch(): the desired occurrence number of the searched-for string. +\frsearch() was a bit tricky. ckuus[24].c, 7 Dec 2006. + +Added \fcount(s1,s2) to tell the number of occurrences of s1 in s2. +ckuus[24].c, 8 Dec 2006. + +Added \ffunction(s1) to tell if a given built-in function is available. +ckuus[24].c, 8 Dec 2006. + +Changed RENAME /COLLISION:PROCEED to be /COLLISION:SKIP, which is clearer. +ckuus[26].c, 8 Dec 2006. + +For communication protocols: INPUT /COUNT:n to read exactly n characters +without any matching. Can be used, for example, with CONTENT_LENGTH in CGI +scripts; NUL characters are counted but not collected. ckuusr.[ch], +ckuus4.c, 8 Dec 2006. + +There was a bad bug in the date-parsing routines; it's been there for years. +If a date string includes a timezone, e.g. "Sat, 9 Dec 2006 19:26:23 EST", +and converting to GMT changes the date, the variables for day, month, and +year (which are used later) were not updated, and the final result was a day +off. Fixed in cmcvtdate(): ckucmd.c, 10 Dec 2006. + +Built OK with SSL/TLS. Tested with the POP script, found that I broke INPUT +when adding the /COUNT feature; there was a path through the code that could +leave the "anychar" variable unset and therefore random. Fixed in +doinput(). The POP script, which does not use /COUNT, works again and so +does a new CGI script, which does use /COUNT. ckuus4.c, 10 Dec 2006. + +Supplied a missing comma in the help-text array for HELP SET TERMINAL, which +resulted in bad formatting in K95 around SET SNI-FIRMWARE-VERSIONS. +ckuus2.c, 10 Dec 2006. + +Made "help locus" a synonym for "help set locus". ckuusr.[ch], ckuus2.c, +11 Dec 2006. + +This morning the Columbia FTP server was malfunctioning in a perfect way +for me to implement and test an FTP timeout mechanism. The server would +close the data connection after sending the file, but the client never saw +the close and was stuck forever in a recv(). I added code to do a select() +on the data connection prior to entering the recv(), with a timeout on the +select() that the user can establish with SET FTP TIMEOUT. Built and tested +on Solaris 9, clear-text FTP. Also built cleanly for FTPS and tested +against a server that does not hang; I don't have access to an FTPS server +that would tickle the timeout code. ckcftp.c, 11 Dec 2006. + +--- Dev.24 --- + +Fixed a bug in the INPUT /COUNT: parser: the array of search strings was +never initialized, which didn't matter before, but with /COUNT:, if the +first element was not a NULL pointer, we'd treat it as a search string, and +then if it happened to match something in the input stream, the operation +would stop before the count was exhausted. Fixed by (a) initializing the +array, and (b) ignoring any search strings if /COUNT: was given. ckuusr.c, +13 Dec 2006. + +Removed a debug() statement from zsattr() that suddenly started making some +version of gcc complain, reported by Gerry Belanger. ckufio.c, 13 Dec 2006. + +--- Dev.25 --- + +Some casts for the 3 interior args of the new select() call in ckcftp.c +for HP-UX 9. 14 Dec 2006. + +Changed \fkeywordvalue() to accept a string rather than a single word +as its second argument, so that more than one separator could be specified, +and to return -1 on error, 0 if it found nothing, 1 if given a keyword but +no value, and 2 if there was a keyword and a value. dokwval(): ckuus[24].c, +14 Dec 2006. + +Checked FTP timeout on command channel with FTP DIRECTORY of a big directory +using a path into our ftp server that preserves the hanging behavior. The +timeout was actually working, but the failure condition wasn't propagating +back to the user, and there was no error message. Fixed in doftprecv2() and +failftprecv2(): ckcftp.c, 15 Dec 2006. + +Added the obvious timeout checks for FTP uploads, but I have no way to test +the code since our misbehaving FTP server does not hang when receiving +files, only when sending them. But uploads work both with and without a +timeout set, so at least no harm is done. ckcftp.c, 17 Dec 2006. + +When downloading with FILE DESTINATION NOWHERE (= /CALIBRATE), Kermit still +checked the size of the incoming file and refused it if there wasn't enough +free disk space, on platforms (such as VMS) where zchkspa()) actually works; +reported by Bob Gezelter. ckcfn3.c, 18 Dec 2006. + +Built on Mac OS X 10.4.8 and NetBSD 3.1_RC3, all OK. 19 Dec 2006. + +--- Dev.26 --- + +Built on VMS 7.3-2/Alpha. Had to squelch a couple compiler warnings by +changing some ints in the new \fpictureinfo() code from unsigned to signed, +and fix a typo in the prototype for the new gettcpport() function. +ckcnet.h, ckuus4.c, 22 Dec 2006. + +--- Dev.27 --- + +Parameterized pty routines and all references to them for file descriptor, +rather than to use global ttyfd, thus allowing ptys to be created for +different purposes. Tested on Solaris 9 and Mac OS X 10.4.8, with "set host +/connect /pty emacs" (fine in both cases), and (more to the point) "set host +/connect /pty kermit" -- here we make a connection from one Kermit process +to another and transfer a file; works fine and wasn't especially slow either; +a good sign. ckcdeb.h, ckutio.c, ckupty.c, 22 Dec 2006. + +Created a new version of ttruncmd() called ttyptycmd(), which works by +calling do_pty() to get a pty to run the command on, and then in a loop, +reads from the pty and writes to the net and reads from the net and writes +to the pty, using select() to which of those it should do on each pass. +First cut just uses single-byte reads and writes. Tested using Kermit +itself as an external protocol. Works but slowly: 6000cps. Zmodem doesn't +work at all. ckutio.c, 24 Dec 2006. + +Changed single-character read() and write() to buffered reads and writes, +with ttxin() and ttol() used for network i/o. Using Kermit as the external +protocol, this gives 450Kcps (about 1/3 normal on this connection). + +But now there's a problem: the loop doesn't know when to stop. How does it +know when the process that is running on the pty has exited? With single +character read()'s that are executed unconditionally when select() says the +pty has data waiting, as in the first pass, I get EIO if there actually +isn't any, and can exit the loop. But now, to avoid blocking, I call +in_chk() to see how much data is waiting, and I don't try to read anything +if it says nothing is waiting. If the process associated with the pty file +descriptor has terminated, in_chk() would presumably get some kind of error, +but it doesn't. I changed do_pty to return the pid of the fork where it +execs its command so we can check the pid with kill(pid,0) when in_chk() of +the pty says 0, but this doesn't help either; it seems like the process is +not exiting, but of course it is. + +I could not find any legitimate way to test when the pty fork terminated. +Select() always says the pty file descriptor was ready, no matter what. +Select() never reports an exception on the pty file descriptor; +in_chk(ptyfd) returns 0 and not an error. read(ptyfd,...) gets 0 but not an +error. fcntl(ptyfd,...) doesn't get an error. Finally I tried +write(ptyfd,c,0) and this indeed gets EIO (i/o error). With this, using +Kermit as the external protocol works fine in Solaris but I tend to think +this trick will not be very portable (it isn't). 24 Dec 2006. + +Made ttptycmd() use a more intelligent buffering scheme, fixed a few things +about how I was setting up the select() call that should address some of +yesterday's problems. Still doesn't work but it's progress. A: 25 Dec 2006. + +Debugging yesterday's code... Still, the error conditions are never set, +we never detect when the pty closes. In Solaris, if select() says ptyfd is +ready to read but in_chk() says there are no characters there, we can treat +this as a loop-exit condition. But in NetBSD, in_chk() always says 0 when +used on a pty (but works OK on a serial or net connection). + +Realized I could not use in_chk() on the pty because there is too much +baggage with the communication path -- myread(), etc etc) -- so I replaced +this with a simple ioctl(ptyfd,FIONREAD,&n). This works fine in Solaris but +always returns 0 in NetBSD, despite what the man page says (i.e. that this +function can be used on any file descriptor). + +OK, let's see.... select() does not return useful results. It says +characters are waiting on ptyfd when they are not, and it never detects the +closure of the pty..... Well of course not, because we are the ones who +have to close it. Just because the process has stopped doesn't mean the pty +is closed. So we're back to square one, how do we know when to close it? +ckupty.c seems to keep the process ID in a global variable, pty_fork_pid +(which is not the same as the pid now returned by do_pty(), which is +useless, but I don't understand why). But it doesn't matter because when we +kill(pty_fork_pid,0), we still get no error of any kind, even after we know +the process has exited. I am completely flummoxed. select() lies, and even +if it didn't, there is simply no completion criterion. In the loop, +select() always says that the pty is ready to read. To be continued. +26 Dec 2006. + +Back to Square One, single-byte reads and writes. + + . This works for both ripple and Kermit. + . Doesn't work for Zmodem but we'll deal with that later. + . In this case FD_ISSET(ptyfd) is still true after pty closes. + +But the ensuing read() gets EIO so we know the pty is gone. That means the +same thing should happen in the buffered version, no? Yes; I went back to +the buffered version and replaced all the other nonworking tests by a +blocking read of 1 byte on the pty and this detects the termination. Now: + + . ripple works perfectly (of course it's only one-way). + . Kermit fails + +Let's call the remote, forked, redirected, external Kermit A and its +local partner B. A sends its S-packet, B receives it OK and Acks. +A apparently does not receive the ACK in time, so sends the S again, but OK. +followed immediately by the F. B Acks the F. A sends the A, B Acks it. +But now A sends a piece of the previous F packet and the the first piece +of a D packet. + +Clearly the buffering is messed up. Sure enough, there was an extraneous +statement incrementing a read pointer in a write section. Removing that +cleared up the problems with Kermit, now we can send and receive substantial +files efficiently in remote mode. Zmodem seems to work too, except that at +the beginning a bunch of "**B0800000000022d"'s are stuffed into Kermit's +command buffer, so after the transfer we get some error messages. + +In local mode, over a Telnet connection, Kermit works fine. Zmodem works +OK too except it doesn't finish right, so at the very end rz on the far end +is still waiting for something; if I cancel out of it with ^X^X^X^X^X, it +deletes the file. So there still is something wrong with the termination +test. + +Also you don't see anything on your screen when running Kermit or Zmodem +this way. That's to be expected, since they are using stdio for the +transfer, so they can't also be displaying progress or other messages. + +Built this on NetBSD again... Seems to work this time, but has trouble +finishing, like Zmodem. Hmmm, on closer examination, it turns out that +since in_chk() always returns 0 on the ptyfd, we fall into our new +single-byte read code, so it's really slow, like 10K cps on a connection +where 1M is the norm. 27 Dec 2006. + +Switched the pty from buffer peeking (FIONREAD) and blocking reads to to +nonblocking reads (O_NONBLOCK / O_NDELAY). Works just fine on NetBSD except +now we no longer get EIO at the end when trying to read from the pty process +that has exited. In fact, we're back to square one again. not ioctl(), not +fcntl(), not select(), not even read() gets an i/o error after the pty +process exits. But in NetBSD, we have to use nonblocking reads because ... +Hmmmm, maybe switch the fd between blocking and nonblocking for the test... +Nope, NetBSD seems to be hopeless (later, Ed Ravin confirmed that similar +problems have been observed with other applications that try to do this). + +Switching to Linux, I see that yesterday's Solaris code (blocking reads) +works exactly the same way on Linux. + +Tried today's O_NDELAY method on Solaris. It works perfectly. And then I +moved this one to Linux and it works perfectly there too. Except in both +cases we have the weird thing with Zmodem at the end, but I think that's +because rz/sz don't use standard i/o. On NetBSD, it still hangs at the end. + +Turns out that testing the pid works in NetBSD, even though it didn't in +Solaris. Turns out read() gets an i/o error in Solaris and Linux but not +in NetBSD. So checking the read result first, and then checking the pid +if read() got zero bytes catches all three. 28 Dec 2006. + +Now the question of return code. In the original ttruncmd() function, we do +a fork() and a wait(). When the external protocol program finishes, wait() +gives us its return code and we can pass it on through \v(pexitstat) as well +ttruncmd's own return code. But ttptycmd() has to interact with the pty +continuously, so it can't just sit back and wait() for it. Instead we have +to detect when the process has exited and then call waitpid() on the fork +pid, before shutting down the pty. Tested on Solaris using Kermit as the +external protocol and then inducing failure, or letting it run to +completion. FAILURE and SUCCESS set appropriately in each case. Tested +with Zmodem too, works OK except for the aforementioned cosmetic glitch at +the end. Tested on NetBSD, all OK. + +To make K5 connection to Panix from Spam: + + set telnet debug on + authenticate K5 init /realm:PANIX.COM /password:xxxxx + set host shell.panix.com 23 /k5login + +Good... Now I try to send a file from Spam to Panix over the K5 connection +using Kermit itself as the external protocol. It fails. Inspection of the +debug log on the far side shows that the S-Packet was received correctly, +good! This means we are reading the clear-text S-Packet from the external +Kermit program, and that ttol() is encrypting appropriately. + +The remote Kermit sends the Ack and goes to read the next packet: ttinl() +calls myfillbuf() and: + + SVORPOSIX myfillbuf calling read() + SVORPOSIX myfillbuf=0 <-- read returns 0 + SVORPOSIX myfillbuf ttcarr=2 + SVORPOSIX myfillbuf errno=0 <-- and reports no error + HEXDUMP: mygetbuf read (-3 bytes) + mygetbuf errno=0 + ttinl myread failure, n=-3 + ttinl myread errno=0 + ttinl non-EINTR -3[closing] + +This happens because myfillbuf() deliberately returns -3 when read() gets 0 +bytes. I don't understand why this happens but the real problem is yet to +come. The local Kermit (the one that has made the secure connection and is +running the external protocol through ttptycmd()) eventually figures out +that the transfer failed and when we reconnect, we get total garbage -- the +encryption either stopped happening, or got out of sync. + +Looking at the local debug log, ttol() is doing its job, converting the +initial "kermit -r\13" from plaintext to cyphertext, as shown by the +hexdumps. Then it enters ttptycmd()... Hmmmm, wait, how can it send the +"kermit -r" before it starts the external protocol? Never mind, worry about +that later... Anyway, ttptycmd() says: + + ttptycmd loop top have_pty=1 + ttptycmd loop top have_net=1 + ttptycmd FD_SET ptyfd in + ttptycmd FD_SET ttyfd in + ttptycmd nfds=5 + ttptycmd select=1 + ttptycmd FD_ISSET ttyfd in + ... + ttptycmd in_chk(ttyfd) n=11 + ttptycmd ttxin n=11 + +ttxin() asks for 11 bytes, myfillbuf() gets 11 bytes, and hexdump() shows +the cyphertext, there doesn't seem to be any decrypting going on. Hmmm, it +looks like the regular code calls ttinc() in a loop, rather than ttxin(). +Maybe ttxin() doesn't have decryption hooks. No, that's not it, the code is +there, but the Kermit packet reader does not use ttxin(), it uses ttinl(). +But of course we can't use that for external protocols because it's designed +only to read Kermit packets. Substituting a loop of ttinc()s for the ttxin() +call fixes things (and strangely enough, it seems to be faster). And now we +have our first external protocol transfer over a secure connection (external +Kermit program, Linux over Kerberos 5 to NetBSD). Zmodem worked too for a +short file but "something happens" with longer ones. 29 Dec 2006. + +New makefile target for Linux with Kerberos 5, linux+krb5, that doesn't +include anything extra from SSL or other security methods (but apparently it +is still necessary to include -DOPENSSL_097 in order to get the right names +for the DES routines?). Ditto netbsd+krb5 for NetBSD, except in this case +-DOPENSSL_097 is not necessary. makefile, 30 Dec 2006. + +Note to myself: On Panix: + + export LD_LIBRARY_PATH=/usr/local/kerblib + make netbsd+krb5 "K5LIB=-L/usr/local/kerblib" "K5INC=-I/usr/local/include" + +Can't telnet-k5 from newly built Kermit on NetBSD; partway through the +negotiations, just after "TELNET RCVD SB ENCRYPTION SUPPORT DES_CFB64 +DES_OFB64 IAC SE" it dumps core. The last two lines in debug.log after +this are: + + tn_sb[len]=5 + encrypt_support[cnt]=2 + +Rebuilding with -DOPENSSL_097 doesn't change anything. Ed Ravin said they +have two different Kerberos installations, Heimdal and MIT; maybe some +mixup between the two explains the problem (Jeff concurs). The core dump +occurs in ck_crp: encrypt_support(): + + debug(F100,"XXX ep not NULL","",0); + type = ep->start ? (*ep->start)(DIR_ENCRYPT, 0) : 0; <-- Here + debug(F101,"XXX new type","",type); + +Anyway, I can log in with Kerberos 5 to Panix OK from Columbia (sesame) +using 8.0.201. So let's try to resurrect the Solaris version with everything: + + solaris9g+krb5+krb4+openssl+shadow+pam+zlib + +I hunted around to find where the current library and header file +directories were... Last time I tried this (March 2006) it bombed, not +finding libdes. Instead we have /opt/kerberos5125/lib/libdes425.a. Made a +new cu-specific target that includes this; now we get farther; it blows up +in ckcftp.c with tons of errors and warnings, which we can worry about +later. Building again with -DNOFTP, it gets to ckuath.c (the first security +module) and: + + ckuath.c:151:18: error: krb5.h: No such file or directory + ckuath.c:152:21: error: profile.h: No such file or directory + ckuath.c:153:21: error: com_err.h: No such file or directory + ckuath.c:176:28: error: kerberosIV/krb.h: No such file or directory + In file included from /opt/openssl-0.9.8d/include/openssl/des.h:101, + from ckuath.c:219: + +Found krb5.h in /opt/kerberos5125/include/krb5.h, added a -I for this +directory ... Now we get lots of warnings in ckuath.c, but it completes OK, +then we wind up bombing out in ck_crp.c; I don't know why -- there are all +the same warnings (related to argument passing to DES functions), but no +errors. I have no clue. + +Tried to resurrect the solaris2x+krb4 target; this required changing -lkrb +to -lkrb4 and -ldes to -ldes425. Lots of warnings in ckutio.c, ckcnet.c, +ckctel.c, then it bombs out in ckcftp.c because it can't find krb.h. I +found it, adjusted the -I flags, but now it bombs because krb.h itself +#includes , which of course it can't find because the +brackets mean it's looking in /usr/include/kerberosIV/, which, of course, +the sys folks have removed. Giving up on Solaris again. Later, Jeff said +"Solaris does not publicly export the krb5 libraries. You need to build +the MIT Kerberos libraries separately and link to them." 30 December 2006. + +Changed copyright date to 2007. ckcmai.c, 1 Jan 2007. + +With Ed Ravin's help, successfully built C-Kermit with Kerberos 5 and +OpenSSL (netbsd+krb5+openssl+zlib), but it does not make K5 connections; it +gets hung up in the Telnet negotiations. 3 Jan 2007. + +Downloaded MIT Kerberos 5 v1.4.4 to Solaris 9, 54MB worth. This is just so +I can build a Kerberized C-Kermit for testing ttyptycmd(). Ran the +configure program, got a few warnings but it didn't fail (should it?) Did +"make install", specifying a private directory but it failed immediately +with "cannot stat libkrb5support.so.0.0: No such file or directory". +OK, I tried. 3 Jan 2007. + +Made a new makefile target for Mac OS X, macosx10.4+krb5+ssl, ran it on Mac +OS X 10.4.8. It bombs out in ckcftp.c with: ckcftp.c:551: error: static +declaration of 'gss_mech_krb5' follows non-static declaration +/usr/include/gssapi/gssapi_krb5.h:76: error: previous declaration of +'gss_mech_krb5' was here". Ditto for gss_mech_krb5_old, gss_nt_krb5_name, +and gss_nt_krb5_principal. Tried again with -DNOFTP. We get lots of +warnings in the network modules, but they complete. But ck_ssl.c bombed +with a conflict between its own declarations of encrypt_output and +decrypt_input and the ones in ckuat2.h; removed the prototypes from the +latter (as Jeff advised) it built OK and it works OK too. Built with FTP +too, but with link-time warnings about the aforementioned gss_* symbols. +#ifdef'd them out (gss_mech_krb5, gss_mech_krb5_old, gss_mech_name, and +gss_mech_principal) for MACOSX, where these symbols are exported by the +library. Now it all compiles and links OK, and runs OK too. 3 Jan 2007. + +Spent a day hunting around for a version of Zmodem that would build and +execute on Mac OS X, finally found one. Now at last I could try a Zmodem +external-protocol transfer over a secure connection. But phooey, C-Kermit's +pty support didn't work on this box. Kermit finds master /dev/ptypa OK, +then in ptyint_void_association() tries to open /dev/tty but gets ERRNO=6 +"device not configured" (which is apparently OK, because the same thing +happens on other platforms where this works), then tries to open slave +/dev/ttypa and gets ERRNO=13 "permission denied" because, indeed, I don't +have r/w permission on the device. Left a message. 4 Jan 2007. + +Changed TRANSMIT /BINARY output buffer size from 252 to 508 to avoid +TCP fragmentation. Need to add a SET command for this later. +ckuus4.c, 5 Jan 2007. + +Found another Mac where the ptys weren't protected against me, make a K5 +connection and transferred a largish file with Zmodem with zero glitches, +except it was kind of slow, 84K cps. Well, we're doing single-character +reads on the net (ttinc()'s instead of ttxin()). Hmmm, but then I did it +again and got 2.2Mcps. Success was reported, but it actually didn't work; +it only sent the first quarter of the file.... Oh well, at least now we +have a testbed. 5 Jan 2007. + +Tried again, saw that the file is actually transferred instantly but then +we're not picking up the protocol at the end. Theory: after the transfer +finishes, we come back to the prompt on the remote host, which means we have +something to read from the net and write to the pty, but the pty has already +exited. AFTER THE PTY IS GONE, WE DO NOT WANT TO READ FROM THE NET ANY +MORE. Adding this test makes Kermit succeed right away when sending the +same largish file, with a transfer rate of 4M cps, that's better. But the +rz program on the far end is evidently not receiving the goodbye handshake +from the receiver, because it sits there foreever in its *B09002402009418 +mode until I ^X^X^X^X^X out of it, at which point it deletes the file it +already received, not very helpful. In the code, I read from the pty if the +pty is open and there is room in the buffer. This means that when we get to +the end, either there is no room in the buffer (unlikely) or the last bit +sent by sz before exiting was cut off when the fork closed. Why do we get +in this fix only with Zmodem and not with Kermit? + +In Mac OS X, after sz exits, we get ERRNO=5 if we try to write to the pty, +but we still get no errors after that if we try to read from it. Still, +prior to this we did more than 20 unproductive nonblocking reads from the +pty (no error, no bytes) without incident; there did not seem to be anything +waiting. In fact, the last thing we read from the pty were the text +messages that are issued at the end of the transfer: "rz 3.73 1-30-03 +finished." After which it pauses a second and spits out a message about +UNREGISTERED COPY. + +Figured out how to build lrzsz, in hopes that the previous problems were +with rzsz and crzsz's fiddling with file descriptors, but I get the same +behavior. Which is good, I guess, because if I can fix one, I fix them all. +Or not... Testing lrz by itself (not under C-Kermit), I see that it doesn't +work at all with Kermit's own Zmodem implementation. + +OK, here's one problem: at the end of the transfer, the Omen Zmodems print +stuff like "Please read the license agreement", Kermit dutifully reads this +from the pty and sends it to the host, the host shell says "Please: command +not found", issues its prompt again, which Kermit reads, feeds to the pty, +and apparently the pty echoes it, so we send it back to the host, and there +ensues an infinite loop of getty babble until the pty closes. Now, there +ought to be a way to make the external protocol shut up, like Kermit's +-q(uiet) flag, but these are unregistered versions so you can't shut up the +messages. In fact, the transfer works, but the getty babble at the end +ruins the experience. Now I'm beginning to wonder how any of these programs +ever worked as external protocols. Hmmm, now that I try it, I see the +same thing happens the old way, when using ttruncmd() rather than ttptycmd(). + +Reading the crzsz documentation I see it says that messages come out on +stderr. OK, that's progress. In ckupty.c I try redirecting 2 to /dev/null. +Well good, this filters out the messages from csz, but we still get getty +babble on the prompt. In the debug log, we read the last bunch of stuff +from net, 618 bytes of Zmodem stuff... Now what happens? + +Zmodem on the remote exits, the host prints its prompt. Kermit, of course, +reads the prompt from the net, now come to the bottom of the loop and we +have 7 bytes to write to the pty, and no error condition, so we continue the +loop. select() says that the pty is ready for writing. We write the 7 +bytes and and get no error. Loop again, this time select() says the pty has +data waiting. Sure enough we get the prompt back, and send it to the net, +and thus begins the getty babble. There are two causes for this: + + 1. crzsz does not exit immediately; it sleeps for 10 seconds after + printing its nag message. + + 2. During this interval the pty seems to be echoing what is sent to it. + csz is not echoing; I checked. Anyway, removing the pause doesn't + seem to make a difference. + +ttptycmd() needs to: + + . TELL the pty module to redirect stderr to /dev/null + . SET PTY TO NOECHO (master or slave?) + +Tried setting the pty to noecho: + + termbuf.c_lflag &= ~(ECHO|ECHOE|ECHOK); + +and this seemed to stop the getty babble. After the file transfer, I read +back the prompt from the host shell, I write the prompt bytes to the pty; +there is no error. And now select() simply hangs forever (or times out if +a timeout is set). The question here is: why didn't writing to the pty +produce an error? And, because we never detect the pty has exited, we can't +set a good return code. 5 Jan 2007. + +Moved pty fork testing to a separate routine, pty_get_status(), and +added a call to it from the place where we time out, in case the fork +terminated; then we can get and return its status. 6 Jan 2007. + +Added calls to pty_get_status() to every place where we suspect a pty error, +tried again with lrzsz, crzsz, and regular rzsz. All three work, but in +each case waitpid() indicates that the sz program gave exit code 1 (failure). +ckutio.c, 7 Jan 2007. + +Changing the subject... On my test system, every time I execute ttptycmd(), +I get "permission denied" on /dev/ttyp3. Then I run it again and get to +ttyp4 which is OK. I wanted to skip past any pty for which I lack +permission and try the next without raising an error. Added debugging code: + + 16:25:23.524 pty_getpty() pty master open error[/dev/ptyp0]=5 + 16:25:23.524 pty_getpty() pty master open error[/dev/ptyp1]=5 + 16:25:23.524 pty_getpty() pty master open error[/dev/ptyp2]=5 + 16:25:23.524 pty_getpty() found pty master[/dev/ptyp3] + 16:25:23.524 pty_getpty() slavebuf [2][/dev/ttyp3] + +So it already was skipping past open errors; ttyp3 was opened successfully. +The problem is that ptyp3 is rw-rw-rw-, but the corresponding master, +ttyp3, is rw--r----. It seems the code assumes that if the master can be +opened, then so can the corresponding slave. Unfortunately, the code is +not structured to allow us to skip ahead to the next master if the slave +can't be opened. 7 Jan 2007. + +Spent a couple hours trying to rearrange the code in the pty module to skip +past inaccessible slaves but it was a rabbit hole, not worth it, backed off. +8 Jan 2008. + +Tried an upload over a secure connection using lsz. Unexpectedly, this time +it worked; not only was the file (about 0.5MB) transferred correctly, but +Kermit detected the fork's termination and got the pid's exit status, and, +for the first time, correctly reported a successful transfer. I have no +idea why this works today and not yesterday. More tests; it works most of +the time. It works with csz and with regular sz too. + +(days later...) + +ckucns.c seems to do the right thing; it recognize the ZSTART string, +activates the Zmodem-Receive APC, and returns. doconect() sees the APC and +begins to execute it. The RECEIVE command results in a call to the GET +command parser, doxget() (IS THAT RIGHT?), then comes a ttflui(), which +throws away a bunch of stuff. Finally we get to ttptycmd(), we get a pty +and run lrz in it, select() says stuff is waiting from the pty, but read +returns 0, errno 0. Skipping the ttflui() in doxget() if the protocol was +not Kermit didn't seem to make difference. ckuus6.c, 8 Jan 2007. + +The problem is that in this case, reads from the pty never get anything (no +data, no error), write always gets an error. It's as if the pty was not +being set up right, or we're using the wrong file descriptor. And if we +skip the autodownload? Same thing. + +OK, putting downloads aside for a moment, let's get uploads working as well +as possible. At this point we have the odd situation (at least in this +configuration) that the upload succeeds, but now for some reason we are +unable to read the exit status from the process, even though this was +working before, so ttptycmd() returns 0 (failure), yet Kermit reports +success. + +Well, it turns out that kill(pty_fork_pid,0) was gumming up the works. +If we use only waitpid() all is well, I think. waitpid() with WNOHANG +returns -1 with status -1 errno 0 if the pid has not exited, and it returns +the pid and status > -1 if the process has exited. Fixed pty_get_status() +to do it this way. ckutio.c, 7 Jan 2007. + +Let's move this from Mac OS to NetBSD and see how it works. Well, the file +transfer was just fine, but then I used some sexps to calculate the elapsed +time and transfer rate, and Kermit hung in dosexp(). Fine, ignoring that... +The debug log shows that ttptycmd() gets the pty OK, master and slave, the +i/o goes smoothly, and waitpid() does its job perfectly. Solaris, same +deal; ttruncmd() goes smoothly, but then the sexps afterward get "Arithmetic +exception". Turns out there was a BAD bug in dosexp() that allowed an +integer division by 0 to occur under certain circumstances; it's always been +there. Fixed in dosexp(): ckuus3.c, 8 Jan 2007. + +After noticing a few problems running the pop.ksc script in production over +the past year, rewrote \femailaddress() to be more reliable and a lot +simpler. ckuus4.c, 9 Jan 2007. + +Back to ttptycmd()... When we left off, we could send but not receive. Set +up a test case using Kermit as the external protocol for receiving a short +file. If I SET STREAMING OFF and use short packets, it actually does work, +so it's not a complete failure to function, but apparently a lack of flow +control for the pty. Began by completing the parameterization of the pty +module, so it can be called for interactive use (fc 0) or for running +protocols (1). Confirmed that everything works at least as well as before +(e.g. "set host /pty emacs" vs external protocols). ckcdeb.h, ckutio.c, +ckupty.c, 9 Jan 2007. + +Found in HP-UX "man 7 pty" a description of ioctl(fd,TIOCTTY,fc) which is +exactly what we want: fc 0 turns off all termio processing and guarantees an +uninterrupted, unmolested, flow-controlled stream of bytes in both +directions. This function also exists in Linux, but not in Solaris, NetBSD, +or Mac OS X (TIOCNOTTY is not what we want, it does something else entirely). + +Another possibility is TIOCREMOTE, which "causes input to the pseudoterminal +to be flow controlled and not input edited, regardless of the terminal +mode". This one exists in at least HPUX, NetBSD, Solaris, and Mac OS X. + +Solaris: builds OK, but at runtime we get ENOTTY ("Inappropriate ioctl for +device"). By the time this happens, it's hard to tell from the code whether +the fd we're using is for the master or the slave; TIOCREMOTE can be used +only on the master. Close inspection shows that I am indeed doing that; +ptyfd as seen by ttptycmd() is truly the master, i.e. the /dev/ptyXX device, +not the /dev/ttyXX device (the slave fd can't be seen at all, as it exists +only in a separate fork). OK, so now we know that TIOCREMOTE can't be used +on Solaris. + +NetBSD: Somehow, whether as a result of today's fiddling or the phase of the +moon, the code in pty_open_slave() that tries to open /dev/tty started +failing on NetBSD ("Device not configured"). Changing it to be run only if +fc == 0 (which doesn't seem to hurt anything), once again I get ENOTTY on +the TIOCREMOTE ioctl. Zmodem works but Kermit totally fails (the fork exits +immediately with an exit code of 0, even though it didn't do anything). + +Mac OS X: Exactly the same sequence and results as NetBSD. + +Linux: It did not execute the new ioctl at all; apparently the TIOC symbols +are hidden or not exported or something. + +Where we stand: + . Downloads don't work + . Uploads got slow again + . Kermit doesn't work at all as an external protocol + +Actually if I take the debugging out it goes fast, but it doesn't finish. + +All today's work on ttptycmd() looks like a dead end. To roll back to +yesterday: + + cp ckutio.c-20070108 ckutio.c + cp ckupty.c-20070108 ckupty.c + cp ckupty.h-20070108 ckupty.h + +or to continue with today's: + + cp ckutio.c-20070109 ckutio.c + cp ckupty.c-20070109 ckupty.c + cp ckupty.h-20070109 ckupty.h + +Comparing Monday's and Tuesday's pty-related code, the differences are: + 1. Passing of function code to and among pty modules. + 2. Skipping the TIOCSCTTY ioctl and the open("/dev/tty") test. + 3. Attempting to put pty in TIOCTTY or TIOCREMOTE mode. + +Commenting out 2 and 3 should put us back where we were on Monday if the +parameterization was done right. And with this, on Solaris, downloading +with Kermit external protocol works but slowly, 8K cps, with or without +debugging. Debug log does not show any obvious bottlenecks; select() takes +anywhere between no time at all and 0.1 seconds to return. If I increase +the pty-net buffer size from 1K to 4K, the rate goes up to 55K cps. If I +make it 8K I get 136K cps. With 16K I get 346K cps. 32K: 395K cps -- this +last one isn't worth the doubling. But at 24K I get 490K cps, sometimes +twice that. Let's stick with 24K for now. Downloading with Zmodem (rzsz) +works at the same rate, but now we're back to seeing the getty babble +(Several "**B0800000000022d") at the end. 10 Jan 2007. + +Moving to Mac OS X, everything works the same as on Solaris, except I don't +get the Zmodem getty babble there, not even with Omen rzsz. Tested sends +in both remote and local mode, the latter over a secure Kerberos 5 Telnet +connection, using C-Kermit, rzsz, lrzsz, and crzsz, all good. 10 Jan 2007. + +Now we're back where we were yesterday morning, but with better throughput. +The big issue then was receiving files. But yikes, now it works! Not only +that, I got a transfer rate of 2.1M cps. That's using Kermit protocol, +streaming, and big (4K) packets. Which didn't work before. Not a fluke +either, I uploaded bigger and bigger files up to 6MB, they all went +smoothly, at rates between 1 and 2 MBps. 10 Jan 2007. + +Not so great in Zmodem land, however. If I start the external-protocol +receiver on the far end, escape back and start a Zmodem send... nothing. +If I leave the remote C-Kermit at its prompt (where it supposed to recognize +the Zmodem start string), still nothing. On the other hand, if I do it +with a script instead of by hand: + + def xx output take blah\13, send /proto:zmodem \%1 + +it works, at least intermittently. But that's in remote mode. We won't be +using this in remote mode. In local mode, where we have a secure connection +to another computer, it seems we can read from the pty and write to the net, +but we time out waiting to read from the net; nothing arrives. Well, we +know that i/o works both ways, so there is some kind of screwup with the +Zmodem protocol start itself. Increasing the (still hardwired timeout) from +5 to 22sec and driving the whole process with a script so as to avoid +autodownload as well as manual dexterity effects... It just sits there +forever, way longer than 22 sec. ^C'ing out, I see that sz was indeed +started on the far end and the protocol was executing. But it looks like +the receiver (the one running under ttptycmd()) is getting trashed packets, +because (a) it seems to be sending the same thing over and over again, and +(b) sometimes it waits as long as 10 seconds before anything arrives from +the remote. Maybe I was too impatient; I interrupted it after 4 minutes but +it seems to have been making some progress. Whenever there was data +available to read from the net, it was always 65 bytes, and it was not +actually the same data over and over. This is using lrz as the external +protocol. crz gets a bit farther. In this case we read up to 24K at a +gulp, but the amount varies a lot. It looks like we took in about 1.2MB of +Zmodem protocol data, but were only able to output the first 20K of the +file. Clearly there were lots of errors. In the end, the crz exits with +status 1 (failure). + +Anyway it looks like we're back at needing to find a way to accomplish +something like TIOCREMOTE on the pty, which is where we came in. 10 Jan 2007. + +Without any way to make the pty transparent and flow controlled, it would +seem to make sense to write to the pty in smaller chunks than we do to the +net. I left the read-from-pty-write-to-net buffer at 24K and changed the +read-from-net-write-to-pty buffer to 48 bytes. + +Upload using lsz worked but took about 3 minutes. Actually it didn't work. +On the local end it seemed to work, but the file did not appear on the +remote end. Tried this several times, each time with different results, +adding more debugging each time. The problem this time was that the pty +read could get EWOULDBLOCK. Changed the code to not treat this as an error, +now Zmodem uploads are solid again except I never got EWOULDBLOCK again +either, even though I repeated the same upload about 1000 times (with +throughput of over 2MBps even with debugging on), so the test for it has +not been exercised. + +OK, uploads still work. Back to downloading... The very first pty read +gets 0 bytes, followed by the fork test that shows that it exited with +exit status 2. + +Next we try starting sz with some different options on the far end: + + -q: quiet (no messages): + for some reason this gets totally stuck. + it looks as if this option is misdocumented; + sz seems to be sending the letter C (as in Xmodem 1K or whatever) + + -e: escape (all control chars): + first attempt to read pty finds the process gone with exit status 2. + + -k: send 1k blocks: + this one didn't stop immediately. It reads 48 bytes from net, writes + 48 to the pty with no error. Then reads 21 bytes from the pty, writes + them to the net OK. Then reads 48 bytes from net, writes them to pty OK, + reads 21 from pty, writes to net OK, etc etc... It appears to have + worked but (final read from pty returned 0, fork test showed lrz exited + with status 0), but only 754 bytes were received from the net when the + file is 420K... + +Well this only goes to show that the faster we shove stuff into the pty, the +worse it gets. Zmodem downloads won't work unless we can make the pty +transparent and flow-controlled. So to summarize today's developments: + + . separated in/out buffer sizes + . handled EWOULDBLOCK + . found out that sz options don't help much + +11 Jan 2007. + +Next day. This has got to be the most delicate code ever, it's like +Whack-A-Mole, fix A and B pops up. Even without touching it, something that +worked perfectly a 2:00 doesn't work at all an hour later. Maybe I could +have used pipes instead of ptys, but pipes have problems of their own. +There has to be a way to do this. The telnet server, the SSH server, etc -- +they all run on ptys, and we can upload files to them with Kermit. Why? +Because Kermit puts its terminal into all the right modes using the +time-honored methods of ttpkt() and ttvt(). Perhaps all we need is a copy +of ttpkt() that operates on the pty. + +On that theory, let's go back to Kermit as the external protocol. +It's important to suppress all messages and displays. With that, +uploads work fine, no hitches. + +Downloads: We fail right away. The debug log shows the Kermit program that +we are starting in the pty says: + + "" - Invalid command-line option, type "kermit -h" for help. + +But of course we are not giving it an invalid command-line option. +Switching to gkermit for the external protocol, now we see that no matter +command-line options we use, we read 0d 0d 0a from the pty and then the +next time we go to read from the pty we get 0 bytes and waitpid() says the +program has exited with status 1. + +Why should downloading be different from uploading? ttptycmd has no idea, +it does everything the same. The only difference would seem to be which +side sends first, but even that tends to get washed out by each program's +startup messages. + +Downloading with Kermit worked 2 days ago, what's different now? The buffer +sizes. Putting the net-to-pty back up to 24K (from 48 bytes)... Now it +works again. + +Conclusion: Kermit conditions the pty correctly, Zmodem does not. Therefore +ttruncmd() must duplicate what ttpkt() does. + +Or not. Because rz works fine on ssh/telnet ptys too. But not on our pty. +lrz exits immediately with status code 2 = 01000 but there are no clues in +the lrz.c source code, I don't even see this exit status set anywhere. +Unredirecting stderr, I see that the error is "lrz: garbage on command line". + +Why do both Kermit and Zmodem sometimes think they are receiving an invalid +command line? If I could capture the garbage... + +Side trip #1: ("pty.log",O_WRONLY) gives "no such file or directory". +Changed this to ("pty.log",O_CREAT,0644) and now it doesn't get an error, +and it creates the file, but not with 0644 permissions, and with nothing +written in it. How come nothing works? + +Fine, the debug log shows that ttptycmd() receives the correct string +(e.g. "lrz -v"). It passes it to do_pty() correctly, and do_pty() passes it +to exec_cmd(), which runs cksplit() on it, coming up (in this case) with +"lrz" and "-v", which is right, and then: + + args = q->a_head + 1; + execvp(args[0],args); + +execvp() wants the args array to have a null element at the end. cksplit() +does indeed do that, or at least the code is there. Added code to exec_cmd() +to verify the argument list and that it is null-terminated. So far it is. + +Anyway, we have traffic between the Zmodem partners, but no joy. +Commenting out the bit that redirects stderr, now I can see it on my screen +in real time: + + lrz waiting to receive.Retry 0: Bad CRC + Retry 0: Got ERROR + Retry 0: TIMEOUT + Retry 0: TIMEOUT + Retry 0: TIMEOUT + Retry 0: TIMEOUT + +etc etc, forever. Trying sz -e on the far end, I get: + + Retry 0: Bad CRC + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + ... + Retry 0: Got ERROR + Retry 0: Bad CRC + Retry 0: Got ERROR + Retry 0: Got ERROR + lrz: xxufio.c removed. + +So apparently it's not a matter of escaping. Trying some other stuff, I +caught the command-line problem in the act: + + lrz: garbage on commandline + Try `lrz --help' for more information. + +Debug log shows: + + cksplit result[lrz]=1 + cksplit result[-v]=2 + exec_cmd arg[lrz]=0 + exec_cmd arg[-v]=1 + exec_cmd arg[]=2 + +An empty string at the end instead of a null pointer. I really do not see +any way that could happen, but rather than dig into cksplit() again after +all these years I added a test for this in exec_cmd(), which, of course +after adding it, never encountered this behavior again. + +Fiddled with pty buffer size again. Made it 512 bytes instead of 24K. +Zmodem downloads are the same (Rety 0: TIMEOUT, over and over). But I don't +see what the problem is -- every time we receive n bytes from the net, we +write n bytes successfully to the pty and there are no errors. But it also +looks like the remote sender is sending the file header over and over +because it's not receiving an acknowledgment. If we're not losing data, +then maybe it's a transparency problem. + +Tried uncommenting the TIOCblah stuff I commented out before. Now instead +of only timeouts I get: + + lrz waiting to receive.Retry 0: Bad CRC + Retry 0: Got ERROR + Retry 0: Bad CRC + Retry 0: Got ERROR + Retry 0: Bad CRC + Retry 0: Got ERROR + Retry 0: TIMEOUT + +which is odd because the TIOCREMOTE ioctl failed with errno 14, EFAULT, +bad address, which should indicate it had no effect. We're still receiving +data from the remote in tiny chunks (from 12 to 65 bytes), apparently the +same stuff (file header), and writing them to the pty successfully but +nothing... + +Looked at cloning ttpkt() for the pty, but these stupid routines use global +tty mode structs so it's not going to be easy. + +Well, we got exactly nowhere today, but I think I'll leave stderr as it is +so users will see some feedback; no reason not to. + +WHY DO KERMIT DOWNLOADS WORK AND ZMODEM NOT? + +Is it 8-bit transparency? Up til now I've been testing with text files. +If I try to download a binary what happens? Fails after 99 seconds. Packet +log from the far end shows that as soon as the first packet containing 8-bit +data is sent, everything stops. At least I got one of these: + + 17:23:56.475 exec_cmd arg[gkermit]=0 + 17:23:56.475 exec_cmd arg[-qr]=1 + 17:23:56.475 exec_cmd arg[]=2 + 17:23:56.475 exec_cmd SUBSTITUTING NULL=2 <-- the code I just added + +Doing this again shows the same thing on the near end. All the 7-bit-only +packets are sent and acknowledged OK. Three 8-bit data packets arrive and +nothing else happens after that. This is with G-Kermit. + +The same thing happens with C-Kermit receiving. But if I change C-Kermit's +.kermrc to turn off streaming and use a short packet length: + +The transfer works, even though it's sending 8-bit bytes. So the problem is +not 8-bit data after all, per se. Facts: + + . Kermit can receive streaming transfers of 7-bit files. + . Kermit can not receive streaming transfers of 8-bit files. + . Kermit can receive nonstreaming transfers of 8-bit files with short packets. + . Kermit can receive nonstreaming transfers of 8-bit files with 1K packets. + . Kermit can receive nonstreaming transfers of 8-bit files with 4K packets. + +So it's the combination of streaming and 8-bit data? 12 Jan 2007. + +As a test I made a new routine pty_make_raw() that does cfmakeraw() (a +nonportable "POSIX-like" function known to be used on ptys in applications +that do approximately what we're attempting). Results: + + Solaris: errno 25 - inappropriate ioctl for device. + +This happens even when we try to get the terminal modes with tcgetattr(), +which is completely nuts. We pass it the file descriptor of the pty master, +which is supposed to work. But in Mac OS X, there are no errors. But +downloads still don't work; lots of errors but the pattern is different. +Using a very small buffer: + + Retry 0: Bad CRC + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Got TIMEOUT + Retry 0: TIMEOUT + Retry 0: Bad CRC + Retry 0: Bad CRC + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: TIMEOUT + Retry 0: Got ERROR + Retry 0: TIMEOUT + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Bad CRC + +Using a bigger buffer: + + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + (several screensful) + +Various other combinations... Nothing seems to work. + +Insight: telnetd does exactly what we want to do, sort of. +But it uses TIOCPKT, so every time it reads from pty, it receives +one control byte and then the data bytes, which would complicate our +buffering scheme considerably. Anyway the TIOCPKT ioctl() fails on +Mac OS X with 14 "Bad address". + +Also see: snoopserver.c (found in Google). It seems to do things in a +slightly different way -- it sets stdout to raw and then dups it to the +slave side of the pty? + +Maybe it's a mistake to use the ckupty.c routines. They are designed for +creating and accessing an interactive session. Maybe just copy one of the +other programs. + +18 Jan 2007. Tried going back to blocking rather than nonblocking reads +to see if it would make a difference, after all the other changes. Nope. +OK, let's look at some of these other programs... + +snoopserver.c. I don't know exactly what this is or where it's from or what +platform it runs on and there are no comments to speak of, but it does +approximately what ttptycmd() does. To get a pty it uses openpty(): + + if (openpty(&pty, &tty, NULL, NULL, NULL) == -1) + +then creates a fork. In the fork, it closes the pty (master) and +manipulates the modes of the tty (slave), dups tty to be stdio, and then +doex execv() on the command. Meanwhile the upper fork closes the tty +(slave), gets the attributes of stdin, using atexit() to have them +automatically restored on exit. Then it sets stdin to raw mode and enters +the select() loop on stdin, the pty master, and the net. It uses regular +blocking reads. It does not use TIOCPKT or anything like it. + +openpty() is supported on: Linux, Mac OS X, NetBSD, FreeBSD, ... +openpty() is NOT supported on: Solaris, HP-UX, ... + + 1. Try copying the pty code, but keep everything else the same. + +I did this; it compiles and starts OK, upper fork (ttptycmd) debug log shows +no errors, but nothing happens. Logs show that the Kermit program that is +started in the subfork seems to die as soon as it reaches eof on its init +file. The good news, at least, is that select() doesn't report report that +the pty is ready to be read. Clearly the file descriptors aren't being +assigned as expected, or as before. + +In ckupty.c getptyslave() dup2's the slave fd to 0 and 1. The new code +does exactly the same thing. Debug log makes it look like the forked kermit +is not receiving its command line. But now I'm not even sure that the +forked kermit started at all. ps from another terminal doesn't show it. + +19 Jan 2007: Noticed that in snoopserver, the select() calls use standard +input and output file descriptors, rather than the pty master. Made that +change... In doing that I had to look at every file descriptor in every +line of code and discovered a couple mistakes, fixed them, put back the +original code but with the fixes, tried it, but no change; can upload OK but +still can't download with Zmodem without lots of errors and ultimate +failure. Going back to the alternative version and trying to get the the +file descriptors sorted out, now it appears that the external Kermit program +never even starts in the lower fork. After a bit more fiddling I sort that +out, but now when the lower Kermit program goes to open "/dev/tty" it gets +errno 6 "Device not configured". Forcing it to use stdio with "-l 0", it +gets past this and actually sends its first packet. But the Kermit on top +reads nothing from the pty. + +Next, I change the pty fd from STDIN_FILENO and STDOUT_FILENO to slavefd. +No difference. Next I comment out the dup2() calls. This time I get some +action. The transfer starts, but only one packet comes. Log shows that +the lower Kermit sends its S packet. The upper Kermit receives the ACK +but the lower Kermit never gets it. The write to the pty succeeds, no +error. Different combinations give different results. If write to master +and read from the slave, I get packets in both directions but tons of +errors.... This happens only if I comment out the dup2()'s. + +25 Jan 2007: After leaving it sit for a while, and realizing that what I'm +trying to do has to be possible because so much other software does the same +thing (e.g. Telnet servers), I put things back to how they were originally +-- the upper fork (Kermit) uses the master and the lower fork the slave. +The upper fork puts the master in raw mode, the lower fork puts the slave in +raw mode. The lower fork dup2's the slave fd to stdin/out. Send file in +remote mode using external Kermit: works OK but select() times out at the +end. This means that the self-contained pty code in ttptycmd() is sorted +out -- all the file descriptors go to the right place, etc, and now we can +use this routine as a testbed, rather than the original ckupty.c-based one. + +But send with lsz, csz, and regular rz: Nothing happens, times out after 0 +bytes of i/o. Once again, Kermit works, Zmodem doesn't. The reason for +running Zmodem in a pty is so its i/o will work as it does on a terminal, +no matter how it may fiddle the file descriptors. So why don't we see a +single byte come out? + +Commenting out pty_make_raw(), I get a successful Zmodem send using lsz. +csz manages to get the filename across, but then gets stuck. regular sz, on +the other hand, works perfectly. Testing csz by itself (not under Kermit), +I see it fails in exactly the same way ("Got phony ZEOF", etc). OK, forget +crzsz. + +OK, let's move to local mode over a Kerberized Telnet connection... +Uploading (sending) with external Kermit protocol... works. +Downloading (receiving) with external Kermit protocol... works. +Uploading with sz... works. +Downloading with lrz... Gets tons of errors and fails. + +Running pty_make_raw() on the slave but not on the master: no difference. +Running pty_make_raw() on the master but not on the slave: no difference. + +Back where we started... Either: + + . Zmodem is overdriving the pty, no matter what modes we put it in. + . It's a transparency problem. + +Theoretically we should be able to test these by using different sz switches: + -q: quiet (should always use this) + -e: escape all control characters + -B n: Buffer n bytes (rather than whole file) + -L n: Packet length + -l n: Frame length (>= packet length) + -w n: Window size + -4: 4K blocksize (doesn't help) + +-q by itself doesn't help. +-q -e, this one worked but still got about 100 errors and was very slow. +-q -e -l 200 -L 100, failed fast and bad. +-q -e -w 1. Failed quickly. +-q -e -w 1 -B 100. Eventually failed. +-q -w 1, Eventually failed. +-q -l 1024, this gets much more errors, definitely need -e. +-q -e -l 1024, got pretty far before failing. +-q -e -w 1 -l 1024, also got pretty far before failing. +-q -e, this one got farthest of all, about 48K, before getting errors. + +In the latter combinations that work somewhat better, we always get up to +16K, or 32K, or 48K, before the errors start coming out and piling up. +Sometimes the errors are recoverable and we receive as much as 300K +successfully before giving up. + +Now that we have data flowing pretty well (but not well enough), tried +reinstating pty_make_raw(), but it hurt more than helped. + +As a sanity check, I tried transferring from the same host over the same +kind of connection (Kerberized Telnet) directly to K95's built-in Zmodem +protocol, and that worked fine. So the problem is definitely in the pty. +Or more precisely, where Kermit writes incoming net data to the pty master. + +26 Jan 2007: Tried changing the size of the net-to-pty buffer from 24K to +1K. Result: total failure. Set both buffers to 1K. Still total failure. +Set both to 4K: now we get about 45K of data, then failure. Put them both +back to 24K, still fails totally -- the same code that worked pretty well +yesterday. Actually, no downloads work, not even Kermit, not even of +text files. + +27 Jan 2007: Since I have not been able to find a way to make ptys work for +this, I made a third copy of this routine, this time using pipes instead of +ptys. The disadvantage here is that if the external protocol does not use +stdio, the pipes won't work, but one thing a time... + +Inferior Kermit starts in lower fork, but when it tries to send its first +packet it gets errno=9 EBADF, Bad File Descriptor. Substituting G-Kermit as +the external protocol, which is simpler, reveals that the problem is that +the external protocol gets errors when it tries to manipulate the its stdio +file descriptors with ioctls, etc; these are not valid for a pipe. The pipe +mechanism itself works. If I take out the test for ttpkt() failing in +gkermit, the file transfer works OK. Trying Zmodem... Sending works OK; +receiving works a lot better than with ptys (it got 360K into the file +before failing). Making the buffers smaller, doesn't help. + +I'm starting to wonder if the problem might be in my buffering code, rather +than in the pty or pipe interface... Try making a version that does +single-character reads and writes. + +This one reads the first packet from the lower Kermit and sends it. It is +recognized by the other Kermit, which sends an ACK. We see the ^A of the +ACK, but then select() times out on the next character -- OF COURSE: because +at a lower level, it has already been read. We have to check the myread +buffer, and then call select() only if it's empty. Making this change: + + . SEND with G-Kermit works (but very slowly). + . SEND with lsz works but gets a lot of errors, eventually succeeds. + +Let's work our way back... With the same changes to the buffered pipe version: + + . SEND with G-Kermit/streaming works (fast). + . SEND with lsz works too (fast), but we get gubbish at the end. + . RECEIVE with Kermit fails because "/dev/tty is not a terminal device". + . RECEIVE with rsz... lots of errors ("garbage count exceeded") but succeeded. + +But maybe now we're seeing pipe artifacts, so going back one more step to +the version that gets its own pty and starts its own fork: + + . SEND with G-Kermit/Streaming works (fast) but select() times out at the end. + +Another breakthrough: Moved the write pieces to below the read pieces. This +is what was preventing the buffer reset code from working -- with the writes +done before the reads, we never catch up and can never reset the buffers. + + . SEND with G-Kermit/streaming works (fast) (but there's a pause at the end) + . SEND with lsz works (fast) (but there's a pause at the end) + . RECEIVE with rsz... lots of errors ("garbage count exceeded") and fails. + . RECEIVE with Kermit -- nothing happens (it thinks it succeeded), then we + reconnect, terminal sees S packet and goes into autodownload + +From the log it looks like ttpkt() fails in the lower Kermit. Switching +this with the hacked G-Kermit... it gets "transmission error on reliable +link". Tried again with real Kermit below, this time with "-l 0" and not +streaming. This was actually working, but slowly, I don't see any NAKs in +the packet log, but then select() timed out. + +28 Jan 2007: Restored both the calls to pty_make_raw(): + + . SEND with C-Kermit streaming works, but slow (54Kcps) + . Ditto, but with debugging off -- hangs forever. + . Ditto, but using G-Kermit instead of C-Kermit -- also hangs forever. + +Backed off on calling pty_make_raw(). Same thing. +Reduced size of net-to-pty buffer. Same thing. + +15 Feb 2007... Decided to give up on this and publish it as is, in hopes +that somebody with more experience with ptys can make it work, because I'm +just going in circles. So today I just have to get the code into shape so +people could choose among the three alternative routines. The second one, +yttyptycmd(), is the one that uses openpty(), which is not portable, so it +can be enabled only for Mac OS X, NetBSD, FreeBSD, and Linux, or by also +defining HAVE_OPENPTY at compile time. Anyway, if you build Kermit in the +normal way, you get the regular behavior -- ttruncmd() is used to execute +external protocols. If you build it with -DXTTPTYCMD, you get the first +version of ttptycmd(); with -DYTTPTYCMD the second, and with -DZTTPTYCMD the +third. + +(Then some interruptions, then...) + +From Jeff, fix hostname comparison in X.509 certificate checking to work +right in the case of names that contain no periods. dNSName_cmp(): cl_ssl.c, +21 Feb 2007. + +John Dunlap noticed some strange behavior when transferring files between +home base and the EM-APEX oceanographic floats via satellite... long story, +but every so often the transfer would get stuck for a long time, and it +happened only when C-Kermit was sending a file and received two or more +packets (Ack or Nak) back to back from the float. Years ago I added some +lookahead code to ttinl() to clear the input buffer of any interpacket junk +so that, in the windowing case, we wouldn't be tricked next time around into +thinking a packet was waiting to be read when there wasn't. The code, which +has been there for a while, was a bit fractured; luckily, it would be +executed only when the debug log was active so it didn't have much effect. +The problem was that if the SOP came immediately after the EOP, it could be +missed because the loop read the next character before checking the current +one. Fixed by rearranging the loop. Also I changed it so it would execute +in all cases, not only when the debug log was active. Also, cleaned up a +bunch of confusing #ifdefs and removed some chunks that had been commented +out for years, decades maybe. ttinl(): ckutio.c, 21-22 Feb 2007. + +Added NOW keyword info to HELP DATE, plus a tip about how to convert to UTC; +suggested by Arthur Marsh. ckuus2.c, 22 Feb 2007. + +When an FTP client sends NLST to the server and no matching files are found, +the server is supposed to respond with an error message on the control +channel and nothing on the data channel. However it seems that at least one +server sends the error message back on the data channel, as if it were a +filename ("/bin/ls: blah: No such file or directory"), and on the control +channel there is no error indication ("226 ASCII Transfer complete"). At +this point remote_files() has a listfile and, if a match pattern was given, +it looks through list to see if any of the lines match the given filename, +e.g. "blah". This makes FTP CHECK give false positives. The problem +(diagnosed by Jeff) is that the match pattern was not given in this case, so +it takes some random default action, resulting in the spurious success +return. Fixed by using the user's string as the pattern. Not tested, +however, since I don't have access to a server that behaves this way. +ckcftp.c, 22 Feb 2007. + +If an external-protocol file transfer fails, don't print Kermit-specific +hints. ckuus5.c, 22 Feb 2007. + +One more time with ttinl(). Got rid of the "csave" junk, which never could +have worked (which is no doubt why it was in a debugging section). The +problem was that saving the beginning of the next packet locally did not +synchronize with the buffer clearing (ttflui()) done at a higher level, +between calls to ttinl(). So now, the lookahead code, if it finds the +beginning an as-yet unread packet, puts it back at the head of the input +queue. This way, if the protocol engine clears the input buffer, it will +get the whole packet, not just the part after the SOH. ckutio.c, 24 Feb 2007. + +From Steven M Schweda, Saint Paul, MN: adaptation of large file support to +VMS (it was already possible to transfer large files in VMS C-Kermit but the +file-transfer display and statistics were wrong). And a minimal adaptation +of the FTP client to VMS -- no RMS, no special VMS file stuff, Stream_LF and +binary files only, developed and tested only with UCX. SSL/TLS is +supported. The source-code changes are minimal; most have nothing to do +with VMS, but with header files, prototypes, and data types (e.g. ftp_port +int rather than short, various signed/unsigned conflicts) to shut up +compiler warnings. Some of these could be dangerous in terms of +portability; I've marked them with /* SMS 2007/02/15 */. ckcfns.c, +ckcnet.h, ck_ssl.h, ckuus3.c, ckuus4.c, ckvfio.c, ckcftp.c, ckvker.mms +(which was rewritten to actually reflect the source module dependencies), +ckvker.com (also heavily modified). ckvker.com (the "makefile" for VMS +C-Kermit) now includes "F" and "I" option flags for the large File and +Internal ftp features, plus better handling of Vax/Alpha/IA64 distinction. +26 Feb 2007. + +Changed NetBSD targets to include -DHAVE_OPENPTY and -lutil, so they +can use openpty(). makefile, 26 Feb 2007. + +Built on Solaris without and with SSL OK. +Built on NetBSD with Kerberos 5, OK. +Built on Mac OS X 10.4, regular version, OK. +Built on Mac OS X 10.4 with SSL and Kerberos 5, OK. + +On VMS 7.2-1/Alpha with MultiNet 4.4A-X... + +'CC' 'CCOPT' KSP:ckuus3 +%DCL-W-TKNOVF, command element is too long - shorten + \CKUUS4.OBJ "'CC' 'CCOPT' KSP:ckuus4" "KSP:ckuus4.c KSP:ckcsym.h KSP:ckcdeb.h + KSP:ckclib.h" "KSP:ckcasc.h KSP:ckcker.h KSP:ckcnet.h KSP:ckvioc.h" +"KSP:ckctel.h KSP:ckuusr.h KSP:ckucmd.h KSP:ckuver.h" "KSP:ckcxla.h + KSP:ckuxla.h KSP:ckcuni.h KSP:ckuath.h" + +The new rule for ckuus4.c was too long. I removed one file from the +dependency list (ckcxla.h, which will probably never change again) and that +made it OK. Built Nonet and Net versions OK, but this is without the new +stuff. + +"make f" (large-file support) on VMS 7.2-1... +'CC' 'CCOPT' KSP:ckuus4 + if (CKFSEEK(fp,(CK_OFF_T)j,SEEK_CUR) != 0) { +........................^ +%CC-I-IMPLICITFUNC, In this statement, the identifier "fseeko" is implicitly +declared as a function. + +Ditto for ftello and fseeko in various other places, and then fseeko and +ftello come up up undefined at link time. + +The rule for ckcftp in "make i" (Internal FTP support) had the same problem. +I removed ckcxla.h from its dependency list too, but "utime" comes up +undeclared at compile time and undefined at link time. + +Verdict: neither one of the two new features can be used in VMS 7.2 or +earlier, but the code still builds OK if you don't ask for them. + +VMS 8.3 on IA64... Can't build anything: +%MMS-F-BADTARG, Specified target (WERMIT) does not exist in description file + +27 Feb 2007: Changed CKVKER.COM to keep all its dependencies but use a +shorter logical name (Steven M Schweda). The problem on VMS 8.3 is that MMS +now supports case-sensitive file systems, and so it can't find anything. +Workaround: bypass MMS (include "m" in P1). With this, "@ckvker.com ifm" +builds OK on HP Testdrive, but I can't test the new features since outbound +connections are not allowed there. As for fseeko(), ftello(), and utime(), +they simply are not available prior to VMS 7.3. It would probably be a good +idea to test for this in CKVKER.COM, but actually it is possible to install +newer C's and CRTLs on older VMS versions, so don't stand in their way. + +28 Feb 2007: With additional changes from SMS, and then some further +adjustments, I was able to build the FTP version on VMS 7.2-1. First I +tested it with GET of a binary file, but it transferred it in text mode. +After a few more attempts with PUT and GET, it crashed with "floating/decimal +divide by zero" in ckscreen, ckuusx.c line 27859. Of course, that's the +listing line, not the source line, and I don't have a listing. + +To get a listing, I deleted CKUUSX.OBJ and then did: + + $ make i "" "" "/LIST" + +Surprisingly, it recompiled everything. + +Anyway, the divide by zero happened in a section of code where the divisor +was not checked, but it was a section of code we should not have been +executing at all, since the file-transfer display was fullscreen, and this +was in the "brief" section. Anyway, I added the needed check. Again, it +recompiles everything. Maybe there's no MMS on grumpy -- right, there isn't. + +ANYWAY... Try to GET a binary file like this: + + binary + ---> TYPE I + 200 Type set to I. + get gkermit + ---> TYPE A + 200 Type set to A. + ---> SIZE gkermit + 550 gkermit: file too large for SIZE. + GET gkermit (text) (-1 bytes)---> TYPE A + +Anyway... "get /binary gkermit" downloads it, seemingly correctly (the byte +count is right). + +But "put /binary gkermit.;1" results in a 0-length GKERMIT file being sent. +Here's the debug log: + +FTP PUT gnfile[DISK$MSA4:[C.FDC.NET]gkermit.;1]=1 +ftp putfile flg[DISK$MSA4:[C.FDC.NET]gkermit.;1]=0 +zltor fncnv[DISK$MSA4:[C.FDC.NET]gkermit.;1]=-1 +FTP PUT nzltor[GKERMIT] +zfnqfp 1[DISK$MSA4:[C.FDC.NET]gkermit.;1]=675 +zfnqfp 2[DISK$MSA4:[C.FDC.NET]GKERMIT.;1]=31 +zfnqfp 3[DISK$MSA4:[C.FDC.NET]GKERMIT.;1]=31 +zrelnam result 2[gkermit.;1] +ftp sendrequest restart[DISK$MSA4:[C.FDC.NET]gkermit.;1]=0 +openi name[DISK$MSA4:[C.FDC.NET]gkermit.;1] +openi sndsrc=-1 +openi file number=2 +zopeni[DISK$MSA4:[C.FDC.NET]gkermit.;1]=2 +zopeni fp=0 +chkfn=2 +chkfn return=0 +zopeni fixed file format - using blk I/O +zopeni binary flag at open=1 +zopeni ifile_bmode=1 +zopeni binary=1 +zopeni RMS operations completed ok +openi zopeni 1[DISK$MSA4:[C.FDC.NET]gkermit.;1]=1 +ftpcmd cmd[PASV] +FTP SENT [PASV] +FTP RCVD [227 Entering Passive Mode (166,84,1,2,233,216)] +initconn connect ok +FTP SENT [STOR GKERMIT] +FTP RCVD [150 Opening BINARY mode data connection for 'GKERMIT'.] +doftpsend2 ftpcode[STOR]=150 + + Here is where the file is supposed to be read and sent but there is nothing + in the log between the "doftpsend2 ftpcode" line and the following line. + +rftimer status=1 +gftimer status 1=1 +gftimer status 2=1409025 +gftimer status 3=1409025 +gftimer s[0.000000] +zclose n=2 +chkfn=2 +chkfn return=1 +zclose ZIFILE RMS operations completed ok +ftp getreply lcs=0 +ftp getreply rcs=-1 +ftp getreply fc=0 +FTP RCVD [226 Transfer complete.] +ftp getreply[226 Transfer complete.]=2 +doftpsend2 ok=0 + +Everything is OK up until we go to send the file, then it behaves as if we +got EOF immediately and so closes the data connection, and reports success; +an empty copy of the file is left on the far end. + +Starting over with a text file.... PUT LOGIN.COM gets another divide by +zero. But it happened in the code I just fixed, which is impossible. Swell. +I recompiled everything and this time the upload worked, and downloading it +again worked too. + +But a binary file still can't be uploaded. Trying to upload a text file +after doing this seems to succeed (reports the right number of bytes sent) +but nothing appears on the far side. + +SUMMARY: + + To download a text file: GET /ASCII blah.txt (/ASCII is optional) + To download a binary file: GET /BINARY blah.bin (/BINARY is required) + To upload a text file: PUT blah.txt (/ASCII switch not needed) + To upload a binary file: PUT /BINARY blah.bin (doesn't work) + +Problems: + . Why doesn't BINARY "stick"? + . Why don't binary uploads work? + +The culprit seems to be the VMS version of zxin(). In the FTP module, +zxin() is called only when sending binary files. In VMS, zxin() is just +a front end for C-Library fread(). It probably needs to do just do +zminchar() in a loop, like binary mode does, but calling zzout instead +of xxout. Or something like that. FINISH THIS TOMORROW (debug on grumpy). + +2 Mar 2007: New logs from John Dunlap. + +ema-1636-log-0175.dbg: C-Kermit uploads a short file. It receives an Ack for +the Z packet it just sent, tailgated by the beginning of a Nak for the next +packet. When the second SOH is encountered, it is put back in the myread +queue. Then the protocol engine, to which we return the Ack, says, "I have +the packet I wanted so I'm clearing the buffer", and away go the first two +bytes of the Nak from the myread buffer. Then, having just received the Ack +of our Z packet, we send our B, and go to read the reply. in_chk finds 0 in +the myread buffer (which we just cleared) and 6 waiting to be read from the +comms channel, which it does, obtaining the remaining 6 bytes of the Nak, +which it properly discards. (The reason this is proper is that, having +already received the Ack for the last packet it sent, no Ack or Nak that +arrives subsequently -- in the non-windowing case -- could possibly affect +what it does next.) Since it hasn't yet found a good packet, it keeps +reading, and now it finds the Ack to the B, as soon as it showed up. This +is how it's supposed to work. No time was lost because of anything that +C-Kermit did. + +ema-1636-log-0174.dbg: C-Kermit uploads a short file. It sends Data packet +#3 and receives the Ack followed immediately by the first 3 bytes of a Nak +for packet 4. When it gets to the SOH of the second packet, it pushes it +back in the queue. Again, input() flushes the input buffer (myread queue +and device buffer). C-Kermit detects EOF on the file it is sending, and +sends the Z packet. Then it reads the remaining bytes of the Nak, +which it discards, and then it finds the Ack for Z which comes in 23 seconds +later, sends the B, gets a Nak for the B, sends the B again, gets the Ack +for the B 4 seconds later, and done. Again, it's working right and losing +no time. + +The question remains: what would happen if the protocol engine did not clear +the buffer? Would ttinl() retrieve all packets in sequence even when they +come back to back? To test this, I had C-Kermit send a file using 30 window +slots and observed the stream of Acks in the reverse direction: + + HEXDUMP: mygetbuf read (16 bytes) + 01 25 23 59 2f 52 39 0d | 01 25 24 59 2b 26 31 0d .%#Y/R9. .%$Y+&1. + ttinl lookahead my_count=9 + ttinl lookahead removed=^M + ttinl lookahead pushback SOP=^A + HEXDUMP: ttinl got (7 bytes) + 01 25 23 59 2f 52 39 | .%#Y/R9 + RECEIVE BUFFERS: + buffer inuse address length data type seq flag retries + 0 1 29212 9667 0 Y 3 0 + [%#Y] + ... + in_chk my_count=8 + ... + ttinl lookahead my_count=1 + ttinl lookahead removed=^M + HEXDUMP: ttinl got (7 bytes) + 01 25 24 59 2b 26 31 | .%$Y+&1 + RECEIVE BUFFERS: + buffer inuse address length data type seq flag retries + 0 1 29212 9667 0 Y 4 0 + [%$Y] + +Here we can see that the pushed-back SOH was properly retrieved next time +around, and the tailgating Ack was not lost. This scenario repeats itself +212 times in the log, and there are no screwups. + +Back to VMS FTP... The problem with sending binary files is that zxin() +uses C-Library fopen()/fread() instead of RMS, so it can't access the input +file, which was opened by zopeni(), which is totally RMS-ified in VMS +C-Kermit. For VMS only, I replaced the zxin() loop by a zminchar() loop +like the one used in text mode, except without the character set or +record-format conversion. Tested by PUT /BINARY of some binary files, which +worked fine. ckcftp.c, 2 Mar 2007. + +Next problem... VMS C-Kermit ftp client sending binary files in text mode. +Variation 1: We just send the file. zopeni() is supposed to detect that +it's a binary file and automatically set the mode. And it does: + + zopeni fixed file format - using blk I/O + zopeni binary flag at open=0 + zopeni ifile_bmode=1 + zopeni binary=0 + zopeni autoswitch from TEXT to BINARY + zopeni RMS operations completed ok + +but then in gnfile(): + + if (!server || (server && ((whatru & WMI_FLAG) == 0))) + binary = gnf_binary; /* Restore prevailing transfer mode */ + +Well, since VMS sets text/binary mode automatically when sending files, +this code can (and should) be skipped in VMS. gnfile(): ckcfns.c, 2 Mar 2007. + +Variation 2: BINARY or SET FILE TYPE BINARY doesn't force binary mode. But +SET FTP TYPE BINARY does. But BINARY does indeed call doftptyp() so what's +the problem? We do indeed set ftp_typ to 1 but it gets reset somewhere +before we call zopeni(). But then zopeni() puts it back to 1. Tracing +through a transfer, it looks like all of this works right, it's only that +the file transfer display says TEXT when the transfer is really in binary +mode. This is because screen() is called before openi(). I wonder if we +can call scrft() from the ftp module... No, that would be too easy. OK, +sendrequest calls openi() and sets the file mode; putfile() calls +screen(SCR_FN), which prints the transfer mode. But putfile calls +sendrequest() after it puts up the screen that says the file type. So it +looks like sendrequest() has to call screen(SCR_FN) again if it changes the +file type. OK, that did it. ckuusx.c, ckcftp.c, 2 Mar 2007. + +The BINARY and TEXT (ASCII) commands do not inhibit automatic type switching +in VMS. They don't in Unix either. They never have. Should they? I think +so, otherwise what good are they? Plus we want the Kermit FTP client to +behave like the others. I added code for this but it doesn't work, due to +the layers and layers of text/binary detection and switching and +if-this-but-then-if-that... Anyway, no harm done. The normal rule is: +when you PUT a file, Kermit figures out on a per-file basis whether to use +text or binary mode unless you include a /TEXT (/ASCII) or /BINARY switch +in the PUT (or MPUT) command. ckuus[r3].c, ckcftp.c, 2 Mar 2007. + +Wed Mar 7 16:21:13 2007 WROTE SHORT TEST PROGRAM for ttruncmd (the openpty +version) on Mac OS X. On dulce: ~/kermit/ttpty.c / ttpty.sh. It starts the +external protocol in the lower fork. The command to run is a command-line +argument. Sending and receiving files with Kermit works OK. But again, the +standalone program totally fails when I use sz or lsz as the external +protocol. So it looks like we can rule out any environmental effects of +running the code inside C-Kermit. + +Mon Mar 12 16:52:20 2007: Put some effort into making ttpty.c more useful; +added a debug log. Found that for some reason, at least on Mac OS X, +select() always timed out at the the end. I added a SIGCHLD alarm and that +seems to handle the fork exit condition very nicely. Now we can send (say) +a 3MB file at good speed on Ethernet (1Mcps) considering the debugging, etc, +and it terminates instantly. But when sending a file into ttptycmd (with +"gkermit -r"), things go wrong at the end -- the Z packet is never +acknowledged. This is reproducible. Maybe this is a good lead.... The log +shows that select() timed out, even though the gkermit fork had not yet +exited (or finished). It looks like gkermit sent the Ack, ttpty.c read it +from the pty and sent it out the net: + + 0003: read pty=8 <-- read Ack from pty + 0003: loop top have_pty=1 + 0003: loop top have_net=1 + 0003: FD_SET pty_in + 0003: FD_SET ttyfd in + 0003: FD_SET ttyfd out=8 + 0003: nfds=5 + 0003: select=1 + 0003: FD_ISSET ttyfd out + 0003: write net=8 <-- send ack to net + 0003: loop top have_pty=1 + 0003: loop top have_net=1 + 0003: FD_SET pty_in + 0003: FD_SET ttyfd in + 0003: nfds=5 + 0009: select=0 + 0009: select timeout - have_pty=1 + +But Ack never arrived. This is a streaming transfer. But nope, streaming +is not the problem. If I disable streaming ("gkermit -Sr"), we hang in in +the middle of sending the data. If I use small packets, we don't hang: +1000 is OK, 2000 is not. In fact, the cutoff is 1024. OK, TBC... + +Wed 14 Mar 2007: Receiving a file thru ttpty "gkermit -e 1200 -Srd" +produces a debug log that shows that gkermit gets a lot of EAGAIN errors +when it tries to read from its stdin. In fact, it takes 6 tries (read() +calls) to read the S packet (27 bytes). Then when the first data packet +arrives (1200 bytes), read() never returns even one single byte. The +timeout interval is 15 seconds and it times out repeatedly. Added a +primitive hex dump to the ttpty debug log for each read/write (showing only +the first 24 characters and the last character, so it fits on one line). +Tried uploading a file. The S, F, and A packets (short) are received and +Ack'd OK, but then ttpty select() times out, never receiving even one byte +from the D packet. Clearly, when the pty driver receives a burst of > 1K +bytes, stops working. As before, if I limit the packets to < 1K, it works +fine. + +Can I send an 8-bit binary file? Nope. ttpty reads the binary data just +fine from the net and writes it exactly as it was received to the pty, but +the first time we write an 8-bit byte, we never hear back from the PTY +again. But the log shows that when the initial 7-bit packets from the pty, +it looks like the PTY is not in rawmode, because these packets end with ^J +rather than ^M. Calling pty_make_raw() on the masterfd and slavefd +explicitly, however, doesn't change anything. It doesn't matter if I do +this in the lower fork or the upper fork. So maybe it's the actual +semantics of pty_make_raw() that are wrong. + +Thu 15 Mar 2007: Went thru all the terminal mode flags in Mac OS X; didn't +help. Changed hex dump to show whole packet. Put hex dump routine in a +private copy of G-Kermit. Tried to transfer an 8-bit file, logging both +ttpty and gkermit. Compared what ttpty received on stdin with what it sent +to the pty (same) and what was received by G-Kermit (same). Then I realized +that my little test program was not putting its controlling terminal into +raw mode; when I did that, I could upload binary files (streaming, 2MB/sec). +And with Zmodem too (with rz; lrz doesn't work for some reason). Looking +back at the original in ckutio.c, I see that ttptycmd() never called +ttpkt(). Maybe that was the trouble all along. (Yup, but maybe not the +whole trouble.) + +Moving back to C-Kermit and the original ttptycmd() routine, adding the call +to ttpkt(), and stripping out a lot of cruft, and moving the pty_make_raw() +code to ckupty.c, Kermit uploads and downloads (streaming) work fine in +Solaris. Zmodem sends a file, but then the transfer hangs at the very end, +as if the signoff protocol were lost. This happens on Solaris. If I move +back to Mac OS X, everything works just fine. Then, making a Kerberized +connection from the Mac to NetBSD, I can send files from the Mac with both +Zmodem and Kermit. Receiving... Kermit OK. Zmodem... Nope. "rz: +Persistent CRC or other ERROR" (and created a 265MB debug.log!) + +Fri 16 Mar 2007: ttptycmd() was for sending files with Zmodem across +encrypted connections. But it occurred to me that it's necessary for +clear-text connections too; e.g. Telnet, where 0xff has to be doubled. Of +course Zmodem doesn't do that itself, so there's no way Zmodem external +protocol could work when executed over a Telnet connection, and in fact +it doesn't. I wonder why I ever thought it did. + +Wed 21 Mar 2007: Back to where we left off a week ago. Trying C-Kermit's +ttptycmd() on the Mac again, in remote mode: + + . G-Kermit send txt (kst): OK 832Kcps + . G-Kermit recv txt (kr): OK 425Kcps + . G-Kermit send bin (ksb): OK 1000Kcps + . G-Kermit recv bin (kr): OK 188Kcps + +And Zmodem: + + . sz txt (zst): OK 563Kcps + . sz bin (zsb): OK 714Kcps + . rz txt (zr): OK 863Kcps + . rz bin (zr): OK 198Kcps + +So in remote mode, everything works. Now let's try a clear-text Telnet +connection... + + . G-Kermit send txt (kst): OK 841Kcps + . G-Kermit recv txt (krt): OK 391Kcps + . G-Kermit send bin (ksb): OK 811Kcps + . G-Kermit recv bin (krb): OK 171Kcps + +And Zmodem over the same clear-text telnet connection: + + . sz txt (zst): OK 91Kcps (*) + +Kermit is sending sz messages like "sz 3.73 1-30-03 finished." to the +host, which tries to execute them, after the transfer is finished. +Of course "sz" is a command, but: + + sz: cannot open 3.73: No such file or directory + sz: cannot open 1-30-03: No such file or directory + sz: cannot open finished.: No such file or directory + +Did I lose that code that dis-redirects stderr when I went back to using the +pty code from the ckupty module? No, it's there and it's being executed. +Apparently the copy of sz I have is writing its "finished" message to stdout +because "sz blah 2> /dev/null" does not suppress it. Starting again with +lsz instead of sz: + + . sz txt (lzst): OK 413Kcps + . sz bin (lzsb): OK FAILED (*) + . rz txt (lzrt): OK + . rz bin (lzrb): OK + +(*) Sigh. Using lsz, we get "garbage count exceeded" errors and eventual +failure. But using regular sz, we get the extraneous message that starts +sz on the far tend, and the resulting getty babble. + +But even without changing the code, it will work one minute, and then fail +consistently the next. For example, I was able to send files with sz +successfully over and over, but with the getty babble at the end. Then, +after trying lsz and then going back to sz, every attempt at sending a file +quits with "Got ZCAN". The difference has to be that Kermit always does at +least some minimal encoding of C0/C1 control characters such NUL and DEL and +IAC, and I doubt that Zmodem does. + +http://zssh.sourceforge.net/ says: + + If file transfer is initiated but never completes (ie a line like : + + Bytes Sent: 0/ 513 BPS:0 ETA 00:00 Retry 0: Got ZCAN + + can be seen, but transfer never completes), chances are the pty/tty on one + of the systems are not 8-bit clean. (Linux is 8-bit clean, NetBSD is not). + Using the -e (escape) option of rz should solve this problem. + +It doesn't, at least not with lrz. And yes, the receiving end happens to be +NetBSD. But it looks like the zssh people have been down this road too. + +But with rz and sz, it worked. Once. Twice. Three times. But of course, +with the getty babble at the end. This can be taken care of by doing: + + rz -eq ; cat > foo + +which puts "sz 3.73 1-30-03 finished" and any other messages in foo (but you +have to type ^D to finish the cat). Using this method I was also able to +send an 8K binary file that contained a test pattern of all 256 possible byte +values. Then I tried a 3MB binary executable. All OK. So here we go again: + + . sz txt (zst): OK + . sz bin (zsb): OK + . rz txt (zrt): + . rz bin (zrb): + +Downloading fails about halfway through a fairly large file. I tried an +even bigger file, guaranteed to be 100% ASCII; same thing -- halfway +through: "rz: Persistent CRC or other ERROR". But it worked with a smaller +version of the same file (82K versus 2MB). Tried again with the bigger +version, it failed in exactly the same way at exactly the same spot: byte +number 1048320. But this is just ASCII text so it can't be a transparency +problem. Substituting another plain ASCII file of the same size but totally +different contents, it doesn't fail (2.36MB). Back to the previous file, it +fails again, but in a different spot (832960). So it's not totally +deterministic. + +To round things out, I tried downloading the binary test-pattern file; it's +only 8K. This failed. + + -4, --try-4k go up to 4K blocksize + -B, --bufsize N buffer N bytes (N==auto: buffer whole file) + -e, --escape escape all control characters (Z) + -E, --rename force receiver to rename files it already has + -L, --packetlen N limit subpacket length to N bytes (Z) + -l, --framelen N limit frame length to N bytes (l>=L) (Z) + +Tried again with "sz -L 256 -B 256 -4aeq". Doesn't change anything. + +NOTE: Mac OS X rz 3.73 1-30-03 does not support -e. +NetBSD rz 0.12.20 does support -e. + +Thu 22 Mar 2007: It occurs to me that ttpkt() might still be a problem; +maybe it's the network connection and not the pty that is not transparent +enough. To test this theory I did "stty raw ; stty -a" and then copied all +of the flag values into ttpkt in the BSD44ORPOSIX section: + + . rz txt (zrt): OK (2.36MB file, worked 2 out of 3 times) + . rz bin (zrb): "rz: Persistent CRC or other ERROR" + +A little more fiddling with the flags and I got the 8K binary test pattern +to SEEM to download OK (in the sense that rz gave a 0 return code) but the +file itself was truncated, always at 224. If I changed the test pattern +file to not include any bytes with value 224 (0xe0) or 255 (0xff), the +download worked. So we have a transparency problem somewhere. The debug +log shows that all byte values are being received from the network correctly +so the problem has to occur when we try to feed them to the pty. + +But no amount of twiddling with the termios flags seems to let these +characters pass through. Of course, since they are not in the C0 or C1 +control range, "sz -e" doesn't quote them (which it does by prefixing with +Ctrl-X and then adding 0x40 to the byte value so (e.g.) NUL becomes ^X@. +Note that 255 does not cause problems because it coincides with the IAC +character; the remote Telnet server doubles outbound IACs, and Kermit's +ttinc() undoubles them automatically (as the log shows). + +Trying to send a different file (a C-Kermit binary) shows that 255 is the +real killer; the file is truncated where the first one appears (at about +6K), even though some 224's precede it. Going back to the remote-mode test, +I see the same thing happens with the binary test-pattern file, if I send it +from K95 direct to rz-under-C-Kermit-in-remote-mode. So it has nothing to +do with C-Kermit having a network connection. Yet if I send the same file +direct from K95 to rz, it goes OK and the result is not truncated, so it's +not Zmodem either. The data arrives to C-Kermit intact, so the failure is +definitely in writing it to the rz process through the slave and master ptys. + +BUT if I send the same file from K95 to rz-under-ttpty, that works. What's +the difference? Suppose I just transplant ttpty literally into C-Kermit... +It makes no difference. When receiving the test-pattern, it truncates it +in exactly the same place. + +Well, all this is on Mac OS X. What if I move it to a different platform? +OK, building on Solaris and following the exact same procedure, ttptycmd() +doesn't even use the network connection. I think that's because rzsz on +Solaris is hardwired to use the controlling terminal and can't be +redirected, even in a pty? + +Moved to NetBSD. + + . sz txt (zst): Failed ("Got ZCAN") + . sz bin (zsb): + . rz txt (zrt): OK + . rz bin (zrb): + +Well, this is a big mess. Sending doesn't work (or sometimes it does but +reports that it didn't). Receiving... well, actually it's the same thing; +the file is completely transferred but then the final protocol handshake is +lost. The local C-Kermit returns to its prompt, but rz is still running: + + Retry 0: Got TIMEOUT + Retry 0: TIMEOUT + Retry 0: Got TIMEOUT + Retry 0: TIMEOUT + Retry 0: Got TIMEOUT + Retry 0: TIMEOUT + Retry 0: Got TIMEOUT + Retry 0: TIMEOUT + Retry 0: Got TIMEOUT + Retry 0: TIMEOUT + Retry 0: Got TIMEOUT + +I don't see how that is even possible. Even after I exit from Kermit the +messages keep coming, even though ps doesn't show the rz process anywhere. +Looking at the code, I see a place where end_pty() was still commented out +from the ttpty.c episode, I uncommented it. But still: + + . sz txt (zst): Fails ("Got ZCAN") + . sz bin (zsb): Fails instantly (but with no diagnostic) + . rz txt (zrt): OK + . rz bin (zrb): Fails with tons of "Bad CRC", "Garbage Count exceeded" + +Conclusion for the day: I think this is hopeless. Even if I can get it to +work somewhere, the results depend on the exact Zmodem software, how it uses +stdin/out vs stderr versus getting its own nonredirectable file descriptor, +versus the Zmodem version on the other end and which options are available +on each, versus the pty and select() quirks on each platform, and on and on. +It will be so hard to explain and to set up that nobody would ever use it. +It would be better to just implement Zmodem internally. + +Fri 23 Mar 2007: Went back to the small test program, ttpty.c. Tried +setting both the master and the slave pty to rawmode, even though I have +never seen any other software that did this. I had it receive the binary +test pattern file; it worked. I made a bigger test-pattern file, 3MB, +containing single, double, and triple copies of each byte in byte order and +in random order, this one was accepted too. + +So it would seem that the ckupty.c module is something to avoid after all. +It's full of stuff I don't understand and probably should not undo. So +changing C-Kermit's ttptycmd() to manage its own pty again, using openpty() +(which is not portable), I got it all to work in remote mode: Kermit +text/binary up/down and Zmodem text/binary up/down. But in local mode on +the client side of a Telnet connection... + + zst: OK, but we still get the getty babble at the end that starts sz. + zsb: OK, ditto. This is with the 3MB test-pattern file. + zrt: Not OK -- "Persistent CRC or other ERROR" + zrb: Not OK -- got the cutoff at 224 again "Persistent CRC or other ERROR" + +It's close. But actually this was still with USE_CKUPTY_C defined. When I +undefined it, it was back to being totally broken. Start over. (Check the +new cfmakeraw() code.) + +Tue 27 Mar 2007: Starting over. Back to ttpty.c. Let's verify, VERY +CAREFULLY, that it really does work, using the most stressful of the four +tests: sending the big (3.2768MB) binary test pattern from K95 into rz +through ttpty, logging everything. ttpty definitely receives the big file +smoothly with no errors or hiccups when I have it set to use the master side +of the pty for i/o. The application program (Zmodem in this case) runs on +the slave, and the network and/or control program communicates with the +master. This implies that Zmodem controls the terminal modes of the slave, +and ttpty should be concerned with those of the master. Doing it this way +in ttpty confirms this. + +Fine. But if I tell ttpty to SEND a file with sz, nothing happens. Ditto +with lsz. Select times out waiting for input from the pty. But if I +manually tell K95 to RECEIVE /PROTOCOL:ZMODEM it works OK. Somehow sz's +initial B000000 string is being swallowed somewhere, and it's waiting for +a reply from the receiver. sigh... But "ttpty gkermit -s filename" works +fine. What's the difference? It has nothing to do with stdout vs stderr; +sz is not writing to stderr at all. Is it some timing thing between the +forks? Aha. It's that I change the modes of the pty master in one fork +while sz is already starting in the other fork. + +OK, good, now for the first time we have Kermit and Zmodem both able to +upload and download a large worst-case binary test-pattern file... in +remote mode. Now taking today's lessons and fitting them back into +C-Kermit so I can try it local mode... + +Using G-Kermit as the external protocol, first in remote mode... All good: +text/binary up/down. The "halting problem" is solved by SIGCHLD, which +catches fork termination instantly and lets ttptycmd() know there is no more +pty. Zmodem: + + zst: OK + zsb: OK + zrt: OK + zrb: OK + +That's a first. Next, repeat in local mode, in which C-Kermit is the client +and has made a Telnet connection to another host over a secure (Kerberos V) +connection: + + kst: OK zst: ... + ksb: OK + krt: OK + krb: OK + +It seems we can never end a day on a high note. Somehow I seem to have +broken regular internal Kermit protocol transfers over encrypted connections +-- the en/decryption engine loses sync. But they still work OK over a +clear-text Telnet connection. + +Today's code in ~/80/dulce.tar (27 Mar 2007). + +Added makefile target solaris10g+openssl. Gathered all the standard CFLAGS +for Solaris into cdcdeb.h so they don't have to be included in every single +makefile target for Solaris. On local Solaris 10 host OpenSSL is in +/opt/openssl-0.9.8e/. Tried the new makefile target, works OK. Also made +solaris10+openssl for Sun CC, but couldn't test it because I can't find any +Solaris 10 host that has Sun CC. Built with gcc at another site that has +OpenSSL 0.9.8f-dev, all OK. ckcdeb.h, makefile, 24 Jun 2007. + +It occurs to me that Kermit transfers on secure connections might have been +broken by the changes I made back in February to ttinl() for John Dunlap. +Here, for the first time, we invoke myunrd() to push a byte back into the +input queue, and there is also some funny business with "csave", which +changed, and which an old comment notes that it has to be treated specially +when encrypting. So it could be that the broken Kermit transfer has nothing +to do with the work on external protocols, and that putting back the +previous ttinl() will fix it. But now I can't seem to make a Kerberized +connection from Panix to Panix, even though I can make one from Columbia to +Panix. This means I have to build a Kerberized binary from the current +source code on either Solaris or Mac OS X. Trying Solaris +first... [~/solaris9k5/mk5.sh] This didn't work the first time due to +undefined krb5_init_ets, which is referenced if MIT_CURRENT is not defined +(it should be for Kerberos 5 1.05 and later and we have 1.42 here), tried +again with -DMIT_CURRENT=1... Nope, that one totally blew up in ck_crp.c. +Later, Jeff says krb5_init_ets is a no-op in Kerberos 1.4.x and later, +so I added an #ifdef (NO_KRB5_INIT_ETS) for skipping it; now it builds and +runs OK. ckuath.c, makefile, 9 Jul 2007. + +Meanwhile, using C-Kermit on Mac OS X, which makes the Kerberized connection +just fine, but still has the problem transferring files over it. Packet log +shows: + + s-00-01-^A9 Sz/ @-#Y3~Z! z0___F"U1@A^M + r-00-01-^A9 Y~/ @-#Y3~^>J)0___J"U1@I + s-01-01-^A(!Fx.x)(V^M + r-xx-08- + S-01-08-^A(!Fx.x)(V^M + r-xx-08- + S-01-08-^A(!Fx.x)(V^M + r-xx-16- + +Note that S packet is sent, received, and Ack'd OK. The F packet is sent but +is never Ack'd. Tried this several times and noticed that it's just +receiving that is screwed up, not sending. After ^C'ing out of the +transfer, I can still type commands, and they are executed on the far end, +but the results coming back are gibberish. Mon Jul 9 16:08:22 2007 (come +back to this later... substitute Dev.27 ttinl for current one and see if +the problem goes away, and if so, conditionalize the new code for clear-text +connections). + +Built C-Kermit with Kerberos 5 on Solaris with a version of ckutio.c that +uses the old ttinl() and transferred a file OK over a Kerberized connection. +So now it's just a matter of reconciling the old and new ttinl. The easiest +way to do this is to have new ttinl() chain to old ttinl() if the connection +is encrypted, which is what I did and it works fine. At some point the two +versions of ttinl() should be reconciled. ckutio.c, 12 Aug 2007. + +There was a function, islink(), used in only one place (ckuus6.c) that had +the same name as a commonly used scalar variable, and it was missing a +prototype. Changed its name to isalink() and added the prototype (Unix +only), ckuus6.c, ckufio.c, ckcdeb.h. 12 Aug 2007. + +Revisiting the ASCII and BINARY top-level commands, which are supposed to +be like in other FTP clients, but don't seem to have any effect. I added a +new routine to the FTP module, doftpglobaltype(), that sets the global, +sticky, permanent transfer mode (ASCII or BINARY) (TENEX could be added to +if anybody asks). These commands (now that they work) are different from +SET FTP TYPE { ASCII, BINARY }, which set the *default* transfer mode when +automatic switching fails for a given file. ckuusr.c, ckcftp.c, 12 Aug 2007. + (notify: Matt ) + +Even though the code hasn't changed, suddenly we're getting: + + "ckuusx.c", line 5682: warning: implicit function declaration: tgetent + "ckuusx.c", line 6183: warning: implicit function declaration: tgetstr + "ckuusx.c", line 6262: warning: implicit function declaration: tputs + "ckuusx.c", line 6266: warning: implicit function declaration: tgoto + +in ckuusx.c on Solaris 9. is still in /usr/include, dated 2002. +A quick search shows the missing functions are hiding in , which +until now was included only in Linux. Added a USE_TERM_H clause. No, that +doesn't help, the prototypes are not selected at compile time; there are +#ifdefs in that file that skip over these prototypes. I had to put them in +the code under #ifdef BUG999..#endif (I could have used a longer name like +#ifdef ADD_PROTOTYPES_FOR_CURSES_FUNCTIONS, but that would not be portable). +ckuusx.c, 12 Aug 2007. + +Also: + + "ckuusx.c", line 9232: warning: implicit function declaration: creat + +This is called in the IKSD database code, used for getting a lockfile. +creat() is a Unixism in code that is supposed to be portable. But IKSD only +runs on Unix and Windows, so I assume the Windows C library has a creat() +function. Anyway, suddenly the Solaris header files seem to have blocked +whatever path previously existed to the creat() prototype (which is in +), so I added an #include in the appropriate spot. ckuusx.c, +12 Aug 2007. + +Kermit functions for converting the number base -- \fradix(), \fhexify(), +\unfhexify() -- did not work with big numbers; ckradix() was missed in the +CK_OFF_T conversion. Fixed in ckclib.c, 12 Aug 2007. + +Updated the help text for ASCII, BINARY, and SET FTP TYPE to clarify the +semantics. ckuus2.c, ckcftp.c, 12 Aug 2007. + +Error messages were printed upon failure to open any of the four log file, +even with SET QUIET ON. Fixed in ckuus4.c, 12 Aug 2007. + +Built OK on NetBSD 1.3_RC3. Tried to build secure version but the libraries +had disappeared. 13 Aug 2007. + +Built OK on Mac OS X 10.4.9. Tried the secure version, macosx10.4+krb5+ssl. +Here we get the usual pile of "pointer targets in passing argument 1 of +(function name) differ in signedness", regarding security functions, but it +built OK. 13 Aug 2007. + +Reconciling the two ttinl's... On encrypted connections myread() returns +encrypted bytes; ttinl() has to decrypt them; it wasn't doing this in the +lookahead section so I fixed it. The new code works on both encrypted and +clear-text connections. I removed the chaining to oldttinl(), and +oldttinl() itself. ckutio.c, 13 Aug 2007. + + (Wouldn't it make more sense and be more efficient and less confusing + for myfillbuf() to do the decrypting?) + +When C-Kermit uses Zmodem as an external protocol, it doesn't seem to scan +files before sending them to set text or binary mode appropriately. It's +that external protocols bypass Kermit's whole "get next file" mechanism; the +(possibly wild) filespec is simply passed to the external protocol program. +Changing this would be a very big deal. But if only one file is being sent +(the filespec is not wild) it's easy enough to check. I added this to the +external protocols section of the protocol module. It can be overridden in +any of the regular ways (/TEXT or /BINARY switch on SEND command, SET +PATTERNS OFF, SET TRANSFER MODE MANUAL, etc). ckcpro.w, 13 Aug 2007. + +[FTP SEND /RECURSIVE] +Peter Crowley reported a problem with FTP recursive uploads getting the +directory tree wrong when the previous pathname was a left substring of the +new pathname (e.g. foo/bar/ and foo/bar2/). The logic did not handle this +case and created the bar2 directory as a subdirectory of bar, rather than as +a parallel directory. Fixed in syncdir() and tested with various edge cases. +ckcftp.c 14 Aug 2007. + + notify + +Added CD messages to FTP BRIEF display to track the ups and downs of +recursive uploads. ckcftp.c, 14 Aug 2007. + +The OUTPUT command gave a misleading error message ("Connection to xxx not +open") when used on a serial port that was, indeed, open but was not +presenting the Carrier signal, when CARRIER-WATCH was not OFF. Added a new +message for this, and some others. ckuus5.c, 14 Aug 2007. + +Sending from the command line, e.g. kermit -s foo, did not give an +informative error message if the file could not be found or opened. Fixed +in ckuusy.c, 14 Aug 2007. + +OK, back to ttptycmd.... It seems that back on March 27th, I got everything +working but I thought that there was still something wrong with it because +an unrelated problem so I put it aside. The version of ttpty.c from that +date worked OK, and it looks like I updated ckutio.c from it, but that +version of ckutio.c was put aside. Since then I have been working on the +ckutio.c version that was NOT put aside and so now I have to reconcile the +two: + + ~/80/ttypty/20070327/ckutio.c + ~/80/ckutio.c + +As a first cut I did this simply by replacing the contents of the #ifdef +CK_REDIR section of the latter with that of the former. Of course in +Solaris this comes up with openpty() implicitly declared at compile time and +unresolved at link time. So the first task is to get HAVE_OPENPTY defined +for platforms that have it and have the others use the ttruncmd(). For +starters I put an #ifdef block in ckcdeb.h that defines HAVE_OPENPTY for +Linux, FreeBSD, NetBSD, OpenBSD, and Mac OS X. Ones that don't have +openpty() include AIX, HP-UX, and Solaris. Others like SCO I don't know but +I doubt it. The real solution is to get the ckupty.c module to work but one +thing at a time... This version is supposed work with secure builds on the +openpty() platforms, and on the others like Solaris, if an external protocol +is attempted on a secure (encrypted) connection, an error message is +printed and the command fails. ckutio.c, 14 Aug 2007. + +How to test? Apparently I did all my testing on Panix before, and that's +where all my Zmodem builds are, but now when I build a Kerberized version +(which works if I do it on the right pool host), it won't make a local +connection, and there is no other place I can connect to that has a +Kerberized Telnet server. I can, however, connect to Panix from here, using +the same code, but on Mac OS X... + +Slight detour: Got access to AIX again (5.3.0.0). Picky compiler, some +things needed fixing.... Also it says "1506-507 (W) No licenses available. +Contact your program supplier to add additional users. Compilation will +proceed shortly" and of course it goes kind of slow. For some reason, I +can't do streaming transfers into AIX over a local network (to its SSH +server), but windowed transfers are OK. Anyway, noting that we've been +using the same basic makefile target since AIX 4.2, changing nothing but the +version herald, I made a new target, simply "aix", that picks up the AIX +version automatically and sets the herald from it. Ditto for aix+openssl, +but on this host requires setting SSLINC and SSLLIB to /opt/ssl/include and +/opt/ssl/lib. Also the make program here was extremely sensitive to spacing +so I had to make some minor edits to get the link step to work for the SSL +version. ckuusy.c, makefile, 14-15 Aug 2007. + +Got rid of the special Panix secure NetBSD target, replaced it with a +regular one, which is invoked in the normal way by defining K5INC and K5LIB +to point to to where the stuff is hidden. Cleaned up and modernized the +comments in the makefile a bit. makefile 15 Aug 2007. + +Changed some data types and added some casts to ckctel.c to do away with +tons of "pointer targets in passing argument 1 of 'xxx' differ in signedness" +warnings. 15 Aug 2007. + +Set up Mac OS X as the testbed for ttptycmd(), with Panix as the remote +partner over a Kerberos 5 connection. The first test is to send a 300K +text file with gkermit as the external protocol. It worked fine, and the +debug log showed all the right components were active (namely encryption and +ttptycmd) [kermit/zmodem send/receive text/binary]: + + Kermit Zmodem + kst OK zst OK + ksb OK zsb OK + krt OK zrt OK + krb OK zrb Failed "rz: Persistent CRC or other ERROR" + +We've seen this before. The problem is 0xff, Telnet IAC, as I proved to +myself by constructing a 3MB file that contained every byte but 0xff in every +mixture and order and transferring it successfully over the same connection. +Presumably the Telnet server is doubling IACs, whereas of course rz is not +undoubling, thus the CRC error. This is progress. 15 Aug 2007. + +Log shows that indeed every IAC in the source file arrives doubled. Adding +code to remove the first IAC of every adjacent pair, a small test file with +different-length runs of IACs transfers OK. The 3MB all.bin file does not. + +Starting over... I can receive a big text file with Zmodem OK. The 3.2MB +binary test pattern that contains no IACs failed after 1.8MB, but the part +that it transferred was OK. A second try, almost the whole thing arrived, +it stopped just 584 bytes short of the end. Could be that file size is a +separate problem. Making a new copy exactly 1MB long... Well, that's +interesting, this one too stopped just short of the end. And again, the +same thing. When connecting back to the host, the last Zmodem packet can +be seen on the screen; it's as if the local Zmodem exited before reading +the last packet... But OK, if I change the options on the remote sz +sender to use small blocks, etc, then it works. + +Now, changing from the 1MB no-IAC-binary test pattern, to the 1MB all-values +test pattern, we fail after 81K. But the part that was transferred is +correct. Second try, same thing, but 57K. Third: 40K. Each time, upon +connecting back, the session is completely dead. + +IF I HAVE TO undouble IACs for incoming files, don't I have to double them +going out? To send a block to net we just call ttol(), but ttol() doesn't +do any doubling (because Kermit protocol always quotes 0xff). To see what +happens, I changed the ttol() call to ttoc() in a loop that doubles IACs. I +tested this by sending the full 3.2MB test pattern, which worked fine. + +For receiving, it's slow but it works OK with files that don't contain IACs +(my concern was that IACs might appear in outbound files or in Zmodem +protocol messages). It receives the 1MB no-IAC test pattern, so there are +no problems with protocol or timing. But the full test pattern always gets +cut off, but at different points, as before, with the remote session dead. +Changing the Zmodem receiver from rz to lrz on the local end (since the +sender on the remote end is lsz) does not change the behavior. + +Anyway, I went back and replaced the byte loop with something more +efficient, and it goes about 20 times faster. But this doesn't help either, +it only makes it fail faster. But aha, what if a doubled IAC is broken +across successive pty reads -- we have to make the "previous character" +memory persistent. Well, that was a good insight, but it still didn't fix +it. The log shows the IAC handling code is working fine. + +What does sz say? Capturing its stderr to a file... "Retry 1: Got ZCAN". +Next time: "Retry 1: Got TIMEOUT". Next time: Got ZCAN. + +Trying different Zmodem options... apparently I don't need to use short +blocks. But I do need to use -e, probably because of Telnet NVT treatment +of carriage return; without -e, there is a "persistent CRC error". -O +disables timeouts, but this makes no difference. + +OK, we still have two Big Problems: + + 1. When a long file has no IACs, the final < 1K of the file is not received. + 2. When a long file has IACs, the transfer generally stops very early. + +Problem 1: the transfer consistently fails less than 1K from the end of the +file. Upon CONNECT back to the host, a big Zmodem packet is sitting there +waiting to be read, which means ttptycmd()'s copy of rz is terminating +early. Can we catch it in the debug log? Doing this takes forever and +writes a GB to the disk... And then the problem doesn't happen. Also, I +can receive a HUGE text file almost instantly with no errors at all. + +Switching to lrz on the receiving end, now I see the error messages, about +300 lines like this: + + Retry 0: Garbage count exceeded + Bytes received: 872352/1000000 BPS:85464 ETA 00:01 Retry 0: Bad CRC + Bytes received: 892448/1000000 BPS:86690 ETA 00:01 Retry 0: Bad CRC + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Retry 0: Got ERROR + Bytes received: 898336/1000000 BPS:84293 ETA 00:01 Retry 0: Bad CRC + Retry 0: Garbage count exceeded + Retry 0: Garbage count exceeded + Bytes received: 900384/1000000 BPS:83751 ETA 00:01 Bad escape sequence + 2fRe + try 0: Bad data subpacket + Bytes received: 941472/1000000 BPS:86191 ETA 00:00 Retry 0: Bad CRC + Retry 0: Garbage count exceeded + +Even when it succeeds, it gets these. But if I receive a text file, no +matter how big, no errors or retries or timeouts at all. So it appears that +there is only one problem: a big-time lack of transparency regarding 8-bit +and/or control characters. The odd thing is, it's not that the characters +can't get through -- they all can -- but they seem to cause transitory +blockages. 16 Aug 2007. + +Cleaned up the remaining pointer signedness warnings in ckutio.c, but this +was a mistake, it broke Kerberos connections completely. Undid the changes. +ckutio.c, 17 Aug 2007. + +Changed all return() in the fork()==0 section of ttptycmd() to exit(). +ckutio.c, 17 Aug 2007. + +Tried explicitly setting the slave pty to rawmode. Makes no difference. +Tried using the Mac OS X (curses) raw() function, and also system("stty +raw"); still no difference. Tried doing all of these in different +combinations and orders. I found one combination that cuts the errors about +in half, and the transfer of the no-IAC test pattern almost always succeeds +(but it's slow). Anyway, it doesn't help much with the test pattern that +contains IACs. Well, the code is more solid than it was before but +functionally we have not advanced much if we can't download a binary file +with Zmodem! On the other hand, we can upload them, and we can transfer +text files in both directions, which is an improvement over the previous +situation, in which the entire session would hang due to loss of +synchronization of the encryption stream. + +Tried adding -funsigned-char to CFLAGS of Mac OS X target. It does not +make the "signedness" warnings go away and it doesn't change the runtime +symptoms. + +I tried a simpler version of pty_make_raw(), the one from Serg Iakovlev, but +it was a total failure. That's encouraging though, because it indicates +that pty_make_raw() is the right place to be working. + +Then I made pty_make_raw() set or unset every single terminal flag +explicitly. This made no difference, but didn't hurt anything either. + +Then I made pty_make_raw() explicitly set all the c_cc[] characters to 0 +(but left c_cc[VMIN] as 1). This made no difference either. + +I checked pty_make_raw() against ttpkt() and the only difference I found in +the terminal flags is that ttpkt() sets IGNPAR thinking it means "ignore +parity errors" when really it means "discard any character that has a parity +error" (at least according to Iakovlev) -- exactly the opposite. But I +tried it both ways, no difference. 17 Aug 2007. + +I noticed that even Zmodem text receives can fail. They don't get any +errors, they just get cut off shortly before the end. (But usually they +succeed, and fast too, like 500K cps). + +What if I don't call pty_make_raw() at all on the slave pty? + +zrt: EESSSSSSSS: 80% good (E = stopped just before end but no other errors) + +zrb no-IAC test pattern, short blocks: + 1. S/5 (success with 5 screens of errors. + 2. S/7 + 3. S/7 + 4. S/6 + 5. E/7 (failed just before end) + 6. S/7 + 7. S/6 + 8. S/6 + 9. S/6 +10. S/4 + +So, lots of errors, but it recovered 90% of the time. +Next, same thing, but without requesting short blocks: + + 1. E/5 + 2. S/5 + 3. E/4 + 4. S/5 + 5. S/5 + 6. S/5 + 7. X/0 (hard failure right away: "Got ZCAN" + 8. S/5 + 9. S/5 +10. S/5 + +So it doesn't look like short blocks make that much difference. Now what if +I turn off prefixing? Bad CRC, fails immediately every time. Putting back +pty_make_raw(slave), it still fails hard. + +Tried a new strategy with pty_make_raw(): rather than modify existing flags, +I set all flags to 0, and then turn on only those few that we need like CS8. +Now we get only 2.5 screens of errors instead 4-7 and the transfer rate is +higher for binary files (all of the previous ones were under 100K CPS, while +for text files it was 400-500K CPS): + + 1. S/2 195669 CPS + 2. S/2 194720 + 3. E/3 + 4. S/2 192550 + 5. S/3 192325 + 6. S/3 145066 + 7. S/2 200689 + 8. S/3 188948 + 9. S/2 209461 +10. S/3 181991 + +I noticed that there was no TIOCSTTY ioctl in the pty/fork setup sequence, +which is recommended somewhere, so I tried that and it was a disaster; the +entire session hung. I took it back out. 18 Aug 2007. + +Tried some transfers over a clear-text (not encrypted) connection with the +same results: smooth, fast transfer of a big text file (400K cps); rocky but +successful transfer of the no-IAC binary pattern file (135K cps). Switching +back to ttruncmd(), the same binary file is received at 1.5M cps, and the +no-IAC binary file totally fails after too many "Bad CRC"s; and we already +know that any file that contains IACs will fail. One might say that +ttptycmd() is better in every respect than ttruncmd() except in speed +(when it works). + +Let's see if ttyptycmd still works in remote mode (to local K95): + . sz / text works, but slowly. + . lsz / text works but some weird errors are reported. + . lsz / binary / no IAC doesn't work at all (CRC-32 mismatch for a header; + Unexpected control character ignored: 13, etc). + . sz / binary / no IAC works OK but slow. + . sz / binary / full test pattern with IAC works OK but slow. + . Sending text into rz fails completely. + +What about ttruncmd() in remote mode? + . send /text works, fast. + . send /binary works, fast. + . receive /text works, not so fast but not bad. + . receive /binary works, not so fast but not bad. + +So we use ttruncmd() for remote mode, and we use it for local mode +serial-port and modem connections, and we use ttptycmd() on network +connections because (a) they might be encrypted, and (b) even if they are +not, they use some protocol that we have to handle, e.g. Telnet, Rlogin. +19 Aug 2007. + +Discovered that Sending binary files no longer works. Text is OK, binary +transfers don't even start. This happens on both encrypted and clear-text +connections. ttptycmd() is being used in both cases. But oddly enough, +receiving binary still works as before. What did I break, and when? +Oh, it was just the script, when I changed it from using sz to lsz. Putting +it back to sz makes it work, even with the full 3.2MB binary pattern with +IACs. + +I backed off the changes I made to ckctel.c to suppress some warnings, in +view of the fact that similar changes to ckutio.c broke things so badly. +19 Aug 2007. + +If sz is not given the -e flag, it sends control characters bare, except ^P, +^Q, ^S, and ^X. ^X is the control prefix, so ^A is sent ^X followed by A. +With -e, all C0 control chars are prefixed, but with ^X, which is, of +course, a control character. Interestingly, the C1 analogs of ^P, ^Q, ^S +(but not ^X and, unfortunately, not IAC) are also prefixed. -e makes no +difference for 8-bit characters. + +If we have a Telnet connection and the server is in ASCII (NVT) mode, CR is +always followed by LF or NUL. Well, it seems the server is putting us +(Kermit) in binary mode in this case, but staying in ASCII mode itself. +Added code to handle NVT byte stuffing and unstuffing in each direction +independently, according to the TRANSMIT_BINARY state in that direction. I +made a file containing just the bytes 0-31 and 127 and 128-159 and 255 (66 +bytes all together) and sending it from the host to C-Kermit, the local log +shows that every control character was received correctly and all TELNET +conversions were done right -- NUL removed after CR (and only after CR); IAC +removed after IAC (and only after an IAC meant as a quote). For the first +time, I can receive the 1MB all-values test pattern, but there are still +tons of (correctable) CRC errors, so the transfer rate is really awful, like +about 5% of what we get with a text file (25Kcps instead of 500). + +Further experimentation shows that the fundamental transparency problem is +fixed; we can receive short files (say, 1K or less) containing absolutely +any byte values in any combination with no errors at all. But once the file +size reaches (say) 10K, we get CRC errors, like one every 2 or 3K of data. +These are not deterministic. In successive transfers of the same file, they +come in different spots. It's tempting to blame pty buffer overruns, but +then text files would show the same behavior. When a binary file size +exceeds, say, 1MB, the chances of successful completion go way down, +independent of whether my external protocol is rz or lrz. I like lrz better +because the error reports come out on the screen as the transfer is going +on. Trying to download a real-world binary file -- a 2.2MB C-Kermit +executable -- I get 4500 error messages but the transfer eventually succeeds, +with an effective throughput of 21Kcps. + +Actually it turns out that "sz -a somebigtextfile" (2.2MB) also gets a lot +of CRC errors. The -e flag (escape all control characters) makes the same +big text file transfer with few or no errors. It's not sure-fire. +Sometimes no errors, sometimes one or two, and sometimes a fatal error that +kills the transfer. + +With binary files... a 32K binary file seems to make it every time. 40K +fails about 50% of the time. 48K fails 60% and every time it fails, it has +created a partial file of exactly 32K (32768 bytes). 96K fails 9 out of 10 +times, when it fails, the partial file is always 0 bytes, or 32768, or +65536, but that just means that rz's file output buffer is 32K. + +Why, then, do binary files cause trouble if it is not a solid transparency +problem? If a certain file can get through once, why can't it get through +every time? When a character arrives at the pty, the pty driver probably +takes a different path through its code, checking the terminal flags that +would affect that character. I tried making Kermit's network read buffers +very small but, surprisingly, this made things worse. I also tried making +them very much bigger, which didn't help either. 24K still seems to be the +right size. + +So, is it that some characters take longer to process than others? So long +that data is lost due to lack of flow control between TCP and the pty? One +way to test this theory is to slow Zmodem down. I tried "-l 32" which, +according to the man page, tells sz to "wait for the receiver to acknowledge +correct data every N (32 <= N <= 1024) characters. This may be used to +avoid network over-run when XOFF flow control is lacking." Makes no +difference. I also tried the -w (Window) switch, ditto. In fact there are +all sorts of options to set the "window size", "packet length", "block +size", and "frame length", but with no explanation of what these mean or how +they are related. If I crank everything down to minimum value: + + lsz q -L 32 -l 32 -w 1 + +I get 50% success with the 96K file instead of 10%. Adding -e, oddly +enough, made it worse. I also tried setting the environment variable +ZNULLS to different numbers like 512, no help there either. + +I tried making the read-from-net-write-to-pty buffer small (1K) but leaving +the pty-to-net one big. This improves chances of success, but it's +intolerably slow (3Kcps when the connection is capable of 500K). + +I also changed the write-to-pty operation from a single write() call of +possibly many K characters to a byte loop, one write() per byte. Same +result: success (but still about 300 recoverable errors), throughput 3Kcps. +20 Aug 2007. + +With ttptycmd() configured to write to the pty in a byte loop, it is +possible to delay each write. Adding a 10msec delay per character results +in a transfer that runs at about 20 cps and (for the 96K test file) would +take about 80 minutes to complete. And yet it still gets just as many +errors. So it's not a matter of timing either. The errors come, on +average, every file 388 bytes, but not at regular intervals. + +I tried the TIOCREMOTE ioctl on the pty master, as discussed somewhat +obliquely in the Mac OS X "man pty" page; "This mode causes input to the +pseudo terminal to be flow controlled and not input edited (regardless of +the terminal mode)" -- sounds like just the ticket but it made no +difference. Actually, looking at a man page on another OS (Solaris), it +says this is only for lines of text, EOLs are supplied, so that would mess +up the protocol. So remember: don't use this. + +Tried without O_NDELAY; the behavior was the same but the speed was much +slower. + +Tried switching back to the ckupty.c routines on Mac OS X and found that it +works now the same as with openpty(), except that I seem to get more getty +babble at the end. But this means I can run some tests on Solaris. I moved +the entire test environment from Mac OS X 10.4.9 to Solaris 9. But it +doesn't work at all. + +Trying to figure out the ckupty.c modules again. + . do_pty() calls pty_getpty() which returns in arg1 the fd of the pty master. + . Then it creates a pipe as a way to tell when the child dies + . Then it creates a fork: + - The parent does a blocking read from the pipe + - The child calls getptyslave() to get the pty slave + and writes one byte to the pipe + and then execs the command it's supposed to run +Note that the file descriptor of the slave is known only to the lower fork. +Therefore the lower fork is the one that has to set all the tty modes, etc. +I took care of all that but the ckupty.c method doesn't work at all on +Solaris. But it works "fine" on Mac OS X (the 32K all-bytes test file +transfers instantly with no errors, but the 96K one errors out). + +The problem on Solaris is that pty_make_raw() fails on the masterfd (but not +on the slavefd) with errno 25 "ioctl inappropriate for device". It doesn't +matter whether I do it in ckupty.c or ckutio.c. I found a web page on +kde.org that says Solaris does not allow tcget/setattr() on a pty master. +But the Sun "knowledge base" is not open to the public. Well, presumably +changes made to the slave are reflected in the master (comments in Solaris +telnetd seem to confirm this...) Let's come back to Solaris later. + +Moving to a Linux with lrzsz installed... Built a Kerberos 5 version with +USE_CKUPTY_C. Like on Mac OS X, it transfers short files OK and chokes on +longer ones. Switched to openpty(), it behaves the same. So the problems +on Mac OS X are evidently not OS-specific, which is good I guess, since that +means finding the way around them will apply to more than one platform. +21 Aug 2007. + +Look into TIOCSCTTY again. On System V based OS's, opening a pty acquires a +controlling terminal automatically. On BSD-based OS's, no; you have to use +the TIOCSCTTY on the slave file descriptor to give it one. I'm not sure why +a controlling terminal would be needed, except that without one, the virtual +device "/dev/tty" does not exist for the process that runs on the pty, and +maybe the application that runs there (e.g. rzsz) checks for it. On the +downside, having a controlling terminal opens the process up to terminal +interrupts like SIGINT and SIGQUIT. Until now I have not been using this +ioctl(). Results (in Linux): + + With TIOCSCTTY: 96K all-bytes test: 11 screens of errors, then success + Without TIOCSCTTY: exactly the same. + +Tried the same thing with TIOCNOTTY instead of TIOCSCTTY, with exactly the +same results (no effect whatsoever). + +There has to be a way to make this work, because Zmodem works through +telnetd, which basically the same thing as ttptycmd(): a relay between the +network and a pty. ttptycmd() is like telnetd backwards. Modern telnetds +are not much help; they don't access ptys or the network directly, they go +through "mux" devices so I can't see what they're doing to get transparency +and flow control. An old BSD telnetd uses packet mode but that would be a +big deal... + +I tried ignoring various signals like SIGTTOU and SITSTP, since some Telnet +clients do this. No effect, no difference. Anyway, in Linux the transfers +almost always finish OK despite the many errors. There is just some trick +I'm missing to make the pty accept a stream of arbitrary bytes without +hiccuping. + +What about Solaris, which uses ckupty.c? In streams-based OS's, where line +disciplines and whatnot are pushed on top of the pty, it looks like the pty +module saves the file descriptor of the "bare" slave pty (as 'spty') before +pushing things onto it, and then later uses spty rather than the regular +slave pty file descriptor when getting/setting terminal modes. I'm not sure +what this is all about but it's definitely SysVish... It happens if +STREAMSPTY is defined, but I noticed that STREAMSPTY is never defined +anywhere. I tried defining it so we take an entirely different path through +the code. It made absolutely no difference. + +Then I noticed that HAVE_STREAMS is not defined for Solaris either. Tried +defining it, but the session didn't work at all, no i/o. Removing the +HAVE_STREAMS definition but keeping the STREAMSPTY defined, I rebuilt and +tried "set host /connect /pty emacs". I got an EMACS screen but could not +type anything into it, which means that STREAMSPTY should not be defined +either. Removed the definition and "set host /pty" works again. So what's +the problem with ttptycmd()? + +In fact, ttptycmd() works on Solaris with Kermit as the external protocol, +but not with Zmodem, not even with text files. So again, there is no +fundamental problem with the code or the logic, it's Just A Matter Of +Transparency to control and/or 8-bit characters -- some trick I don't know +about. + +Looking at the Solaris debug log... I see that ckupty.c is calling +init_termbuf() to set the tty modes of the master, not the slave, and +set_termbuf() to set them, but you can't do that in Solaris, error 25. This +is in getptyslave(). Shouldn't getptyslave() be setting the tty modes of +the slave, not the master? I changed it to do this, but like all other +changes, it made no difference. I checked to make sure that after the change, +"set host /pty /connect emacs" still worked and it did. + +And then what... I had some code to redirect stderr in ckupty.c that was +not being executing due to a typo. When I fixed the typo, poof, Zmodem +binary transfers started working, or working as well as they work in Linux +and Mac OS X. It turns out that if I don't redirect stderr, sz and rz +just don't work. But lsz and lrz do. But if I do redirect it, I don't see +the progress messages from lsz/lrz. 22 Aug 2007. + +Built on HP-UX 11i v3 (B.11.31 U ia64) with optimizing compiler, got tons of +picky warnings, but it finished and linked and runs OK. Many of the +warnings were like this: + + "ckucns.c", line 1606: warning #2068-D: integer conversion resulted in a + change of sign: tnopt[0] = (CHAR) IAC; + +IAC is defined as 255 in ckctel.h. If I define it as 0xff, I don't get the +warnings. I changed the definitions of all the Telnet commands to be in hex +notation rather than decimal. If cuts way down on the HP-UX warnings and +doesn't seem to cause problems elsewhere. ckctel.h, 23 Aug 2007. + +Now it looks like Solaris is working but then it hangs at the end. It +appears as if the ckupty.c module is blocking SIGCHLD. Debug log shows that +when the transfer is complete, we received IAC DM (Telnet Data Mark) after +sz's last gasp and before the shell prompt is printed. But calling +tn_doop() in this case is a mistake because we are reading the number of +bytes that we know are available in a counted loop, but tn_doop() would +consume an unknown number of bytes and we would never know when to exit the +loop. Anyway, C-Kermit doesn't do anything with DM. Skipping over +tn_doop() (and not writing out the Telnet command bytes) fixes the hanging +condition at the end, even though SIGCHLD is never raised. ckutio.c, +23 Aug 2007. + +Some tests, Solaris to NetBSD over K5. +zst sends ascii.txt, a 2.36MB ascii text file (Kcps / Errors). +zrt receives the same file: + + zst 587/0 526/0 542/0 434/0 423/0 + zrt 827/0 800/0 847/0 FAIL 610/0 + +So text is good. Binary not so good. Here we transfer the 1MB all-bytes +pattern file. zrb receives it successfully, but with 1248 errors, at only +15Kcps. Sending the same file out always fails: + + Begin 20070823 16:32:07: SEND BINARY all2.bin [sz] + Sending: all2.bin + Bytes Sent: 5600/1000000 BPS:12446 ETA 01:19 FAILURE + End 20070823 16:32:13 + Elapsed time: 6.617992999999842 + cps = 151103.2121067556 + lsz: caught signal 1; exiting + +Decided to move to Linux but found that something is screwed up in Linux +C-Kermit with tilde expansion: + + send ~/testfiles/all.bin + +doesn't expand at all (but it did yesterday!). The problem was in the +ancient, ancient realuid/setuid handling code; real_uid() no longer works in +Linux. I worked around this in whoami() by setting ruid to getuid() if +real_uid() returned a negative number. Maybe dangerous, worry about it +later. ckufio.c, 23 Aug 2007. + +ANYWAY... after fixing that, I tested zsb on Linux, and it's broken there +too, using openpty(), so it's nothing to do with ckupty.c. After sending +the first Zmodem data packet, it just hangs, nothing comes back. In text +mode it gets farther, but then the same thing happens. Captured stderr from +rz on the far end: + + Bytes received: 608/1000000 BPS:21137 ETA 00:47 Retry 0: Bad CRC + Bytes received: 864/1000000 BPS:23540 ETA 00:42 Retry 0: Bad CRC + Bytes received: 1120/1000000 BPS:25003 ETA 00:39 Retry 0: Bad CRC + Bytes received: 5696/1000000 BPS:56988 ETA 00:17 Retry 0: Bad CRC + Bytes received: 9120/1000000 BPS:62227 ETA 00:15 Retry 0: Bad CRC + Bytes received: 9376/1000000 BPS:60766 ETA 00:16 Retry 0: Bad CRC + Bytes received: 9632/1000000 BPS:60361 ETA 00:16 Retry 0: Got TIMEOUT + Retry 0: Sender Canceled + Retry 0: Got ZCAN + +The local sz, however, doesn't give any error message. ZCAN means: "other +end canceled session by sending 5 ^X's" (or user typed them). What actually +happens is that ttptycmd()'s select() times out waiting for something from +the Zmodem partner and ttptycmd() itself kills the sz fork with SIGHUP. +When lsz receives SIGHUP it sends the ZCAN. So the real problem is that +after some point we're not receiving anything. + +I changed the timeout from 4 seconds to 30 seconds and now I see it just +stops for long periods of time and then resumes. The lrz log on the +receiving end shows tons of timouts, CRC errors, and other errors. The +local log shows that lsz wound up sending ZCAN (2 x (10 x ^H, 10 x ^X)). + +Moving on to another problem... Turns out Ctrl-C (SIGINT) is working right +after all. Since I'm using my test scripts like kerbang scripts, Ctrl-C +exits through trap(), as it should, closing the connection and cleaning up. +If I start Kermit and tell it to TAKE the script, then Ctrl-C brings me back +to the prompt with the connection still open (as it should). However, until +now I haven't done anything about the fork or the ptys. Added code to +trap() to kill the fork and close the master pty. ckuusx.c, 24 Aug 2007. + +Added code to try to break the deadlock. If select() times out, but we have +stuff to write either to the pty or the net, try to do it anyway, even +though select() did not say we could. But this doesn't help because when +select() times out we don't have anything to write. The problem is that +after receiving that last packet from the remote rz, the local lsz doesn't +seem to do anything, as if the lower fork wasn't running (and to confirm +this hypothesis, sometimes I noticed that when I Ctrl-C'd out of this, the +transfer would take off again). + +Backing up and testing with gkermit rather than zmodem: + + kst ripple.txt [824K] OK + kst ascii.txt [1359K] OK + krt ripple.txt -- FAILED + +It seems that we can't handle streaming. If I set up krt to disable +streaming on receipt, it works OK. + + krt ripple.txt [824K] OK + krb all2.bin [1000K] OK + +So here we have no trouble sending but big trouble receiving unless we +disable streaming. Whereas with Zmodem we have trouble receiving. + +But this wasn't happening before, what changed? Using C-Kermit on the far +end to receive the file with debug log on, I see that it is sending 4K data +packet after 4K data packet, with the local gkermit silent, as expected. +About midway through the transfer, the local Kermit sends an error packet +"Transmission error on reliable link". Looking at G-Kermit's debug log... +It receives the first five 4K data packets OK, but gets a CRC error on the +fifth one, and sends the Error packet. So it has received a stream of +20-some thousand bytes OK and then messes up. That number sounds a lot like +ttptycmd()'s buffer size. I changed the buffer sizes to be different: + + Read from pty and write to net: 4K + Read from net and write to pty: 1K + +This time it received the first 4K packet and failed on the second one. +Then I increased the buffers to 98K each, expecting to receive lots more +packets successfully but it bombed out on the 5th one. But that's good, it +confirms there's no logic error in the buffer management. Just to make +sure, though, let's set the buffer size smaller than the packet size and +disable streaming. In this case we get 4 good data packets and a CRC error +on the 5th one and so we request retransmission, and the next 8 times it +arrives it gets a different CRC error, but the 9th copy is OK. Then the +next packet comes and it gets a CRC error every time. And this is nothing +but plain ASCII text. + +Switching to remote mode: + + REMOTE=1 kk kst + +(after tricking myself because it was using ttruncmd() for this...) I see +that nothing works at all. What did I break? 24 Aug 2007. + +Fixed ttptycmd() to restore console modes after a remote-mode transfer. +ckutio.c, 25 Aug 2007. + +Noticed that error codes like ESRCH are not available in all modules. +That's because of some complicated in #ifdefs in ckcdeb.h that wind up not +always #including . But I notice that ckutio.c includes it +unconditionally with no ill effects, and so does ckvfio.c. Does any version +of Unix at all not have ? Added a catch-all clause to ckcdeb.h to +#include (in UNIX only) if, after the other clauses, ESRCH was +still not defined. ckcdeb.h, 25 Aug 2007. + +Now back to debugging ttptycmd()... Remote-mode transfers with ttptycmd() +were broken in two places, maybe as long as 2 weeks ago (this would have +affected non-network transfers too, which I can't test any more). +The logic was missing in a couple places for the non-network and/or +non-Telnet and/or non-encrypting connections (if statements with no else +parts). Fixed in ckutio.c, 25 Aug 2007. + +Testing remote mode: + + kst OK zst OK + ksb OK zsb OK + krt OK zrt OK + krb OK zrb OK + +Functionally it all works but there are hitches with Zmodem as always. +When sending to K95: + + . If I send with lsz, there are hundreds of "Subpacket too long" errors, + and the transfer is very slow, but it succeeds. + + . If I send with the 1994 Omen version of sz, transmission is instantaneous + and without errors, but then it hangs at the end. + + . If I bypass C-Kermit and send direct from lsz or sz, both work fine. + +So clearly the ptys are getting in the way. The hanging at the end would be +caused by the sz process closing before its last output reached the master +pty. It would need to do some form of flushing and/or pausing at the end +but there's nothing I can do about that; these programs were not designed to +be used in this way. Anyway, it only seems to happen with files longer than +100K. + +For local mode, testing in Solaris over our Kerberos 5 connection again: + + gkermit lrzsz + kst OK zst FAIL + ksb OK zsb FAIL + krt OK zrt OK but with errors + krb OK zrb FAIL + +If I use Omen rzsz as the external protocol (e.g. with zst), it blocks +redirection and it sends the file to my terminal, rather than over the +connection. This would probably be because it finds out the device name of +the job's controlling terminal and opens it, to prevent redirection. This +is hard to prevent in Solaris because there is no TIOCSTTY ioctl(). +Supposedly the same thing is accomplished by closing and reopening the slave +pty after doing setsid(). I added code to do this, but it made no +difference. (If I use lsz instead of sz, it is indeed redirected, but jams +up after about 15K.) ckupty.c, 27 Aug 2007. + +On Mac OS X with sz 3.73 1-30-03, however, the redirection works, so I +assume it would also work in Linux, FreeBSD, NetBSD, etc, too. Doing the +full test suite on Mac OS X: + + gkermit lrzsz rzsz + kst OK zst FAIL (1) OK + ksb OK zsb FAIL (2) OK + krt OK zrt OK (3) OK for 100K file, fails for longer. + krb OK zrb FAIL (4) OK (1MB all-bytes test pattern) + +(1) 64K file OK every time; 100K file fails every time. +(2) 10K file fails every time. +(3) Succeeds with 800K file but gets a few recoverable errors. +(4) Succeeds with 48K binary file with some errors, fails with longer ones. + +So actually it looks pretty good, it's just that lrzsz messes up. When +sending with lsz if I include -L 512 it sends the 100K test file with no +errors, but still chokes on longer ones. + +Testing on Mac OS X again, but this time over a clear-text Telnet connection: + + gkermit lrzsz rzsz + kst OK zst FAIL(1) OK + ksb OK zsb FAIL(2) OK + krt OK zrt OK(3) OK + krb OK zrb FAIL(4) OK + +(1) Almost worked, finished 777K out of 824K without errors. +(2) Got tons of errors, failed in first 30K out of 1000K. +(3) OK for 100K file but fails for larger. +(4) OK for 48K binary fail but fails for larger. + +Maybe see if we can do without the OPENPTY part. + +TOMORROW -- just clean up the code, add some SET / SHOW / HELP commands, +document it, and move on. + +Note: In K95, SET WINDOW sets the Zmodem packet length, 32 - 1024, multiple +of 64. + +SEE ~/80/external.txt + +Changed ftp port from int to unsigned int. ckcftp.c, 30 Aug 2007. + +Tried again to build KRB4/KRB5/SSL/TLS version for Solaris 9. Had to update +the build procedure again, of course, because of new file and directory +names, but ran into problems anyway because the +cu-solaris9g+krb5+krb4+openssl+shadow+pam+zlib target was calling another +target that did not know about the hardwired pathnames. Integrated the two +targets and tried building again. It actually compiled ok (but with lots of +warnings from the security modules), but failed at link time with +krb5_init_ets not found; fixed that with an #ifdef NO_KRB5_INIT_ETS, now it +builds OK but without the ftp client. Tried building it WITH the FTP and +that was OK too, no changes needed except to the build procedure. 12 Feb +2008, that is: C-Kermit 8.0.212 : 20080212. + +Tried to build with -DCK_SRP and -lsrp but: + + hash_supported ckcftp.o + hash_getdescbyname ckcftp.o + hash_getdescbyid ckcftp.o + cipher_getdescbyname ckcftp.o + krypto_delete ckcftp.o + krypto_new ckcftp.o + cipher_supported ckcftp.o + krypto_msg_priv ckcftp.o + krypto_msg_safe ckcftp.o + hash_getlist ckcftp.o + cipher_getlist ckcftp.o + cipher_getdescbyid ckcftp.o + +Sent mail to Tom Wu and backed off for now. makefile, 14 Feb 2008. +(Tom Wu never answered; seems like SRP is defunct.) + +The ".blah = xxx" form of variable assignment only worked for variables +names of length 22 or less, noticed and fixed by Wolfram Sang. ckucmd.c, +5 Mar 2008. + +In "set host /pty ssh ..." connections, the INPUT command suddenly stopped +working. This is in Solaris 9. It happens with all 8.0.* versions of +C-Kermit, so it's nothing to do with ttptycmd(). Added some debug() +statements but they don't show anything. Turns out there wasn't a problem +after all. Wed Mar 26 16:04:53 2008 + +Changed cmifi() to not print "?No files match" (or whatever) if SET QUIET ON. +ckucmd.c, 26 Mar 2008. + +Added \v(remoteip) for the IP address of the host we're connected to, +and \v(inmessage) for INPUT status messages corresponding to \v(instatus). +ckuusr.h, ckcmai.c, ckuus[24].c, 26 Mar 2008. + +Made \fkeywordval() strip braces/quotes from the right-hand side so we can +handle things like: + + password="stringwithspaceatend " + +ckuus4.c, 6 Aug 2008. + +Added invisible PUTENV command for UNIX only. Value should not be enclosed +in doublequotes. Requires lge \v(buildid) 20080826. ckuusr.[ch], 26 Aug 2008. + +Added SET VARIABLE-EVALUATION { RECURSIVE, SIMPLE }. This is highly +experimental, but also highly desirable if it works out. SIMPLE inhibits +the default recursive method of evaluating \%x and \&x[] variables, which +is, quite frankly, nuts and makes programming in Kermit at best +counterintuitive. I made an exception in the case of array subscripts, +because changing how they are evaluated could break a lot of scripts, and +anyway there should never be any harm in evaluating them recursively because +their final value is always (or should be) numeric, not some string that +might contain backslashes. The SET VAR setting is on the stack, just like +SET QUIET (it follows the quiet/xquiet code in ckuus[356].c), so macros or +command files that change it can't break the script that invokes them. +Added \frecurse() to force recursive evaluation of a \%x or \&x[] variable +regardless of the VARIABLE-EVALUATION setting. Added \v(vareval) to allow +programmatic setting to current setting. Tested on Solaris 9 but should be +totally portable. ckuusr.[ch], ckuus[356].c, 11 Sep 2008. + +From Günter Knauf: 64-bit builds were failing on SuSE Linux because +libresolv and libcrypt were in lib64 rather than lib; updated the tests in +the linux makefile target to find them. makefile, 12 Jan 2009. + +Tried building on Red Hat Enterprise Linux Server release 5.3 64-bit. +There is no curses or ncurses. "make linuxnc" compiled OK but collapsed at +link time looking for crypt(), res_search(), and dn_expand(). Turned out +the linuxnc (and linuxc) targets needed the same treatment as the Linux one +for 64-bit Linuxes. makefile, 3 Mar 2009. + +Consolidated the linux targets so we no longer need three separate ones for +curses, ncurses, and no curses. "make linux" works ok on computers with and +without (n)curses. "make linux+ssl", ditto. "linux+krb5+ssl builds OK but +needs -DNO_KRB5_INIT_ETS". Makefile, 3 Mar 2009. + +Fixed copyright date announced in herald, ckuus5.c, 3 Mar 2009. + +Patch from Seth Theriault to avoid deprecation warning for utmp references +in ckufio.c in Mac OS X 10.5 (later, this became a consolidated makefile +target that works automatically for at least Mac OS X 10.3.9 through +10.5.6). makefile, ckufio.c, 28 April 2009. + +zshcmd() (the function used by RUN and ! to run external commands) was not +falling back as expected in Linux RHEL4/5 if SHELL was not defined in the +environment. Also in all Unix versions, there was no indication if a RUN/! +command failed (other than the return code) because the specified shell +didn't exist or was not executable (e.g. the SHELL environment variable was +misdefined). Now it prints the name of the offending shell and the reason +it couldn't be executed (Not found, Permission denied, etc). ckufio.c, +28 April 2009. + +There is no easy way to get the last field of string; for example, the +extension from a filename, which might have any number of fields. In +general we want to be able to get "word number n" counting from the right; +\fword() lacks this ability. Now if you give it a negative word number, +that says to count from the right; for example \fword(one two three four +five, -2) returns "four". ckclib.c, ckuusr.c, 14 May 2009. + +Fixed a typo in the aix51+openssl (SSLLIBS should have been SSLLIB). +From Jason Lehr. makefile, 27 May 2009. + +Updated the linux+openssl+zlib+shadow+pam target to chain to the new main +Linux target. A bunch of other ones remain un-updated. makefile, 12 Jun 2009. + +Updates to the new Mac OS X 10.5 target from Seth Theriault (which is +supposed to work on all Mac OS 10-point-anything) to avoid warnings +that came up on on Mac OS 10.4.11/Intel. Once this one is proven we should +be able to remove/consolidate lots of other ones. makefile, 12 Jun 2009. + +C-Kermit disables SSL with the message "?OpenSSL libraries do not match +required version." if the version of OpenSSL that Kermit was built with is +not exactly the same as the version that is loaded dynamically at runtime. +This is actually the proper behavior, since APIs are not guaranteed not to +change between OpenSSL versions prior to 1.0.0. Made the error message more +informative. ck_ssl.c, 26 Aug 2009, and again 28 Aug 2009. + +AIX 6.1 is out, it is really just a new name for AIX 5.4. Added makefile +targets, plus for the first I made AIX 4.2 and later figure out its version +number in the makefile target so we don't have to keep adding new -DAIXnn +sections to the code, and also get its hardware name (e.g. "powerpc") from +uname at make time, rather than hardwiring "rs6000" as I did before. +Consolidated all AIX 4.2 and later targets so now just "make aix" or "make +aix+ssl" can be used. Except not the gcc ones as they have some quirks so +I'd rather not disturb them. Tested this on AIX 5.3. +makefile, 28 Aug 2009. + +From Kinjal Shah, a correction to the Linux makefile entry that allows it +find the 64-bit curses or ncurses library. makefile, 29 Aug 2009. + +Renamed aix4[23]: to oldaix4[23]: in makefile to fix the warning messages +I didn't notice before. I didn't want to remove them because they have +some special things that might still be needed, if anybody still has these +AIX versions. makefile, 29 Aug 2009. + +Built on RHEL 5.3 64-bit, regular and with OpenSSL 0.9.8e. 31 Aug 2009. + +Built on NetBSD 5.0.1/i386, regular and with OpenSSL 0.9.9-dev, 1 Sep 2009. + +Changed SSL message to mention LD_LIBRARY_PATH (Solaris), SHLIB_PATH (HP-UX), +LIBPATH (AIX), or LD_LIBRARY_PATH (Linux). ck_ssl.c, 3 Sep 2009 + +Noticed that "make linux+openssl" fails to include -lutil a link time, which +it needs for openpty(). That's because this target is obsolete. I renamed +it to be oldlinux+openssl and added linux+openssl as a synonym for +linux+ssl. makefile, 3 Sep 2009. + +Tested linux+openssl+zlib+shadow+pam, it's OK. Also linux+krb5. Also +linux+krb5+ssl. makefile, 3 Sep 2009. + +Tried building on Solaris 9 with OpenSSL 0.9.8k with +solaris9g+openssl+shadow+pam+zlib, it failed like so: + + ck_ssl.c:2875: error: conflicting types for 'inet_aton' + /usr/include/arpa/inet.h:52: previous declaration of 'inet_aton' was here + make[2]: [ck_ssl.o] Error 1 + make[2]: Leaving directory hmt/sirius1/prv0/kd/fdc/solaris9ssl' + make[1]: [solaris2xg+openssl+zlib+pam+shadow] Error 2 + make[1]: Leaving directory hmt/sirius1/prv0/kd/fdc/solaris9ssl' + make: [solaris9g+openssl+shadow+pam+zlib] Error 2 + +The problem was caused by including an inet_aton() function ck_ssl.c for +the benefit of platforms that don't have one in their libraries. This is +defeated by including NO_DCL_INET_ATON in KFLAGS. I added this, but then +I thought it would be a good idea to automatically sense the OpenSSL +version so we can automatically set OPENSSL_097 or OPENSSL_098 rather than +bombing out, so I added code to do that too, and also to set the Solaris +version number: 9, 10, or 11. The new entry is solaris9g+openssl. +ckcdeb.h, makefile, 3 Sep 2009. + +Fixed a complaint in ckufio.c about implicit declaration of initgroups. +ckufio.c, 4 Sep 2009. + +Built on Solaris 10 with gcc and Sun CC using new solaris{9,10,11} target +that is like the new solaris{9,10,11}g one but without the gccisms. +makefile, 4 Sep 2009. + +Changed solaris{9,10,11}g+ssl target to set only the SSL-specific things and +then chain to the main solaris{9,10,11}g target. Tested OK on Solaris 9 and +10. makefile, 4 Sep 2009. + +Created solaris{9,10,11}+ssl target that is exactly like the +solaris{9,10,11}g+ssl except it chains to the solaris{9,10,11} target +instead of the solaris{9,10,11}g one. That is, it builds an SSL version of +C-Kermit using Sun CC rather than gcc. makefile, 4 Sep 2009. + +Tried building on HP-UX 10.20, bundled (non-ANSI) compiler ("make +hpux1000"). This failed until I: + + . Moved a struct initialization out of setextern(), ckuus3.c. + . Removed an ANSIism from the declaration of sigchld_handler() in ckutio.c + . Added a cast to strcmp() in zvuser(), ckufio.c. + +Builds OK now. Built OK with "hpux1000o" (the ANSI compiler) too. +And with "hpux1000gcc". Couldn't test "hpux1000o+openssl". 21 Sep 2009. + +The Sony Playstation 2 and 3 are 64-bit PowerPC platforms that can run Linux +if it is installed as an "other OS" on its hard disk; and the Linux kernel +since 2.6.21 supports the PS3 without any patching required. Pawel Rogocz +reported that "make linuxppc" (one of the old targets that has not yet been +integrated into the main "linux" target) compiles OK on 2.6.29-ydl61.3 +(Yellow Dog Linux release 6.2 'Pyxis'), but fails at link time because +'openpty' isn't found, because -lutil was not included, because that part +was added only to the main linux target. I asked him to try "make linux" +and he sent back a transcript in which there were thousands of errors from +the curses code ckuusx.c. Later I tried it myself and it built without a +hitch. My theory is that between then and now, a missing piece of the +ncurses library (/usr/include/ncursesw) was installed. 21 Sep 2009. + +HP-UX 9.05 on PA-RISC 9000/712 building with hpux0900 (bundled compiler): + . ckutio.c compilation failed with PENDIN and FLUSHO not defined in + pty_make_raw(). I dummied definitions for them to handle this situation + on this or any other platform where it might crop up. + ckutio.c, 24 Sep 2009. + . Ditto for the PTY module, + IMAXBEL. ckupty.c, 24 Sep 2009. + . References to endusershell() were fatal in the bundled compiler. Changed + the hpux0900 target to define NODCLENDUSERSHELL, and put a special case + in ckufio.c to not put a cast in front of the call if NODCLENDUSERSHELL + is defined. Now it builds and links OK. makefile, ckufio.c, 24 Sep 2009. + +HP-UX 9.05 on PA-RISC 9000/712 building with hpux0900o (optimizing compiler): + . Warnings in ckutio.c at line 14860 about arguments to select (pointers + are not assignment-compatible). "man select" says arguments are ints. + Defining INTSELECT fixes these warnings but results in fatal errors later + around line 14881 and others in the area involving FD_SET. This was too + involved so I put it back as it was. 24 Sep 2009. + +Built OK on Solaris 10 with Sun CC. A couple warnings about implicit +function declarations for curses routines because apparently they aren't +declared in curses.h. Tuff. 25 Sep 2009. + +Tried building on Solaris 10 with Sun CC and OpenSSL 0.9.8k, and this +uncovered various loose ends in the solaris9+openssl target, which I fixed. +makefile, 25 Sep 2005. + +Fixed four typos in printfs in ck_ssl.c, \% instead of just %. 25 Sep 2009. + +Squelched 20-some complaints about a character array being referred to +directly instead of by a pointer, plus several other similar nits to get rid +of all the compilation warnings on Solaris 10 with Sun C 5.8 Patch 121015-06 +2007/10/03. ckctel.c, ckctel.h, 25 Sep 2009. + +Built the result on the same Solaris 10 system with gcc 4.2.4 using the +new solari10g+openssl target, working out a few kinks here too. +makefile, 25 Sep 2009. + +Made consolidated Solaris 9/10/11 64-bit targets for gcc, solaris9g64, +solaris10g64, solaris11g64, tested on Solaris 10 Sparc. makefile, 25 Sep 2009. + +Made consolidated Solaris 9/10/11 64-bit targets for Sun cc: solaris9_64, +solaris10_64, solaris11_64. These simply set a couple flags and chain to +the main solaris9 target. makefile, 25 Sep 2009. + +Removed a bunch of old superfluous Solaris 9 and 10 targets: oldsolaris9, +oldsolaris9lfs, solaris9g64 solaris9g_64, oldsolaris10 old solaris10lfs, +oldsolaris10+openssl, oldsolaris10g+openssl, solaris10_64, oldsolaris10g, +solaris10g_64, solaris10g64. There are still plenty more to prune but it's +a start. makefile, 25 Sep 2009. + +Added or fixed some missing prototypes in ckctel.h: +fwdx_send_xauth_to_xserver(), fwdx_parse_displayname. 25 Sep 2009. + +Improved the instructions for building secure versions in the makefile, +using this example: + + make solaris9+openssl "SSLINC=-I/opt/openssl-0.9.8k/include" \ + "SSLLIB=-L/opt/openssl-0.9.8k/lib" + +makefile, http://kermit.columbia.edu/security.html, 25 Sep 2009. + +Built on HP-UX 11.11, 26 Sep 2009: + . make hpux1100 (ok) + . make hpux1100gcc (ok) + . make hpux1100o (gets a lot of warnings about sendpath and sendfile, + because they are also declared in , but builds OK) + . make hpux1000gcc+openssl \ + SSLINC=-I/opt/openssl/include SSLLIB=-L/opt/openssl/lib + +Note: sendpath and sendfile are not Kermit symbols. The warnings are coming +from socket.h: 'Redeclaration of "sendfile" with a different storage class +specifier'. This is nothing new; see notes of 2-4 Jan 2005. + +From Peter Eichhorn: + . Update to makefile to make current code build OK on HP-UX 8.00. + . Changes to format of some hints to make them more copy-and-pastable. +makefile, ckuu5.c, 28 Sep 2009. + +From Peter Eichhorn: Changes to HP-UX 7.0 target to increase the switch table +stack size, which was overflowing. makefile, 30 Sep 2009 + +HP-UX 6.5 (1989), "make hpux0650tcpc"... (8:19...) Needed to not include +arpa/inet.h (which doesn't exist) and not use host address lists (add +-DNOHADDRLIST), which gets us past ckcnet.c, but in ckcftp.c we bomb out on +FD_SETSIZE undefined. Somehow we worked around this in ckcnet.c. Patched +in a definition in ckcftp.c, and also added -DINTSELECT to compiler flags. +Compiles ok, bombs at link time on bcopy, bzero, FD_ZERO, FD_SET, FD_ISSET. +Now it compiles and links OK but dumps core when started. Added +-DNOCKGETFQHOST, rebuilt from scratch (takes 35 minutes). It starts OK, but +it dumps core when given a "telnet xxx" command, where xxx is a hostname. +However, it works OK if an IP address is used: "telnet 123.45.6.78". It +took all day to track this down, but now it's fixed (see the #ifdef HPUX6 +sections of ckcnet.c). So now (for the first time, I think) we have both +telnet and ftp in HP-UX 6.x, if anyone cares. ckcnet.[ch], ckcftp.c, +makefile, 2 Oct 2009. + +Changed default SET TERMINAL TYPE type for K95 from vt320 to vt220. This is +because Unix OS's such as Solaris have dropped vt320 as a terminal type. +settrmtyp(), ckuus7.c, 5 Oct 2009. + +I moved the PUTENV command code, which was inline, to a function, doputenv(). +ckuus[r7].c, ckuusr.h, 5 Oct 2009. + +Changed the UNIX version of SET TERMINAL TYPE to take a value and then do +the equivalent of "export TERM=value" by calling doputenv(). This sets +\$(TERM) correctly and passes its value along to inferior processes. +However, to make this take effect within Kermit itself (for the fullscreen +file transfer display and for the SCREEN command, Ctrl-L, etc) I also had to +reinitialize the curses database, which is tricky because normally if you +feed it an unknown terminal name, it just exits. ckuus7.c, 5 Oct 2009. + +Changed the little-known and little-used RESET command (which closes all +open files) to also put command echoing back to normal in case it got +messed up somehow (as in HP-UX 6.5, upon returning from PUSH). +ckuusx.c, 5 Oct 2009. + +For Unix, increased string buffer sizes for wildcard expansion for all +platforms that have BIGBUFOK defined from 500000 (0.5M) to 10000000 (10M) +bytes, and for 64-bit builds to 2000000000 (2G) bytes. No point making +it bigger than that because malloc's argument is a size_t, which is an int. +ckufio.c, 5 Oct 2009. + +Built on Mac OS X 10.4.11, required one minor adjustment to the makefile +(-DNODCLINITGROUPS). This was using the macosx10.5 target, which is +supposed to be universal like the linux and netbsd targets, but not yet +proven. Also built a 64-bit version (-mpowerpc64 -mcpu=G5 -mtune=G5 +-arch ppc64); it compiles and links OK but won't start: "Bad CPU Type +in executable". Fix later... makefile, 5 Oct 2009. + +Changes from Seth Theriault to suppress signed vs unsigned char warnings in +Mac OS 10.5.8 from gcc4, and a new makefile target for Mac OS X (presumably +10.3.9 or later) + Kerberos 5 and OpenSSL. ckutio.c, ckuath.c, ckctel.c, +ckcnet.c, ckcftp.c, ck_crp.c, makefile, 6 Oct 2009. + + Later I had to back out of these, because although it made for a + clean build, in the resulting executable SSL connections didn't work. + +Tue Oct 6 17:23:27 2009 +FTP address resolution is broken, but ftp_hookup() hasn't changed. +So... (see the #ifdef HPUX6 sections of ckcnet.c) (I did, and I rolled +back some of the changes from the other day, but it made no difference.) +Putting back the ckcftp.c from a few weeks ago makes no difference. +Putting back the ckcnet.c from a few weeks ago makes no difference. + +Added patches from Seth Theriault so macosx10.5+krb5+openssl would build +on Mac OS X 10.3.9. makefile, ckcftp.c, 7 Oct 2009. + +Built today's code on Linux RHEL4, NetBSD 5.0.1, Solaris 9, and Mac OS X +10.4.11, both with and without SSL. The NetBSD system has OpenSSL 0.9.9-dev. +7 Oct 2009. + +In Mac OS X 10.6, the following symbols are unresolved at link time: +_des_key_sched, _des_new_random_key, _des_ecb_encrypt, +_des_init_random_number_generator, _des_fixup_key_parity. This is +with OpenSSL 0.9.8k. But it doesn't happen on other platforms that +have 0.9.8k. + +Added SET SESSION-LOG NULL-TERMINATED-TEXT. This is for the benefit of a +speech synthesizer that will speak a line of text only after receiving a +NUL character. A more general solution would be to define a filter or +whatever, but who has time. ckuus[23x].c, 7 Oct 2009. + +Consolidated Mac OS X targets, and removed experimental 64-bit ones, because +they never could work in 10.5 and earlier because 64-bit libs are missing, +and 10.6 and later are 64-bit automatically. makefile, 8 Oct 2009. + +Built on Mac OS X 10.6.1. It came out automatically as a 64-bit build +because __LP64__ is defined somewhere that I can't find. But this explains +why the 0.9.8k on 10.6 comes up with missing symbols when the 0.9.8k lib +10.5 (or on Solaris or on Linux) does not: it's a different library: "Mach-O +64-bit dynamically linked shared library x86_64", rather than "Mach-O +dynamically linked shared library ppc". Probably the 64-bit version has +some things #ifdef'd out. Added -m32 to the CFLAGS and LNKFLAGS for the +macosx+krb5+openssl targets, and it built OK one time. But then the errors +came back. makefile, 8 Oct 2009. + +Updated C-Kermit installation for Mac OS X in ckuwr.html on the website. +8 Oct 2009. + +Tried some things to get around the problem with OpenSSL in Mac OS X 10.6, +to no avail. Asked Jeff. He said, "MacOS X no longer includes DES anywhere +on the system. Not for SSL, not for Kerberos, not for anything. This will +increasingly become the situation on new operating systems. Windows 7 and +2008 R2 will also ship with no DES." Sure enough, the Mac OS X Server +Upgrading and Migrating document for 10.6 says, "Mac OS X Server v10.6 does +not support single DES encryption. It supports AES 128 and 256 encryption +types. However, during a migration or upgrade from v10.4 to v10.6, servers +that were Kerberized by the v10.5 Open Directory server will not use the AES +128 or 256 encryption types. To use the AES 128 or 256 encryption types you +must re-Kerberize all servers." 12 Oct 2009. + +DES and 3DES encryption can be excluding removing the -DCK_DES flag. I +removed this one and -DLIBDES (and -m32) and this makes a working 64-bit +version. Then I added code to the macosx+krb5+openssl target to use these +flags if the Mac OS X version was 10.5 or less and leave them out for 10.6 +or later. Tested on 10.4.11 and 10.6.1. A better way to do it might have +been "nm -gj libssl.dylib | grep des_", but that gives the same results on +10.4 and 10.6. Also, 10.6 still has /usr/include/ssl/des.h. +makefile, 13 Oct 2009. + +Next issue: + In file included from ckutio.c:15674: + /usr/lib/gcc/i386-redhat-linux/3.4.6/include/varargs.h:4:2: #error "GCC no + longer implements ." + /usr/lib/gcc/i386-redhat-linux/3.4.6/include/varargs.h:5:2: #error "Revise + your code to use ." + +The problem occurs when trying to force a non-ANSIC build with GCC. +Changing the source file to include instead of +doesn't help because evidently requires an ANSI C compiler. +Nothing can be done about this. 13 Oct 2009. + +Next issue: Can't compile ckcftp.c with -DNOCSETS or -DNOSPL; some +#ifdef/#endif doesn't match up. Sigh, this is the hardest kind of thing to +debug. There's 17,622 lines of code in this module and no tool that I know +of.... Wait, I wrote one. But it shows all the #if/#ifdef/#ifndef's and +#endifs matching up just fine. Backing off to ckcftp.c of a few days ago +(before char / unsigned char casts were added), I see that it builds OK, so +I backed off to that one, but put back the special case #ifdef for MACOSX103 +declaring CONST gss_OID_desc, and it builds OK (the other stuff was purely +cosmetic, when will I learn?). ckcftp.c, 13 Oct 2009. + +Protected cvtstring() and related functions with #ifdef NOCSETS..#endif, +and ditto for the character-set conversion code in dorename(). +ckuus6.c, 13 Oct 2009. + +Fixed an #endif /* TNCODE */ that was a line too low in ttptycmd(), +causing -DNONET builds to fail. ckutio.c, 13 Oct 2009. + +There was a reference to doputenv() that wasn't guarded by #ifndef NOPUTENV, +fixed in ckuus7.c, 13 Oct 2009. + +Moved doputenv() and settermtyp() out of an #ifdef NOLOCAL section because +these are useful even when not making connections. ckuus7.c, 13 Oct 2009. + +Moved havelfs declaration outside of #ifdef NOXFER because it was also used +for other things. ckcmai.c, 13 Oct 2009. + +COPY /PRESERVE depended on code from the Kermit protocol module, which +is omitted in -DNOXFER builds. Disabled COPY /PRESERVE in -DNOXFER +builds. ckuus6.c, 14 Oct 2009. + +SHOW PROTOCOL code for external protocols had to be #ifdef'd out for +-DNOPUSH builds. ckuus4.c, 14 Oct 2009. + +There was some confusion between "No XYZMODEM" and "No external protocols"; +cleared up in ckuus3.c, 14 Oct 2009. + +After all that, 86 different combinations of feature selections built OK on +Linux. And the Kerberized version (K5) works OK on Linux for Telnet and FTP. +14 Oct 2009. + +Changed version number to 9.0. All modules, 16 Oct 2009. + +Need to make LOG SESSION log to a tty. Right now "log session +/dev/ttyKeySerial1" says "Write permission denied" even though the device is +crw-rw-rw-. This happens in zchko(), which is called by cmofi(). The +problem is that /dev/ is not writeable. I added a Unix-only clause that +attempts to open the file for write access using open(), in order to get a +file descriptor, which then can be passed to isatty() to check if it's a +tty, and if so, to allow access. And then close it. I tested this on Mac +OS X as follows: + + log session /dev/ttyKeySerial1 + telnet somehost + +The Mac's serial port was connected to the serial port of another computer +where Kermit displayed the incoming characters in CONNECT mode. Glitches: + + 1. The port has to be set up as desired in advance, outside of Kermit. + 2. log session /dev/ttyKeySerial1 will hang if any required modem signals + are not present when the port is opened. + 3. Bypasses lockfile mechanism - so we do this only if -DNOUUCP. + +For (2), I tried setting O_NDELAY / O_NONBLOCK, and this allowed zchko() to +continue, but then it freezes in the subsequent fopen(). So I changed +zopeno() to also check if the device is a serial port, and if so, to open() +it with O_NDELAY / O_NONBLOCK, and then convert the file descriptor into a +file pointer with fdopen(). + +Now for the speaking device that needs lines to be terminated by NUL... + + set session-log binary <-- need to put these in SHOW LOG + set session-log null-padded (and in HELP SET LOG) + set line /dev/ttyKeySerial1 + +This part works. + +This feature is enabled only for -DNOUUCP builds because serial ports aren't +like other Unix files; we would have to create a lockfile, but we can't do +that... actually, ttlock() takes a name as an argument, but ttunlck() does +not, so there would be no way to remove the lock. Anyway, there is only one +API for configuring the port (speed, flow control, etc) and it only works +with the SET LINE device, not any random file. To fix this would require +massive redesign and changes. ckuus[23].c, ckufio.c, 19-20 Oct 2009. + +I made -DNOUUCP the default for Mac OS X, since everybody winds up building +it that way anyhow. To undo this, do "make macosx KFLAGS=-UNOUUCP". +makefile, 21 Oct 2009. + +Changed SET SESSION-LOG TEXT to strip out ANSI escape sequences; +previously there wasn't that much difference between TEXT and BINARY logs. +It's still not perfect; for example it doesn't delete characters that the +user erased. (Made sure this still builds with -DNOESCSEQ.) +ckucns.c, 22 Oct 2009. + +Changed SHOW LOG to show the SET SESSION-LOG settings, as well as +SET DEBUG, which was not shown before. ckuus5.c, 22 Oct 2009. + +If a series of PUTENV commands is given, each new one undoes the previous +one, so only the last definition is seen by the new fork (or by Kermit +itself). Turns out you can't feed automatic variables to putenv(); they +have to be static, so to allow for multiple PUTENV commands Kermit has to +maintain an array of static strings. ckuus7.c, 6 Nov 2009. + +From Seth Theriault, a better way for the makefile to determine the +Mac OS X version number; there's a program for this, sw_ver. makefile, +6 Nov 2009. + +Peter Eichhorn reported that file-transfer failure hints were not coming +out since Dev.27. The only change I made since then was to skip them if +the file-transfer protocol was not Kermit. I was using the wrong variable +in the tests, 'proto' instead of 'protocol'. ckuus5.c, 6 Nov 2009. + +Changed Mac OS X targets to correctly extract the Mac OS major version +from uname -r in order to choose correctly between utmp and utmpx; this +wasn't working in 10.6.1. makefile, 6 Nov 2009. + +Fix from Seth T. for an oversight in the previous edit. Also add +MACOSX103 to "show features" display. makefile, ckuus5.c, 10 Nov 2009. + +Added REJECT as a synonym for DISCARD in SET FILE COLLISION; it's more +intuitive and more accurate. ckuus[27].c, 15 Nov 2009. + +\fsplit() and \fword() always break on 8-bit characters unless you explicitly +put every single 8-bit value into the include set, e.g. (for a TSV file): + + undef include + for \%i 128 255 1 { + if == \%i 9 continue + .include := \m(include)\fchar(\%i) + } + .\%n := \fsplit(\m(line),&a,\9,\m(include)) + +I changed cksplit() to treat all 8-bit bytes 128-255 as non-break characters +by default. It might have made more sense to do this for 160-255 (since +128-159 are traditionally C1 control characters) but thanks to Microsoft +tradition is out the window. To treat one or more 8-bit characters as break +characters, put them in the break set. This might break some scripts, but I +doubt it because this flaw was so awful that if anyone had come up against +they would have let me know. ckclib.c, 16 Nov 2009. + +Changed the netbsd target to set -funsigned-char, since cc on NetBSD is +actually gcc. makefile, 16 Nov 2009. + +Changed macosx targets to get the CPU type from the HOSTTYPE environment +variable. Also added getenv("HOSTTYPE") as a last-resort method to set the +\v(cpu) variable at runtime (maybe it should be the first resort?)... +ckuus4.c, makefile, 16 Nov 2009. + +Made sure the solaris9_64 and solaris10 targets still work. 16 Nov 2009. + +Made sure the current source package builds OK on HP-UX 10.20... Got a lot +of "warning 6062: Optdriver: Exceeding compiler resource limits in xxx; some +optimizations skipped. Use +Onolimit if override desired" but it builds OK. +Tested long file transfer; works OK. 17 Nov 2009. + +Built on FreeBSD 7.2 with and without OpenSSL, all OK. 17 Nov 2009. + +Built on NetBSD 5.0.1 with and without OpenSSL, all OK, but netbsd+krb5 +fails with "can't find -lgssapi_krb5"; worked around this with +"K5LIB=-L/usr/local/kerblib" (where the lib actually is on this host) but +then it failed with "ckcftp.c:13868: error: 'gss_nt_service_name' undeclared". +17 Nov 2009. + +I found a VMS 6.2 system... Takes a loooong time to build there. In +ckuusy.c, DEC C didn't like the prototypes and declarations of dorlgarg() +and dotnarg() as static so I made them not static. But that didn't help, +now it fails at the very end, saying the final #ifdef is an invalid +statement. It looks like an #ifdef mismatch that affects only VMS. I ran +my #ifdef matcher, it turned up nothing. I substituted a copy of ckuusy.c +from 2007, it comes up with the same errors. Then I substituted the copy +from 8.0.211 from 2004, and this one compiled OK and, miraculously, the +whole mess even linked OK and runs OK. The Alpha binary is 2.84MB. Now I +have 4500 lines of code to compare.... I went through the two files line by +line and I can't see a single thing wrong. I gave up and tried building the +TCP/IP version. It builds fine except for ckuusy.c, with the utterly +useless error message: + + #endif /* NOCMDL */ + ...................^ + %CC-E-BADSTMT, Invalid statement. + +Indicating the last line in the file. Just for the heck of it, I put +another line after that one: + + /* This is a test */ + +and got: + + /* This is a test */ + ....................^ + %CC-E-BADSTMT, Invalid statement. + +So it is not objecting to anything in the file. Trying the old LISP trick, +I put an extraneous closing bracket after that. Success! Honestly, I don't +see anything wrong with file. It's DEC C V5.3-006. I suspect a C bug. +I'll leave it like this for now until I get access to some other VMS +versions. Another clue is that when building the network version I get a +horrible warning I never saw before from a module that hasn't been touched +in a very long time (ckvrtl.c). Also, in the network version, I note that +the FTP code is not compiled in. We have to try this again with some +command-line switches, but it'll do for now. ckuusy.c, 18 Nov 2009. + +---C-Kermit 9.0 Alpha.01--- + +From Steven Schweda (SMS), the real solution for the VMS closing brace +problem, it wasn't a DECC bug, it was a me bug. ckuusy.c, 20 Nov 2009. + +Rediscovered the new VMS build options: f for Long Files, i for Internal +FTP. "make mnf" doesn't work on VMS 6.2, it looks like the VMS definition +for CK_OFF_T got lost. Same thing with "make mfi". Come back to this later. + +From Gerry Belanger, a fix to INPUT /COUNT:n. ckuus4.c, 26 Nov 2009. + +Added \fsqueeze(s), returns string s with leading and trailing whitespace +removed, Tabs converted to Spaces, and multiple spaces converted to single +spaces. For now, ASCII only, no options. ckuusr.h, ckuus[24].c, 27 Nov 2009. + +I wrote a Kermit script to read a big file of addresses on Solaris 9, +\fsqueeze()ing each line. After about 14000 lines, there was a malloc +failure in getnct() (the command-file reader). There's nothing wrong with +\fsqueeze(), the failure is on a deeper level, because the same thing +happens if I use \fupper() (which is structurally identical to \fsqueeze()) +in the same script. The problem is not in getnct() either, because every +malloc() is freed (I checked). On the other hand, the same script (with +\fupper() instead of \fsqueeze() completes OK in C-Kermit 8.0.201. If I +remove the function call (\fsqueeze() or \fupper()) from the script, it also +runs OK in 9.0. This seems to point the finger at fnevel(), which contains +countless malloc's and free's. But comparing fneval() between 8.0.211 and +9.0, I don't see any difference that would explain this behavior -- nothing +at all that involves malloc(), makstr(), or free(). Nor any pertinent +change in the caller (zzstring) of fneval(). 27 Nov 3009. + +Another problem is that when this happens, the error is not caught (e.g. by +the IF FAIL statement after the command that contains the function call); +instead, C-Kermit returns immediately to its prompt. 27 Nov 2009. + +It could simply be that some of the buffers we allocate are much bigger now. +But again, I don't see much difference between 8.0.211 and 9.0; we were +already allocating 32K command-related buffers (malloc() takes a size_t, and +size_t is an int almost everywhere). I built the same source on NetBSD and +ran the same script (with \fqueeze()), and it worked fine. Let's worry +about this later, if it comes up. 27 Nov 2009. + +Built OK on Silicon Graphics IRIX 6.5 R10000; regular build OK, SSL and +Kerberos builds failed. 30 Nov 3009. + +Tried to build on Digital Unix 4.0F but it blew up in ckutio.c, apparently +not recognizing any of the terminal struct symbols from termios.h. Tried +again with gcc, same thing. Tried explicitly #including +within #ifdef TRU64, same thing. What could have changed? 30 Nov 2009. + +Built OK on Linux RHEL5.4/Itanium-2, make linux. The secure build +required "FLAGS=-DNO_KRB5_INIT_ETS" and built OK. 30 Nov 2009. + +Built OK on Digital Unix 4.0F using "make osf" instead of "make tru64-40f". +I don't know why the specific target doesn't work, but it's not worth +chasing down. 2 Dec 2009. + +Built OK on MirBSD 10, despite a lot of gratuitous compiler warnings. Built +OK on MirBSD 10, OpenBSD 4.5, and Fedora 10. 3 Dec 2009. + +(Various other successful Unix builds in these weeks...) + +Built on VMS 7.2 and 8.3 with and without TCP/IP, no problems. 11 Jan 2010. + +Built on VMS 8.3 with "make fi" to include the FTP client and long-file +support (mid Jan 2010). + +Built on VMS 8.3 with UXC 5.6 and HP SSL 1.3, which is OpenSSL 0.9.7e. +It compiled and linked OK but when I tried to make an FTP SSL connection +it crashed in SSL$LIBSSL_SHR, which is called from ssl_auth(), after having +had TLS accepted as an authentication type, but before actually +authenticating. In Unix: + + 19. ftp open ftp.somecompany.com /user:pge.com/test_quota /password:xxxxxx +Connected to ftp.somecompany.com. +220-Somecompany FTP v6.0 for WinSock ready... +220 Welcome to the online storage FTP server. Please check the main web +site for system announcements and AUP. (O) +---> AUTH TLS +234 AUTH command OK. Initializing SSL connection. +TLS accepted as authentication type +SSL DEBUG ACTIVE +=>START SSL/TLS connect on COMMAND + +In VMS: + + 19. ftp open ftp.somecompany.com /user:pge.com/test_quota /password:xxxxxx +Connected to ftp.somecompany.com. +220 Somecompany FTP v6.0 for WinSock ready... +---> AUTH TLS +234 AUTH command OK. Initializing SSL connection. +TLS accepted as authentication type +SSL DEBUG ACTIVE +%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual +address=FFFFFFFF8001A120, PC=000000000068B118, PS=0000001B + +Note: The Unix version received the second 220 response, the VMS version did +not. That's odd, it's the same code... 25 Jan 2010. + +Added some essential details to the HELP FSEEK text. ckuus2.c, 25 Jan 2010. + +Discovered that the result returned by \fsearch() is totally unreliable. +This is probably too hard to fix. + +FSEEK did not pay attention to SET CASE, searches were always case sensitive. +Fixed in ckuus7.c, 26 Jan 2010. + +FSEEK failed to find anything if the search pattern was matched in the first +line of the file. Fixed in ckuus7.c, 26 Jan 2010. + +\fword() and \fsplit().... Another change, but not backwards-incompatible. +One may now put the word ALL (just like that, all uppercase) as the include +set (4th argument) to indicate that there will be no break characters other +than those explicitly given in the break set, e.g. \fsplit(\m(xx),&a,:,ALL) +breaks a line only on a colon (:), nothing else. The original rules for +cksplit() were more than a little counterintuitive: the default break set is +all non alphanums, and the default include set is all alphanums, so if you +wanted to parse (say) a CSV file, breaking only on comma, you had to think +of all the characters you wanted to keep. This way you just say ALL. +ckclib.c, 26 Jan 2010. + +Speaking of CSV files... How can you put comma as a function argument when +comma is the function-argument separator? Use one of these forms: + + \fsplit(\m(xx),&a,",",ALL) + \fsplit(\m(xx),&a,{,},ALL) + \fsplit(\m(xx),&a,\44,ALL) + \fsplit(\m(xx),&a,\fchar(44),ALL) + +From John Dunlap, U. of Washington Applied Physics Lab: 'When "stty -a < +/dev/ttyS0 | grep crtscts" shows "crtscts" (not "-crtscts") and when using a +three wire serial interface and when asking kermit to not use flow control +(set flow none) then "ckutio.c1" (see attachments) fails while "ckutio.c" +works. The result of "diff -u ckutio.c1 ckutio.c" is attached as "diffs"'. +ckutio.c, 26 Jan 2010. + +Changed the year from 2009 to 2010 in the modules I worked on today and in +the heralds, etc. ckckmai.c, ckuus5.c, ckutio.c, ckclib.c, ckuus7.c, +26 Jan 2010. + +Built on Linux Fedora Core 3, regular and with OpenSSL 0.9.7a. Built on +Ubuntu 9.4 OK, but SSL and Kerberos builds failed due to not finding libs +and/or header files. I'm sure this could be fixed... 27 Jan 2010. + +Added SSL, KRB4, and KRB5 to the startup herald for versions that were +built with SSL, Kerberos 4, or Kerberos 5. Built OK on Fedora 3 with +linux+krb5+ssl and new banner shows correctly. ckuus5.c, 27 Jan 2010. + +Set NO_KRB5_INIT_ETS by default in ckuath.h since krb5_init_ets() is a no-op +in Kerberos 1.4.x and later and in some installations it can't be found, +which clobbers the build. ckuath.h, 27 Jan 2010. + +Adapted to MINIX 3 1.5, the first version that has virtual memory according +to Andy T, who should know. On earlier versions (e.g. MINIX 3 1.2) any +attempt to build C-Kermit causes the compiler to crash. Now the compiler +doesn't crash but it spews out countless warnings about old-fashioned +function declarations that I don't get anywhere else. The real problems +came in ckutio.c where numerous symbols were undefined at compile time and +the POSIX function tcgetpgrp() was not found at link time, even though there +is a prototype for it in the MINIX header files, and there is no alternative +(since POSIX doesn't let us use ioctl()). Also note that there is some +confusion over the compile-time symbols MINIX, MINIX2, MINIX3, and MINIX315. +You would expect MINIX to mean "any version of MINIX" but in some parts of +ckutio.c it means MINIX 1.0. I sincerely doubt that C-Kermit 9.0 can be +built on any version of Minix before 3.1.5 so I removed the confusion and +made MINIX mean "any Minix". It builds on 3.1.5 OK now, except for the FTP +client. This can probably be fixed but... Modules changed: ckcdeb.h, +ckuver.h, ckcmai.c, ckuus5.c, ckutio.c, 1 Feb 2010. + +Later.. Andy says MINIX does not support job control, so no program is ever +in the background. That settles that! 1 Feb 2010. + +Built OK on Minix, Linux, Mac OS X, Solaris 9, NetBSD 5.0.1... 1 Feb 2010. + +---C-Kermit 9.0 Alpha.02--- + +From Christian Corti at Uni-Stuttgart.de: fixes to allow building on SunOS +4.1, which once was my main development platform but which is long-gone from +here. ckupty.c, ckutio.c, 9 Feb 2010. (He says it is also necessary to +comment out the "struct winsize" and "struct ttysize" in sys/ioctl.h; +otherwise there will be a conflict with sys/ttycom.h (included by termios.h) +which also declares these structs. But you need both includes.') + +From John Dunlap, a fix for Kermit protocol fixed packet-timeout interval +going to a unexpected value (missing else clause in two places). +ckcfn2.c, 9 Feb 2010. + +Added an aixg target to build on AIX with gcc when gcc is not installed as +cc, and also added CC=$(CC) CC2=$(CC) clauses to the aix and aix+ssl +targets. Wow, AIX really loses bigtime when receiving files through its ssh +server. Streaming can't be used, sliding windows recover from errors but +there are tons of them using the default 4K packets; 500 works much better. +Built with IBM cc and gcc, and also tested (successfully) the new aix+ibmssl +target, in which the OpenSSL headers and libs are in a standard place. +makefile, 9 Feb 2010. + +In ckupty.h, make the #include be #ifndef SUNOS41. +From Christian Corti. 10 Feb 2010. + +Built on VMS E8.4. 12 Feb 2010. + +Tried to build on a real VAX-11/785 but the machine seems to be seriously +wedged. 12-15 Feb 2010. + +Added note to CKVKER.COM to the effect the the 'f' option has no effect +on VAX architecture. 15 Feb 2010. + +Moved the #include "ckvrtl.h" in the FTP module to below the include for +utime.h, because building the VMS version with the 'i' option (meaning +"include internal ftp client") results in "struct utimbuf tp" erroring out +because struct utimbuf is not defined yet (at least in some version of VMS +with some version of C). From Rob Brown, ckcftp.c, 20 Feb 2010. + +From Martin Vorlaender: new code in VMS C-Kermit build procedure to detect +OpenSSL version automatically. ckvker.com, 22 Feb 2010. + +Added code to INPUT command to strip ANSI escape sequences. It's activated +by SET SESSION-LOG TEXT. ckuusr.h: added prototype for chkaes(); +ckucon.c, ckucns.c: made inesc[] and oldesc[] global instead of static; +ckuus4.c: doinput() code for skipping escape sequences. 1 Mar 2010. + +Peter Eichhorn complained that if you make an ssh connection with Kermit, +then log out from the ssh host, and then use a "connect" command to +make a new connection to the same host (which you can do with Telnet), +Kermit says (e.g.): + + DNS Lookup... Can't get address for ssh -e none somehostname + Sorry, can't open ssh -e none somehostname: Error 0 + +I added code to detect and handle this case and it seems to work OK, even +though it's kind of a hack. ckuusr.[ch], ckuus7.c, 1 Mar 2010. + +There has never been a clean way to put debugging messages (ECHO commands) +in a script which are executed only if debugging is desired and ignored +otherwise. You'd have to set a random variable and test it, or define a +macro or whatever. To make this more straightforward, I added SET DEBUG +MESSAGE ON/OFF/STDERR, and added a new MESSAGE (syn: MSG) command for printing +debugging messages to stdout if SET DEBUG MESSAGE is ON or to stderr if SET +DEBUG MESSAGE is STDERR. ckcmai.c, ckuus[r23].c, 12 Mar 2010. + +Also for debugging and error messages, I added \v(lastcommmand) so that +the command that failed can be included in an IF FAIL or DEBUG error message. +This works even for commands that have syntax errors. +ckuusr.h, ckuus5.c, ckucmd.c, 12 Mar 2010. + +From SMS for VMS: 'Added/documented P3 options INTSELECT, OLDFIB, OLDIP. +Disabled (commented out) automatic definition of NOSETTIME for VMS before +V7.2 (vms_ver .lts. "VMS_V72").' ckcdeb.h, ckcftp.c, ckcnet.c, ckuus[2567].c, +ckvfio.c, ckvker.com, ckvrtl.[ch], 15 Mar 2010. + +Exposed inesc[] and oldesc[] for VMS, so new INPUT command escape-sequence +stripping can work (really, chkaes() and related global variables should be +moved out of ck[uvd]con.c/ckucns.c and into a common module; do that later). +ckuusr.h, ckvcon.c, 15 Mar 2010. + +Built OK on Solaris9, Mac OS X 10.4.11, RHEL4 (32-bit), RHEL5 (64-bit), +AIX 5.3, SCO OpenServr 6.0.0... 15 Mar 2010. + +Not so good on VMS, turns out I made a typo in one of the VMS updates +(#ifndef OLDIP instead of #ifdef...). ckcnet.c, 16 Mar 2010. + +More from SMS for VMS, 16 Mar 2010: + . Set MAXPATH correctly for VMS, ckcdeb.h. + . NAM -> NAML, QIO replaces system( "SET PROTECTION"), bugfixes in + cvtdir() and nzltor(), ... (See comments): ckvfio.c, new ckvrms.h. + (The RMS code in ckvfio.c was almost totally rewritten) + . Moved "NAMX$*" (and related) macros to ckvrms.h, and renamed to + "NAMX_*" (and similar "$" -> "_"), moved "FIB_*" macros from ckvrtl.c. + +These changes are mainly to accommodate the ODS5 file system, which has +longer and mixed-case filenames, and also to execute certain commands +(e.g. for setting file protection, deleting directories) directly instead +of using a system() command. + +Built OK on VMS 8.3 (with and without network support). 16 Mar 2010. + +Failed to build on VMS 6.2. 16 Mar 2010. + +FreeBSD 8.0 has a hexdump() prototype that conflicts with the +hexdump macro defined in ckcdeb.h. Since the same thing is likely to happen +elsewhere, I changed the Kermit macro to ckhexdump as well all references to +it: ckcdeb.h, ckcftp.c, ckcnet.c, ckctel.c, ckuath.c, ckutio.c, 16 Mar 2010. + +Built OK on Digital Unix Tru-64 4.0E using "make osf", 16 Mar 2010. + +Tried again to build Digital Unix Tru64 4.0E using "make tru64-40e", but +something prevents it from picking up the termios symbols and it blows up in +ckutio.c, whereas this used to work in earlier C-Kermit versions. This is +the only Tru64 system I still have access to, so I can't tell if it's a +local peculiarity or what. Note that POSIX is not defined for this build. +But if I define it, I get into trouble with "struct timeval". Tried again +with "KFLAGS=-DPOSIX -DNOTIMEVAL" but that doesn't help. Tried "make +dec-osf" and that worked OK but oddly enough it makes a Kermit with less +features than "make osf". 16 Mar 2010. + +To go with MESSAGE and SET DEBUG MESSAGE, I added IF DEBUG, which is true +if SET DEBUG MESSAGE is not OFF and false otherwise. ckuusr.h, ckuus6.c, +16 Mar 2010. + +From SMS: Corrections to my merging of SMS's changes, ckcftp.c, ckvrtl.h. +Builds OK on VMS 6.2 now. Also did an SSL build on VMS 8.3 with OpenSSL +m0.9.7e and "OPENSSL_DISABLE_OLD_DES_SUPPORT" was included in P3 +automatically by Martin V's addition to ckvker.com. 17 Mar 2010. + +From SMS: #include earlier for VMS in ckcdeb.h to pick up off_t +before it is referenced. This allows C-Kermit to compile on VMS/Alpha 6.2 +but linking fails on fseeko() and ftello() (and yet, a functional executable +is created, and FSEEK works right). Builds the same way with no problems at +all on VMS 8.3 / Alpha. In this case we get the full 64-bit arithmetic... +Well, 62 bits: + + ATLAS::C-Kermit>( ^ 2 63) + 9223372036854775000.0 + ATLAS::C-Kermit>( ^ 2 62) + 4611686018427387904 + +whereas on VMS 6.2 we get integers only up to (^ 2 30). 17 Mar 2010. + +Changed the VMS build procedure to enable large file support automatically +for non-VAX and VMS 7.3 or greater. No reason not to include this feature. +Changed the sense of the F option to DISABLE large file support in the +unlikely case that C-Kermit is being built on a suitable platform but the +C library is older than VMS73_ACRTL-V0200, in which case fseeko() and +ftello() will come up missing at link time. ckvker.com, 18 Mar 2010. + +Changed VMS build procedure to include the FTP client in any network build +by default. Changed the sense of the I option to exclude the FTP client, +in case anybody would want to do that. ckvker.com, 18 Mar 2010. + +From SMS: updated dependencies in CKVKER.COM, fix the "don't reinclude me" +clause in CKVRTL.H. 19 Mar 2010. + +Built OK on VMS 6.2 and 8.3 with and without networking. Large file support +included automatically in VMS 8.3 FTP client included automatically in both +network builds. 19 Mar 2010. + +Changed hexdump() to ckhexdump() in ck_crp.c, which I missed before. +19 Mar 2010. + +---C-Kermit 9.0 Alpha.03--- + +In HP-UX with the bundled-non ANSI compiler, we get warnings about functions +such as endusershell(), which are declared void in the header files. But in +non-ANSI builds we defind VOID to be int rather than void, so our prototypes +are wrong. I checked that HP-UX 9, 10, and 11 all have void datatype and +changed the definition of VOID to void in those cases. ckcdeb.h, 29 Mar 2010. + +Fixed a typo in a debug() statement in cksplit() that was causing some +warnings. ckclib.c, 29 Mar 2010. + +Ditto in tls_load_certs(). ck_ssl.c, 29 Mar 2010. + +"make hpux1000o+ssl" files with: +/usr/ccs/bin/ld: Unsatisfied symbols: + __umoddi3 (code) + __udivdi3 (code) + __eprintf (code) + +It appears that OpenSSL (0.9.7c in this case) requires -lgcc. +And indeed hpux1000gcc+ssl builds fine. 29 Mar 2010. + +There are various warnings in the SSL code in ckutio.c, ckcftp.c, and +ckcnet.c about pointers not being assignment compatible, but I have learned +from experience not to try to fix these (see notes from 6 Oct 2009). +29 Mar 2010. + +connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)): In FTP, +this doesn't work on RHEL5 / Mac OX X 6.1/2 64-bit. But the connect() in +Telnet works. On Mac OS X 6.2 I tried changing the socket() call to be like +the one in ckcnet.c for Telnet, but it made no difference. On a RHEL5.4 +system on i386, FTP works fine, so it's not the Red Hat version. On Digital +Unix 4.0E 64-bit, same thing: + + 11:23:10.722 ftp_hookup[kermit.columbia.edu]=21 + 11:23:10.722 ftp hookup A[kermit.columbia.edu] + 11:23:10.722 ftp hookup C[kermit.columbia.edu] + 11:23:10.722 ftp hookup socket=4 + 11:23:10.722 ftp hookup HADDRLIST + 11:23:10.723 ftp hookup connect failed=13 + 11:23:10.723 ftp hookup bad + +13 = Permission denied: + + [EACCESS] Search permission is denied for a component of the path prefix; + or write access to the named socket is denied. + +On Gentoo Linux, also on Alpha, the errno is 51: Network is unreachable. +Clearly some data type in the sockets structs is out of whack. + +The third connect() argument is "address length". The address is a +struct sockaddr. About the third argument, RHEL5 "man connect" says: + + The third argument of connect() is in reality an int (and this is what + 4.x BSD and libc4 and libc5 have). Some POSIX confusion resulted in + the present socklen_t, also used by glibc. See also accept(2). + +Building on RHEL5 on x86_64, where size_t is 8 and socklen_t is 4, I get a +warning: + + ckcftp.c: In function 'ftp_hookup': + ckcftp.c:14667: warning: + comparison is always true due to limited range of data + +Referring to: + + if (hisctladdr.sin_addr.s_addr != (unsigned long) -1) + +This seems to be the problem; if I remove the (unsigned long) cast (in two +places), the problem goes away. Actually what I should be comparing it with +is INADDR_NONE, which is defined appropriately in some header file, e.g. as +0xffffffff. Also I define it explicitly as -1 if it is not defined in any +header file (as is the case in Solaris 9). Tested OK on 64-bit RHEL5, +32-bit RHEL5, Digital Unix 4.0E 64-bit, Solaris 9 32-bit, Mac OS X 10.4.11 +32-bit, Mac OS X 10.6.3 64-bit, AIX 5.3, Gentoo Linux 2.6.31 on Alpha +64-bit, NetBSD 5.0.1 32-bit.... ckcftp.c, 29 Mar 2010. + +---C-Kermit 9.0 Alpha.04--- + +Yesterday's VOID redefinition caused problems for HP-UX in ckuusx.c, in the +curses section where VOID is undef'd and not used to avoid a conflict with +curses.h. As a workaround I defined a new macro CKVOID with the same +definition as VOID and used it in the offending section of ckuusx. The real +solution is to replace all references to VOID with CKVOID (since VOID is +increasingly likely to cause conflicts), but a mass search and replace is +not without risks. ckcdeb.h, ckuusx.c, 30 Mar 2010. + +Changed VOID and CKVOID definition to be 'void' for all HP-UX (verified by +PeterE back to HP-UX 6.5, 1989). Still need to check this on HP-UX 5.21; +if that's an exception it can be done in the makefile. ckcdeb.h, 30 Mar 2010. + +The change I made to allow CONNECT to reestablish a previous SSH connection +prevented a new SSH connection to a different host to be made. Fixed in +ckuus7.c, 30 Mar 2010. + +Fixed mistaken extern declarations of krb4_errno and krb5_errno as strings +in nvlook(); they are ints. Built OK on Mac OS X 10.6.3. ckuus4.c, 30 Mar 2010. + +A fix to Trusted HP-UX makefile target from PeterE, to account for the +equivalence of +openssl and +ssl as target suffixes. 30 Mar 2010. + +Added a new function \fcvtcsets(string,cset1,cset1) that converts a string +from one character set to another. The csets are File Character-Set names. +ckuus4.c, 31 Mar 2010. + +Added a new function \fdecodehex(string,prefix) that decodes a string +containing prefixed hex bytes. Default prefix is %%, but any prefix of +one of two chars (such as % or 0x) can be specified. ckuusr.h, ckclib.h, +ckclib.c, ckuusr.c, 31 Mar 2010. + +Richard Nolde reports that Kermit can't find -lpam on Fedora 12 because it's +in /lib rather than /usr/lib. RHEL5 has symlinks, FC12 should too. Added a +note to the makefile. 1 Apr 2010. + +Build on Solaris 11 for the first time. Had to adjust ckuver.h to get the +version herald right. This was on a box that reported its architecture as +i86pc. 1 Apr 2010. + +Added MIME character-set names as invisible synonyms in the file and +terminal character-set tables, fcstab[] and tcstab[]. Note that not all the +character sets known to Kermit are registered in MIME. But at least now +MIME-registered character sets can be referred to by their MIME names, e.g. +ISO-8859-1, ISO646-ES, IBM437, WINDOWS-1252. These are not listed if you +type ? in a field that is parsing them, unless you type a letter first, +e.g. "i?" lists ISO- and IBM set names. Later maybe I'll make parallel +tables, or keyword attribute bit that says whether a name is MIME or not. +The real benefit of this change is that now Kermit can take its +character-set names from external sources like email headers or web logs. +ckuxla.c, 1 Apr 2010. + +Changed the IF command to accept a bare macro name its condition. This will +parse and execute correctly if the macro is defined and if it has a numeric +value, or if it is not defined, in which case it evaluates to 0 (FALSE). If +it is defined but has a non-numeric value, a parse error occurs. ckuus6.c, +2 Apr 2010. + +Added \fstringtype() function. Given a string argument, it tells whether +the string is 7bit, 8bit, utf8, binary, etc. ckuusr.h, ckuus[4x].c, +2 Apr 2010. + +Did a few builds to make sure there were no booboos. Solaris 9, NetBSD +5.01, Linux RHEL4, HP-UX 10.20 (non-ANSI compiler and ANSI optimizing +compiler), Mac OS X 10.4.11, SCO OSR 6.00. 5 Apr 2010. + +---C-Kermit 9.0 Alpha.05--- + +Increased maximum variable name length from 4K to 16K. Verified that +too-long names are caught and recovered from correctly. ckuusr.h, 6 Apr 2010. + +Implemented a new \fsplit() option for parsing CSV files, which turns out to +be a little complicated, because the separator is not just a comma, but a +comma and all its surrounding spaces. Also there are special quoting rules +for fields with embedded commas and fields with embedded quotes. ckclib.c, +7 Apr 2010. + +---C-Kermit 9.0 Alpha.06--- + +VMS changes from SMS. They build OK, Kermit file transfers are still OK, +but FTP text-mode GETs always hang on the 10th 8K network read. Couldn't +get a debug log this time. ckcmai.c, ckvfio.c, ckvrms.h, ckvker.com. +8 Apr 2010. + +Changing VNAML from 4K to 16K broke the build on HP-UX 9. Put it back to +4K. 9 Apr 2010. + +John Dunlap, running days-long stress tests between E-Kermit and C-Kermit, +found a bug in the packet-reading and -decoding code: If a NAK packet +arrives with its length field corrupted to indicate a bigger size, and there +are enough bytes following in the pipeline, ttinl() will return a too-long +packet (if there are not enough bytes waiting to be read, then ttinl() will +properly time out). In the bad case rpack() trusts the packet length, uses +it as the basis for computation of the block-check length, which is then +used to access memory that might not be there, causing (at least on John's +Linux system) a segmentation fault. John added the normal clause to check +the result of the block-check calculation, and I changed ttinl() to always +break on the eol character (normally carriage return), since this can never +appear in a packet, even if we "set control unprefix all". Also added a +check to ttinl() to protect against length fields corrupted into illegal +values. ckcfn2.c, ckutio.c, 13 Apr 2010. + +From Lewis McCarthy: + Based on code inspection, C-Kermit appears to have an SSL-related security + vulnerability analogous to that identified as CVE-2009-3767 (see e.g. + http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3767). + + I'm attaching a patch for this issue relative to the revision of ck_ssl.c + obtained from a copy of http://www.columbia.edu/kermit/ftp/test/tar/x.zip + downloaded on 2010/07/30, which I believe is the latest. + + When this flaw was first widely publicized at last year's Black Hat + conference, it was claimed that some public certificate authorities had + indeed issued certificates that could be used to exploit this class of + vulnerability. As far as I know they have not revealed specifically which + public CA(s) had been found issuing such certificates. + Some references: http://www.mseclab.com/?p=180 + http://www.theregister.co.uk/2009/07/30/universal_ssl_certificate/ + +Patches added to ck_ssl.c, 4 Aug 2010. + +Peter Eichhorn reported that "RENAME ../x ." didn't work. This is a side +effect of the changes of 2006 to the RENAME command, there was a little +confusion in the renameone() routine; fixed in ckuus6.c, 4 Aug 2010. + +If only one file is FOPEN'd, FCLOSE given with no arguments would close it. +Turns out to be a bad idea. Example: program with an input and output file, +try to close the output file before it is opened by just typing FCLOSE; this +can mess up the input file. For safety FCLOSE has to require a channel +number or ALL. ckuus7.c, 4 Aug 2010. + +Added \fstrcmp(s1,s2,case,start,length), which has the advantage over IF +EQU,LGT,LLT that case sensitivity can be specified as a function arg, and +also substrings can be specified. ckuusr.h, ckuus[24].c, 5 Aug 2010. + +The CSV feature of Alpha.06 had a subtle flaw, namely that if the last item +in a comma separated list was enclosed within doublequotes with a trailing +space after the closing doublequote, a spurious empty final element would be +created in the result array. Fixed in cksplit(), ckclib.c, 5 Aug 2010. + +---Alpha.07--- + +The CSV feature of \fsplit() splits a comma-separated list into an array. +To turn the array back into a comma separated list, \fjoin(&a,\44,1) almost +works, except for elements contain literal doublequotes, such as: + + Mohammad "The Greatest" Ali + +This calls for making a symbolic CSV argument for \fjoin() like the one that +was made for \fsplit(): \fjoin(&a,CSV). Also \fjoin(&a,TSV) for +Tab-separated list. Thus if Kermit reads a record in CSV format, splits it +into an array, and then joins the array back into a CSV record, the result +will be equivalent to the original, according to the CSV definition. It +might not be identical, because if the result had extraneous spaces before +or after the separating commas, these are discarded, but that does not +affect the elements themselves. Furthermore it is now possible to convert +a comma-separated list into a tab-separated list, and vice versa (which is +not a simple matter of changing commas to tabs or vice versa). ckuus4.c, +12 Aug 2010. + +From Joop Boonen 26 Juli 2010: "Added HAVE_LOCKDEV as openSuSE >= 11.3 uses +lockdev but not baudboy. They use ttylock directly. The program code has +been added so the the program works without a problem." makefile, ckcdeb.h, +ckutio.c, ckuus5.c, 23 Aug 2010. + +---Alpha.08--- + +From Gary Mills at the U of Manitoba: convert Solaris version from BSD ptys +to streams ptys because there are only 48 BSD-style ptys and he was running +out. No code changes needed, the only change necessary was to add the +following flags to the makefile target: + + -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME + -DPUSH_PTEM -DPUSH_LDTERM -DPUSH_TTCOMPAT + +makefile, ckcmai.c, 21 Sep 2010. + +Testing this in Solaris 9 I see that the DES library disappeared. Added +code to the solaris9 targets (also used by Solaris 10 and 11) to check for +this. makefile, 21 Sep 2010. + +The Solaris target checked the OpenSSL version automatically to set the +right flag, the Linux target didn't. Put the OpenSSL-version testing code +in the Linux target too. makefile, 21 Sep 2010. + +A couple minor changes to the tru64-51b makefile targets from Steven Schweda +but there still are some problems with the Tru64 Unix builds. +makefile, 21 Sep 2010. + +---Alpha.09--- + +\fcontents(\&a[3]) got an error if the array was declared but its dimension +was less than 3, which is bad when dealing with (say) an array created +dynamically by \fsplit(), which might or might not have a third element. +In case it doesn't -- i.e. in case we are referring to an out of range +element of any array that is declared -- we should just return a null +string, as we do with other types of variables that are not defined. +For that matter, ditto even if the array is not declared; what useful +purpose is served by throwing an error in this case? +ckuus4.c, 30 Dec 2010. + +cksplit() treats \ as a quoting character. If the source string contains +backslashes, they are swallowed (or, if doubled, one is kept). That's not +good for parsing external data, such as lines read from files, where there +are no quoting rules. This came up when parsing CSV files; as a workaround, +I made \fsplit() treat backslash as an ordinary character for CSV and TSV +splitting (a better solution might be yet another argument that specifies +a quote character). ckclib.c, 30 Dec 2010. + +Began converting C-Kermit to Open Source with the Simplified 3-Clause BSD +license. Updated the text for the INTRO, LICENSE, NEWS, and SUPPORT +commands. Fixed things so the copyright year to be displayed is defined in +one place (ck_cryear in ckcmai.c), rather than hardwired into text strings +all over the place. COPYING.TXT, ckcmai.c, ckuus[256].c, 2 Jun 2011. + +When I added MIME synonyms for Kermit character-set names, I left a bogus +entry in the tables ("windows-1251") that was in the wrong place +alphabetically, thus preventing most references to file character-set names +from working right. Removed the bogus entry. ckuxla.c, 2 Jun 2011. + +Most combinations work OK, but not translating Cyrillic text from UTF-8 +to Latin/Cyrillic, and probably the same would be true for any case of +converting from UTF-8 or UCS-2 to anything else. The problem was in +xgnbyte(), which converts the input stream from the specified character to +UCS2; it needed to make a special case for when the input file was already +Unicode. Believe it or not, this problem occurred at least as far back as +8.0.201 (9.5 years ago) and nobody noticed. So if the fix isn't perfect +probably nobody will notice that either. ckcfns.c, 3 Jun 2011. + +The SET BLOCK CHECK command did not parse all the items in its keyword +list. Fixed in ckuus3.c, 3 Jun 2011. + +For EM-APEX ocean floats project, where buoys in stormy waters have to +transmit data through an earth satellite using non-error-correcting modems, +John Dunlap ran exhaustive stress tests of Kermit protocol transfers through +a simulated connection that injected errors and delays and identified a +weakness in Kermit protocol when it is used under extremely bad conditions: +If a data byte of the S packet (or its Ack) is corrupted and the 1-byte +checksum is also corrupted in such a way that that the checksum matches the +corrupted data, the two Kermit programs will disagree as to the negotiated +parameters. For example, if file Sender's RPT field is changed from '~' to +'^', the receiver will decode the packet incorrectly. Ditto for most of the +other parameters. The result is that a corrupted file is received but +reported correct. John suggested a new mode of operation in which the Type +3 block check is used for all packets. Such a mode can not be negotiated +because the negotiation packet itself is assumed by all Kermit programs to +have a 1-byte checksum. Added SET BLOCK-CHECK 5 to the parser (with +invisible synonym FORCE-3". ckuus3.c, 3 Jun 2011. + +Added supporting code for SET BLOCK 5: ckcfn[23].c, ckcpro.w, ckcmai.c, +ckuus3.c, 3 Jun 2011. + +Added code to skip the heuristic that S and I packets always have block +check type 1. File transfer OK between two C-Kermits with SET BLOCK 5. +rpack(): ckcfn2.c, 5 Jun 2011. + +Made the file receiver put "5" in the block-check-type in its ACK to the +S-Packet. spar(): ckcfns.c, 5 Jun 2011. + +Now the question is: Can we make the file receiver automatically and safely +recognize a three-byte block check on an incoming S or I packet? It's +tricky because the block check field is not self-identified, it's just the +last "n" characters of string indicated by the length field, so correct +decoding of the packet depends on stateful knowledge of "n". How about this: +rpack() already knows what type of packet it is, so if it's an S or I packet +and the 8th byte of the data field is "5" and last 3 bytes, when interpreted +as the CRC, match the packet contents, then we accept the packet and switch +to BLOCK 5 mode. + +On the other hand, if the "5" was put there by corruption, the CRC should +catch the error. In that case we NAK the packet and presumably get a +different version back. There would be no reason to try to re-read the same +packet with a different block check, because the "5" could not possibly be +there legitimately unless it had a 3-byte CRC. To be clear, this is +cheating. We read the packet contents before we know the packet is correct, +then we check that it *is* correct. I made the 4-line change to rpack() +and it works OK in the absence of transmission errors. ckcfn2.c, 3 Jun 2011. + +So the various combinations should work as desired: + + . Sender and receiver both support and are told to SET BLOCK 5 ("SB5"). + . Sender SB5, but receiver doesn't support it (errors out). + . Sender SB5, receiver supports it but wasn't told (auto-recognizes it). + . Receiver SB5 but sender no (errors out). + +Note in the last case, the receiver should NOT automatically fall back to +standard behavior because if the user said SET BLOCK 5 that means every +packet MUST be protected by CRC to prevent the I/S packets from being +corrupted. + +Installed new HELP SET BLOCK-CHECK text. ckuus2.c, 5 Jun 2011. + +Autodownload didn't work when the S or I packet had a 3-byte block check +because kstart() checked it for a 1-byte checksum. Fixed in kstart(), +ckcfn2.c, 6 Jun 2011. However, older Kermit versions and programs that +claim to do "autodownload" will never recognize this type of packet. No +big deal since even if they did, the transfer would fail anyway. + +Added 'FORCE 3' to E-Kermit, called it EK 1.7. The option is "-b 5". Works +OK for sending and receiving, both with and without the new option. Also +works with "-b 5" if you send an S packet to it with '5' in the BCT field. +Changes were minimal, I have them all in ek17.diff. + +I could probably also make a new G-Kermit in about 10 minutes, but who cares +about G-Kermit... We already have two useful Kermit programs that +interoperate with the new protocol. 6 Jun 2011. + +Replaced the very inadequate help texts for functions \fword() and +\fsplit() with new ones. ckuus2.c, 6 Jun 2011. + +There were a couple reports of file corruption that I was saving for later. +Now that now is later I dug up the messages, files, and logs and it turns +out that nobody had reported a reproducible case of Kermit corrupting a +file. There have been non-reproducible cases though, almost certainly due +to corruption of the S or I packet or its ACK, which is why we now have SET +BLOCK 5. Even with BLOCK CHECK 5, there is no guarantee that the same thing +won't happen, it is just far less likely. Even if we added a 32-bit CRC or +even 64-bit one, there would still be a small chance it could happen. + +7 Jun 2011: + +Corrected various #ifdefs (or lack of them) when building C-Kermit with +different combinations of feature-selection options such as NOCSETS, NOICP, +NOLOCAL, NOSPL, NOUNICODE, etc. ckcfns.c ckcmai.c ckcxla.h ckuus2.c +ckuus4.c ckuus5.c ckuus6.c ckuusr.c, 7 Jun 2011. After running the script +that does all these builds (84 of them) I ran it again to make sure that +none of the changes broke builds that succeeded before the changes were made. + +Built OK on Solaris9 ("make solaris9") +Ditto with Krb5 and OpenSSL 0.9.8q ("make solaris9g+openssl+shadow+pam+zlib") + +Built OK on Mac OS X 10.4.11 ("make macosx"). +Also "make macosx+krb5+openssl. + +Built OK on Linux RHEL4 ("make linux"). +Built OK on Linux RHEL4 with OpenSSL 0.9.7a ("make linux+ssl"). +Built OK on Linux RHEL5 ("make linux"). + +"make linux+ssl" fails on RHEL5 because of DES, even though the target +tests for the presence or absence of the DES libraries. In this case the +libraries are there but they lack the functions des_ecb3_encrypt, +des_random_seed, and des_set_odd_parity. The build succeeds as: + + make linux+ssl KFLAGS=-UCK_SSL + +Since DES is now considered harmful, Jeff Altman suggests that all OpenSSL +builds, even for old versions, should omit it ("If you are building with +openssl and no kerberos or srp, just disable DES. Disabling DES will impact +telnet and rlogin but it won't matter if you have no ability to negotiate a +session key"). + +From Ian Beckwith, patches for Debian Linux: + . Change all '-' to '\(hy' in man page (new pedantry): ckuker.nr. + . Make IKSD authentication (using PAM) ask for a password when an invalid + username has been given, to avoid disclosing which account names are valid: + ckufio.c, ckuus7.c. + . Fix spelling errors: ckcftp.c, ckuus2.c, ckuker.nr, ckcpro.w, ckuusr.h. + . Patch makefile to support install to a staging area with DESTDIR. + . Some other patches (mainly for typos) were for plain-text documentation + files that were generated from Web pages; I updated the web pages. + +A big corporate C-Kermit user has an application where a local C-Kermit +makes a connection to a remote one, uploads some files, and then if the +server has any new patch files for the local, it sends the patches and +does a REMOTE HOST command to run the patch program. This stopped working +in C-Kermit 6.0 or 7.0 when I put a check to prevent it, because "it makes +no sense to send REMOTE commands to the local end, because the results are +sent back to the remote to be displayed on its screen but it has no screen". +That may be true, but if the user needs to control the local from the +remote, they should be able to. I removed the checks. This doesn't solve +the problem of where the output goes; ideally it would go to the local +screen but I don't see any elegant and simple way to make that change. +However the output redirectors can still be used with the REMOTE command +so the results can be captured to a remote file, which could then be sent. +ckuus7.c, 7 Jun 2011. + +Changed SET VARIABLE-EVALUATION to SET COMMAND VARIABLE-EVALUATION, but left +the former version available. ckuusr.c, 9 Jun 2011. + +Documented the SET COMMAND VARIABLE-EVALUATION command, which I added in +2008. ck90.html, 9 Jun 2011. + +Renamed all old Mac OS X makefile targets to have the prefix "old" to avoid +confusing them with the current targets, and made macosx10 a synonym for +macosx, so those who used previous makefiles will get a current target +without having to know the new name. makefile, 9 Jun 2011. + +Added XMESSAGE, which is to MESSAGE as XECHO is ECHO: prints the text +without a line terminator, so it can be continued by subsequent [X]MESSAGE +commands. ckuusr.[ch], 9 Jun 2011. + +Back to "make linux+ssl" on RHEL5... I took the coward's way out and added +code to the makefile target to check whether the build worked (somebody let +me know if there is a better way to check), and if not to give a message +suggesting they "make clean ; make linux+ssl KFLAGS=-UCK_DES". makefile, +9 Jun 2011. + +Noticed that \frecurse() would dump core if called with no arguments. +Fixed in ckuus4.c, 9 Jun 2011. + +Added \q() as an alternative to the more verbose \fliteral() for quoting +strings that contain characters (like \) that would otherwise be significant +to Kermit. It's more efficient because it isn't a function call, and 'q' +is an intuitive letter to mean 'quote'. It also works better than +\fliteral() because functions treat commas and braces specially. ckuus4.c, +10 Jun 2011. + +Built OK on VMS 8.3 on Alpha, no net. DEC C caught a couple glitches in the +new code that gcc didn't catch, which I fixed. ckuus[25].c, 10 Jun 2011. + +Built OK on VMS 8.3 on Alpha with Multinet 5.3. The SSL build failed but +I'm not going to worry about it. 10 Jun 2011. + +Built OK on NetBSD 5.1. 10 Jun 2011. + +Tried to resurrect my old "build-all" machine, an IBM Netfinity 3500 from +1997 with 20-some mountable bootable hard disks with lots of 1990s OS's on +them. No dice. I can see the BIOS but not the hard disks. The +configuration is still correct because it tries to boot from the mountable +hard disk, but it fails (I tried six different ones). + +Tried to resurrect my old Siemens Nixdorf RM 200 MIPS machine. Booted OK, +headless even, but makes a hellish high-pitched whine, like a dentist drill. +It's pretty slow too. "make sinix542" (for SINIX 5.4.2) bombed at link +time on no rdchk(). Fixed by #including . ckutio.c, 10 Jun 2011. + +Tried to resurrect my old SCO Xenix 2.3.4 machine, also headless. Amazingly +it still works; it can't use a monitor but I can Telnet to it. Had to tweak +some #ifdefs but I got a no-net version built successfully. According to my +notes, it hasn't been possible to build with TCP/IP since C-Kermit 8.0, +but how many people ever had SCO Xenix 2.3.4 with TCP/IP anyway? Anyway we +still have the binaries for C-Kermit 7.0. ckuus4.c, 10 Jun 2011. + +Built OK on AIX 5.3. Built OK on Solaris 10. 11 Jun 2011. + +Tried harder to revive the build-all machine, now it sort of works, but not +all of the bootable OS's work. Built C-Kermit 9.0 OK on OpenBSD 3.0. Built +OK on QNX 4.25 but had to #ifdef references to IXANY in ckutio.c and ckupty. +Built OK on NetBSD 1.5.1 (2000). Tried "make netbsd+ssl" on this one, it's +OpenSSL 0.9.5a 1 Apr 2000, but it bombs out in ckuath.c, no big deal. +Another problem in NetBSD 1.5.2 is that even though off_t is 8, CK_OFF_T +is 4. Worth noting but not worth fixing unless someone else notices. +13 Jun 2011. + +SuSE 7.0... boots OK but telnet server doesn't work. Can telnet out but +it's too flaky, connection drops if I try to transfer a file. + +OpenBSD 2.5 [1999] OK. Red Hat 7.1 OK. Red Hat 7.1 with OpenSSL 0.9.6 +not OK, same error as with 0.9.5a: + +ckuath.c +In file included from ck_ssl.h:48, + from ckuath.c:225: +/usr/include/openssl/des.h:77: warning: redefinition of `Block' +ckuat2.h:86: warning: `Block' previously declared here +/usr/include/openssl/des.h:83: redefinition of `struct des_ks_struct' +/usr/include/openssl/des.h:91: warning: redefinition of `Schedule' +ckuat2.h:90: warning: `Schedule' previously declared here + +So it appears that OpenSSL support is broken for pre-0.9.7. Tried +building it again with -UCK_SSL (since the errors are originating from +from des.h)... But it still failed exactly the same way. I found +#includes for des.h in ckuath.c and and ck_ssl.h and #ifdef'd them out, +but it still fails: + +In file included from /usr/include/openssl/evp.h:89, + from /usr/include/openssl/x509.h:67, + from /usr/include/openssl/ssl.h:69, + from ck_ssl.h:51, + from ckuath.c:227: +/usr/include/openssl/des.h:77: warning: redefinition of `Block' +ckuat2.h:86: warning: `Block' previously declared here +/usr/include/openssl/des.h:83: redefinition of `struct des_ks_struct' +/usr/include/openssl/des.h:91: warning: redefinition of `Schedule' +ckuat2.h:90: warning: `Schedule' previously declared here + +Built OK on Debian 2.1. 13 Jun 2011. + +On FreeBSD 4.4, it blows up with: +ckufio.c: In function vpass': +ckufio.c:8201: conflicting types for 'initgroups' +/usr/include/unistd.h:154: previous declaration of 'initgroups' +ckufio.c:8201: warning: extern declaration of 'initgroups' doesn't match global +one. Fixed by defining NODCLINITGROUPS for FreeBSD in ckufio.c. It might not +be the right fix, but I don't have a lot of other FreeBSD versions to +compare with. Anyway now it builds OK on 4.4, and also on FreeBSD 3.3. +ckufio.c, 13 Jun 2011. + +Tried to build on SCO Open Server 5.0.7 but it fails at link time because +it can't find rdchk(). But it's supposed to be there! Come back to this +later... + +Red Hat 6.1 i386 32/64 linux 2332545 +Red Hat 7.1 i386 32/64 linux 2368528 +Red Hat EL4 i386 32/74 linux 2363067 +Red Hat EL5.6 i386 64 linux 2371279 +Solaris9 sparc 32/64 solaris9 2849896 +Solaris9+ssl sparc 32/64 solaris9 5021764 +Solaris10 sparc 32/64 solaris10 2855776 +QNX i386 32 qnx32 2012323 +NetBSD 1.5.1 i386 32/64 netbsd 2198055 +NetBSD 5.1 i386 32/64 netbsd 2159863 +OpenBSD 2.5 i386 32/64 openbsd 2236036 +Mac OS X 10.6.7 x86_64 64 macosx 2.7M +Mac OS X 10.4.11 ppc 32/64 macosx 2496304 +Debian 2.1 i386 32/64 linux 2213221 +FreeBSD 4.4 i386 32/64 freebsd 2291333 +FreeBSD 3.3 i386 32/64 freebsd 2147370 +SINIX 5.42 mips 32 sinix542 3319325 (1995) +SCO Unixware 2.1.3 i386 32 uw213 2242176 +SCO OSR6.0.0 i386 32/64 sco_osr600 2368300 + +More builds, 14 June 2011: + +VMS 6.2 alpha 32 make mn 2556928 No TCP/IP +VMS 6.2 alpha 32 make m 3112960 UCX 4.0 +Solaris 11 i386 32/64 solaris11 2823860 +Solaris 11 i386 32/64 solaris11+ssl 2993660 OpenSSL 0.9.8l +NetBSD 5.1 i386 32/64 netbsd+krb5 2307855 Kerberos 5 +Linux Slackware 12.1.0 i386 32/65 linux 2175754 +Linux Fedora 14 i386 32/64 linux 2256514 +Linux Fedora 14 i386 32/64 linux+ssl ....... OpenSSL 1.0.0d +Linux Fedora 14 i386 32/64 linux+krb 2449614 (*) + +(*) make linux+krb5 "LIBS=$LIBS /lib/libk5crypto.so.3 /lib/libcom_err.so.2" + +Noticed that netbsd+ssl build on NetBSD 5.1 said "NetBSD 1.5" in its banner. +Fixed by replacing the old hardwired target with the new "subroutinized" +target a'la linux+ssl and adapting it to NetBSD. makefile, 15 Jun 2011. + +Same deal for Kerberos 5, make a new netbsd+krb5 target and it builds ok, +at least once one figures out where the Kerberos headers and libs are. +makefile, 15 Jun 2011. + +Same deal for the netbsdnc target, now it simply defined NOCURSES and +chains to the main netbsd target. makefile, 15 Jun 2011. + +Tried to build with Kerberos 5 on Solaris, fails because the DES library +no longer exists. This one is beyond me, sorry. + +Made new targets for MirBSD, mirbsd and mirbsd+ssl, makefile 15 Jun 2011. + +In OpenSUSE 11.2 with OpenSSL 0.9.8r we bomb on undefined references from +various DES library routines. Builds OK without DES. + +Various linux+krb5 builds fail because can't find -lgssapi_krb5 + +SSL builds with OpenSSL < 0.9.7 fail even though there is code to support +the older SSL. + +Fixed some printf %ld vs int instances in the sizeofs section of SHOW FEATURES. +ckuus5.c, 15 Jun 2011. + +Fixed the new linux+ssl target to actually use the SSLINC and SSLLIBS +definitions, oops. makefile, 15 Jun 2011. + +15 June 2011 builds (Beta.01): + +AIX 5.3 ppc 32/64 aix+ssl 3283846 OpenSSL 0.9.8m +NetBSD 5.1 i386 32/64 netbsd 2159863 +NetBSD 5.1 i386 32/64 netbsd+ssl 2350274 OpenSSL 0.9.9-dev +NetBSD 5.1 i386 32/64 netbsd+krb5 2349627 MIT Krb5 1.6.3 +FreeBSD 8.2 i386 32/64 freebsd 2298414 +FreeBSD 8.2 i386 32/64 freebsd+ssl 2448961 OpenSSL 0.9.8q +OpenBSD 4.7 i386 32/64 openbsd 2266132 +OpenBSD 4.7 i386 32/64 openbsd+ssl 2409263 OpenSSL 0.9.8k +MirBSD 10 i386 32/64 mirbsd 2216601 +MirBSD 10 i386 32/64 mirbsd+ssl 2358318 OpenSSL 0.9.8r +OpenSuse 11.2 x86_64 64 linux 2348468 +OpenSuse 11.2 x86_64 64 linux+ssl (*) 2546540 OpenSSL 0.9.8r +RHEL 5.6 ia64 64 linux 4390687 +RHEL 5.6 ia64 64 linux+ssl (*) 4775007 OpenSSL 0.9.8e +Ubuntu 9.10 i386 32/64 linux 2275523 +Ubuntu 9.10 i386 32/64 linux+ssl 2466708 OpenSSL 0.9.8r +Gentoo 1.12.13 ppc 32/64 linux 2386597 +Gentoo 1.12.13 ppc64 64 linux 2749015 +Gentoo 1.12.13 ppc64 64 linux+ssl 3002150 OpenSSL 0.9.8r +Gentoo 1.12.13 sparc 32/64 linux 2478382 +Gentoo 1.12.13 sparc 32/64 linux+ssl 2690499 OpenSSL 0.9.8r +Solaris 9 sparc 32/64 solaris9 2849896 +Solaris 10 i386 32/64 solaris10 2837620 +IRIX 6.5 R10000 32/64 irix65 2869704 + +* and KFLAGS=-UCK_DES + +Tried building on NetBSD 5.1 with Heimdal Kerberos using: + +make netbsd+krb5 \ + "KFLAGS=-DHEIMDAL" \ + "K5INC=-I/usr/include" \ + "K5LIB=-L/usr/lib" + +It found all its headers OK, but it blew up in ckuath.c. Small wonder, +ckccfg.html says: + +HEIMDAL + Should be defined if Kerberos V support is provided by HEIMDAL. Support + for this option is not complete in C-Kermit 8.0. Anyone interested in + working on this should contact kermit-support. + +'krb5-config --version' gives the MIT Kerberos 5 version number. + +Make a new netbsd+krb5+ssl target based on the combination of the new +netbsd+ssl and netbsd+krb5 targets. There were lots of warnings in the +compilation but no errors, but it produced an executable that starts and +does normal things but I have no idea if the SSL or Kerberos functions work. +makefile, 16 Jun 2011. + +Changed the cu-solaris9-krb5 target to test for the presence of DES because +DES isn't there, to see if this would allow a Kerberos build to proceed. +And it worked, amazing. At least the build completed, I have no way to test +the Kerberos part. makefile, 16 Jun 2011. + +Updated the solaris9+ssl target to do the DES testing. makefile, 16 Jun 2011. + +Updated cu-solaris+krb5 target to test whether the GSSAPI library is called +libgassapi or libgassapi_krb5. makefile, 16 Jun 2011. + +Added lots of tests to the Linux Kerberos 5 entries, linux+krb5 and +linux+krb5+ssl, because some have libk5crypto and some don't; some have +libcom_err and some don't; and some have libgssapi_krb5 (e.g. RHEL5, +OpenSuse 11.2) whereas others have libgssapi (Gentoo). + +16 June 2011 builds (Beta.01): + +NetBSD 5.1 i386 32/64 netbsd+krb5+ssl 2451757 OpenSSL 0.9.9 MIT Krb5 1.6.3 +Solaris 9 sparc 32/64 solaris9+krb5 2543036 MIT Kerberos 5 1.7.1 +Solaris 9 sparc 32/64 solaris9+ssl 5021544 OpenSSL 0.9.8q (gcc) +Gentoo... ppc 32/64 linux 2386597 +Gentoo... ppc 32/64 linux+ssl 2593561 OpenSSL 0.9.8r +Gentoo... ppc64 64 linux 2749015 +Gentoo... ppc64 64 linux+ssl 3002150 OpenSSL 0.9.8r +RHEL5 x86_64 64 linux+krb5 (*) 2563878 MIT Kerberos 5 1.6.1 +RHEL5 x86_64 64 linux+krb5+ssl(*) 2563878 MIT Kerberos 5 1.6.1 +Fedora 14 i386 32/64 linux+krb5+ssl 2539891 MIT Krb5 + OpenSSL 0.9.8r + +* KFLAGS=-UCK_DES + +--- C-Kermit 9.0.299 Beta.01 --- + +sizeof() can return a long or an int, so neither printf("%d",sizeof(blah)); +or printf("%ld",sizeof(blah)); can be used everywhere. Changed the +"sizeofs" section of SHOW FEATURES in the dumbest (and therefore most +portable) way to squelch the warnings. ckuus5.c, 17 Jun 2011. + +From John Dunlap: "Watching the server screen led me to offer a cosmetic +patch for ckuusx.c. I noticed that the server screen said it was +"RESENDING" when it really wasn't. The attached patch emits blanks to +insure that old labels are completely erased." ckuusx.c, 17 Jun 2011. + +Nelson Beebe found two places where I had SSLLIBS in the makefile instead of +SSLLIB. makefile, 18 Jun 2011. + +More important he knew how to force gcc to load the right header files for +OpenSSL 1.0.0d (by using '-isystem' rather than '-I'). Previously it was +using the 0.9.8r header files but linking with the 1.0.0d libraries. This +is not in the sources or makefile; it's done when giving the 'make' command: + + export PATH=/usr/bin:$PATH + export SSLINC=-isystem/usr/include + export "SSLLIB=-L/usr/lib -Wl,-rpath,/usr/lib" + make linux+ssl + +Folded the previous linux+openssl+zlib+shadow+pam and linux+openssl+shadow +targets into linux+ssl. Checked the linuxso (scripting only) target, builds +OK, 600K. Made new subroutinized linux+krb5+krb4 target but can't find +anyplace to test it. Made new subroutinized linux+shadow+pam target, works +fine on RHEL4. Revised comments and lists again. makefile, 18 Jun 2011. + +For the pluggable-disk OS's that boot OK but lack a working network, I +rigged up a serial connection using a DB9-FF null modem cable, and then a +DB9-MF modem cable to make it reach. I don't see any modem signals on +either end, but the data goes through OK. COM1 on the desktop PC, +/dev/ttyS1 or whatever on Lab. Since there are no modem signals, can't use +RTS/CTS. At 57600bps with Xon/Xoff, 500-byte packets and sliding windows, +transfers work OK at about 5000cps using 5 window slots; takes 8 minutes to +transfer the gzipped C-Kermit tarball. Kermit to the rescue. 19 Jun 2011. + +Transferred the tarball over serial ports to SCO OSR5.0.5 at 38.4Kbps, the +highest speed supported, 12 minutes, no errors, 3300cps. Unpack, make +sco32v505udk, OK. Also built the TCP/IP version and it almost made an +outbound connection, but only once (not a Kermit problem but something with +the TCP/IP stack). 19 Jun 2011. + +Ditto for Solaris 2.6/i386, except 57.6Kbps, 4K-byte packets, no problem. +Solaris 8/i386, ditto. 19 Jun 2011. + +SCO OpenServer 5.0.5 i386 32 sco32v505udk 1940964 No TCP/IP +SCO OpenServer 5.0.5 i386 32 sco32v505udknet 2314668 With TCP/IP +Sun Solaris 2.6 i386 32 solaris26g 4661368 +Sun Solaris 8 i386 32 solaris8g 4675432 + +When using compact substring notation, \s(xx[4]) returns the whole string +xx starting at position 4, but \s(xx[4:]) returns an empty string. Fixed +the latter to be like the former. ckuus5.c, 20 Jun 2010. + +Really it would have been nicer if \s(xx[4]) returned a single character, +the 4th character of xx, but it's too late now. Added another "separator" +character '.' (period) for that: \s(xx[4.]) is the 4th character of xx. +ckuus4.c, 20 Jun 2010. + +Back to SCO OSR5.0.7... This failed before because 'rdchk' came up unknown +at link time, unlike all previous OSR5's, that used rdchk() in place of the +FIONREAD ioctl. Added #ifdefs to make a special case for 5.0.7. I'm not +sure this is the best way, but this is the minimal change to get it to work. +If anybody cares, maybe the same can be done for previous OSR5 releases. +ckutio.c, 20 Jun 2010 (search for SCO_OSR507). + +SCO OpenServer 5.0.7 i386 32 sco32v507 1895724 No TCP/IP +SCO OpenServer 5.0.7 i386 32 sco32v507net 2246792 With TCP/IP + +Checked current code on RHEL4, found that my GSSAPI-lib finding makefile +target didn't look in enough places; added some more. makefile, 21 Jun 2011. + +Got reports back on HPUX from Peter Eichhorn, almost all good on HP-UX 7, 8, +9, 10, and 11. 21-22 Jun 2011. + +Got access to Debian 5.0 and 7-to-be ("Wheezy/Sid"). Regular 'make linux' is +OK in Debian 5, but in 7 can't find crypt, res_search, or dn_expand; had +to add more library search clauses to 'make linux'. makefile, 21 Jun 2011. + +In Debian 7.0, libk5crypto could not be found without adding another clause +to 'make linux+krb5'. That done, the SSL build (1.0.0d) was OK, as well as +the krb5+ssl one. makefile, 21 Jun 2011. + +I found a Linux box that had both Kerberos 4 and 5 installed and tried 'make +linux+krb5+krb4', which failed because of missing DES functions. Tried +'make linux+krb5+krb4 KFLAGS=-UCK_DES', but that fails too, even though it +doesn't fail for Kerberos 5 alone, so probably some Krb4 code is making +unguarded calls to the DES routines. What is really needed is a way to +completely strip all DES references from any given build, code and makefile, +a big deal. 21 Jun 2011. + +Fixed some typos in COPYING.TXT (noticed by Ian Beckwith). 24 Jun 2011. + +Got access to perhaps the last living 4.3BSD VAX system. It doesn't have +SEEK_CUR so I had to #ifdef out the \fpicture() function. Aside from that, +no problems. ckuus4.c, 24 Jun 2011. + +I had been wanting the S-Expression (ROUND x) to allow a second argument n, +which, if given, tells where the rounding should occur. If n is positive, +the number is rounded to n decimal places. If zero, it is rounded to the +nearest integet. If positive, the number is rounded to the nearest power of +10; e.g. -2 means "to the nearest hundred". If ROUND is used as before, +with one argument, it works as before. ckclib.c, ckuus3.c, 25 Jun 2011. + +From Arthur Marsh, a few more directories to test for libresolv in Linux. +makefile, 26 Jun 2011. + +From Martin Vorlaender, a fix for the VMS file-transfer display and +statistics, a place where a file length wasn't being cast to CK_OFF_T +in zchki(). ckvfio.c, 28 Jun 2011. + +Updated version to 9.0.300 and removed the Beta designation. +ckcmai.c, makefile, 28 Jun 2011. + +Removed solaris9_64 target from makefile. It builds but it doesn't work +at all. 30 Jun 2011. + +--- C-Kermit 9.0.300 --- + +On Solaris 10 and 11, DNS lookups don't work. It seems these Solaris +versions have INADDRX and INADDRX_NONE defined, thus triggering the code in +ckcnet.c, ckucns.c, and ckcftp.c #ifdef'd on these symbols, but that code +doesn't work in this case. This happens building with gcc as well as with +Sun cc. Put #ifdefs in ckcnet.h to undefine these symbols (if they are +defined after including all the header files) for Solaris. I didn't bother +trying to differentiate the Solaris versions because the symbols are not +defined in Solaris 9 or earlier, and they should not be used in Solaris 10 +or 11. ckcnet.h, 6 July 2011. + +From SMS: To avoid the %CC-W-PTRMISMATCH1 complaints from ck_ssl.c, add +two (harmless) type casts at lines 2460 and 2773, 6 July 2011. + +Built and tested on Solaris 9, Solaris 10, and RHEL5. 6 July 2011. + +--- C-Kermit 9.0.301 Beta.01 --- + +Updated version text and date. ckcmai.c, makefile, 11 July 2011. + +--- C-Kermit 9.0.301 --- + +After the initial release I made some small changes that affect only HP-UX +5.x: added -DVOID=void and -DCKVOID=void to the hpux0500 makefile targets, +and put #ifdefs around #include , which (in the WinTCP case) didn't +protect itself against multiple inclusion (which is happening in other +header files, not in Kermit). makefile, ckucmd.c, ckucon.c, ckutio.c, +ckufio.c, ckcnet.c, ckcftp.c, 14 July 2011. + +In the new copyright notice, copied from the BSD license template, +one instance of "the " was not replaced by "Columbia +University". Fixed in ckcmai.c, 19 July 2011. + +Added another search term for lk5crypto in the linux+krb5 targets. +makefile, 20 July 2011. + +Added and successfully used a new solaris9+krb5+ssl target. +makefile, 8 Aug 2011. + +FreeBSD 9 switched from utmp to utmpx, which broke compilation of Kermit on +that version. Furthermore, the UUCP lockfile convensions changed in FreeBSD +8, which did not prevent C-Kermit from compiling, but any attempt to lock a +terminal or pty device would fail. Thanks to Alexey Dokuchaev "danfe" for +finding and patching the problems. I undid the patches and fixed the code +so it didn't need to be patched, except for some declarations in the +ck_crp.c module, which I felt had better not be changed without thoroughly +testing the changes on dozens of different platforms, which I don't have +time to do (in any case, it builds OK on FreeBSD 9 without the patch). In +particular I made completely new makefile targets for FreeBSD 4.0 and later, +which automatically detect FreeBSD 8 and FreeBSD 9 to enable the appropriate +feature tests in the code, for a regular build and a build with OpenSSL. +These changes should affect only FreeBSD. ckutio.c, ckufio.c, ck_crp.c, +ckuus5.c, makefile, 20 Aug 2011. + +Changed the version to 9.0.302, ckcmai.c, 20 Aug 2011. + +Fixed freebsd+ssl and netbsd+ssl, netbsd+krb5, and netbsd+krb5+ssl targets +to have CC=$(CC) instead of CC=gcc; ditto for CC2, and adjusted line breaks +in freebsd and freebsd+ssl targets. makefile, 21 Aug 2011. + +--- 9.0.302 --- + +--------------------------------- +*************************** diff --git a/ckcbwr.txt b/ckcbwr.txt index b33b5c1..533c946 100644 --- a/ckcbwr.txt +++ b/ckcbwr.txt @@ -129,9 +129,9 @@ CONTENTS command or program. The built-in command might not behave the way the platform-specific external one did, but many options are available for customization. Of course the underlying - platform-specific command can still be accesssed with "!", "@", or + platform-specific command can still be accessed with "!", "@", or "RUN" wherever the installation does not forbid. In UNIX, the "ls" - command can be accesssed directly as "ls" in C-Kermit. + command can be accessed directly as "ls" in C-Kermit. * SEND ? prints a list of switches rather than a list of filenames. If you want to see a list of filenames, use a (system-dependent) construction such as SEND ./? (for UNIX, Windows, or OS/2), SEND @@ -469,11 +469,11 @@ The SSH Client software. Such drivers are generally NOT available in UNIX or other non-Windows (or non-OS/2, in the case of the Mwave) platforms. - In order to dial a modem, C-Kermit must know its repertoire of commands - and responses. Each modem make and model is likely to have a different - repertoire. Since Kermit has no way of knowhing which kind of modem - will be dialed, normally you have to tell it with a SET MODEM TYPE - command, e.g.: + In order to dial a modem, C-Kermit must know the modem's repertoire of + commands and responses. Each modem make and model is likely to have a + different repertoire. Since Kermit has no way of knowing which kind of + modem will be dialed, normally you have to tell it with a SET MODEM + TYPE command, e.g.: set modem type usrobotics set line /dev/cua0 @@ -486,7 +486,7 @@ The SSH Client configuration includes error correction, data compression, and hardware (RTS/CTS) flow control. As long as C-Kermit is capable of hardware flow control (as it is on many, but not all, the platforms where it runs, - since some operating systems don't support it), the modem can be dailed + since some operating systems don't support it), the modem can be dialed immediately, without lengthy configuration dialogs, and in fact this is what SET MODEM TYPE GENERIC-HIGH-SPEED does. In C-Kermit 8.0, GENERIC-HIGH-SPEED has become the default modem type, so now it is @@ -860,7 +860,7 @@ The SSH Client an escape sequence like " O p"). In both cases, C-Kermit has no way to tell the difference between such multibyte key values, and the corresponding series of single-byte key values. This could only be done - by accesssing the keyboard at a much lower level in a highly + by accessing the keyboard at a much lower level in a highly platform-dependent manner, probably requiring tens of thousands of lines of code to support even a sampling of the most popular workstation / OS combinations. @@ -983,7 +983,7 @@ SEND /COMMAND [ other switches such as /AS-NAME: ] command [ arguments... ] transfer fails because Kermit will not rename a directory. Send the file with another name, or use SET FILE COLLISION RENAME. * If the directory lacks write permission, the file transfer fails - even if you have write accesss to the file that is being backed up; + even if you have write access to the file that is being backed up; in that case, switch to SET FILE COLLISION OVERWRITE or APPEND, or send to a different directory. @@ -1077,7 +1077,7 @@ setmaps -t NOMAP must SET FLOW NONE. The HP48SX does not support flow control, and evidently also becomes confused if you attempt to use it. You might also need to use SET SEND PAUSE 100 (or other number). For greater - detail about transferring files the the HP-48, see: + detail about transferring files the HP-48, see: [85]http://www.columbia.edu/kermit/hp48.html @@ -1355,7 +1355,7 @@ setmaps -t NOMAP interruption characters between every packet. The "What Are You" response is sitting in the keyboard buffer. Eventually Kermit will read a character such as "c" that is a valid interruption - character, and the file transfer stops with "User cancelled". + character, and the file transfer stops with "User canceled". The right way to handle this situation is to have your look for the "What Are You?" sequence and send the response itself, as described in @@ -1398,8 +1398,8 @@ echo \fn2hex(\%x) By the way, you might be tempted to use Kermit's \xnn notation to plug hex numbers into arithmetic expressions but this doesn't work. That - notation is stricly for bytes (hex representation of character values), - not for numbers. + notation is strictly for bytes (hex representation of character + values), not for numbers. 11.11. Other... diff --git a/ckccfg.txt b/ckccfg.txt index f27d56e..0185c3d 100644 --- a/ckccfg.txt +++ b/ckccfg.txt @@ -440,7 +440,7 @@ C-Kermit Configuration Options NOFRILLS 1918966 9.8% No "frills". NOFTP 1972496 7.3% No FTP client. NODIAL 1984488 6.7% No automatic modem dialing. - NOPUSH 2070184 2.7% No shell accesss, running external programs, etc. + NOPUSH 2070184 2.7% No shell access, running external programs, etc. NOIKSD 2074129 2.5% No Internet Kermit Server capability. NOHTTP 2082610 2.1% No HTTP client. NOFLOAT 2091332 1.7% No floating-point arithmetic. @@ -541,7 +541,7 @@ C-Kermit Configuration Options supports higher levels of optimization (e.g. -O2 or higher number, -Onolimit (HP-UX), etc), try them; the greater the level of optimization, the longer the compilation and more likely the - compiler will run out of memory. The the latter eventuality, some + compiler will run out of memory. The latter eventuality, some compilers also provide command-line options to allocate more memory for the optimizer, like "-Olimit number" in Ultrix. b. If your platform supports shared libraries, change the make entry @@ -699,7 +699,7 @@ C-Kermit Configuration Options then to let selected users or services get through after all. One firewall method is called SOCKS, in which a proxy server allows - users inside a firewall to accesss the outside world, based on a + users inside a firewall to access the outside world, based on a permission list generally stored in a file. SOCKS is enabled in one of two ways. First, the standard sockets library is modified to handle the firewall, and then all the client applications are relinked (if @@ -1017,7 +1017,7 @@ C-Kermit Configuration Options immediately, rather than returning to its prompt. NOPUSH and NOCCTRAP together allow Kermit to be run from restricted - shells, preventing accesss to system functions. + shells, preventing access to system functions. [ [140]C-Kermit Home ] [ [141]Kermit Home ] @@ -1358,7 +1358,7 @@ C-Kermit Configuration Options MAXRP=number Maximum receive-packet length. MAXSP=number Maximum send-packet length. MDEBUG Malloc-debugging requested. - MINIDIAL Minimum modem dialer support: CCITT, Hayes, Unkown, and None. + MINIDIAL Minimum modem dialer support: CCITT, Hayes, Unknown, and None. MINIX Build for MINIX. MIPS Build for MIPS workstation. MULTINET Build with support for TGV MultiNet TCP/IP (VAX/VMS). @@ -1368,7 +1368,7 @@ C-Kermit Configuration Options NDIR BSD long filenames supported using and opendir(). NDGPWNAM Don't declare getpwnam(). NDSYSERRLIST Don't declare sys_errlist[]. - NEEDSELECTDEFS select() is avaible but we need to define FD_blah + NEEDSELECTDEFS select() is available but we need to define FD_blah ourselves. NETCMD Build with support for SET HOST /COMMAND and PIPE commands. NEXT Build for NeXT Mach 1.x or 2.x or 3.0, 3.1, or 3.2. @@ -1512,8 +1512,7 @@ C-Kermit Configuration Options SVR3 Build for AT&T System V Release 3. SVR3JC Allow job control support on System V Release 3 UNIX versions. SVR4 Build for AT&T System V Release 4. - SW_ACC_ID UNIX only -- swap real & effective ids around accesss() - calls. + SW_ACC_ID UNIX only -- swap real & effective ids around access() calls. sxaE50 Build for PFU Compact A Series SX/A TISP. SYSLOGLEVEL=n Force syslogging at given level. SYSTIMEH Include . diff --git a/ckcftp.c b/ckcftp.c index 7667940..66c7940 100644 --- a/ckcftp.c +++ b/ckcftp.c @@ -2,7 +2,7 @@ /* C K C F T P -- FTP Client for C-Kermit */ -char *ckftpv = "FTP Client, 9.0.259, 15 Jun 2011"; +char *ckftpv = "FTP Client, 9.0.260, 14 Jul 2011"; /* Authors: @@ -183,7 +183,15 @@ extern int TlsIndex; #include #endif /* def VMS [else] */ #include -#include + +#ifndef HPUXPRE65 +#include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ + #ifndef NOTIMEH #include #endif /* NOTIMEH */ diff --git a/ckcmai.c b/ckcmai.c index 065fb67..a5640e5 100644 --- a/ckcmai.c +++ b/ckcmai.c @@ -1,6 +1,6 @@ -#define EDITDATE "11 Jul 2011" /* Last edit date dd mmm yyyy */ -#define EDITNDATE "20110711" /* Keep them in sync */ -/* Mon Jul 11 09:23:48 2011 */ +#define EDITDATE "20 Aug 2011" /* Last edit date dd mmm yyyy */ +#define EDITNDATE "20110820" /* Keep them in sync */ +/* Sat Aug 20 17:20:17 2011 */ /* ckcmai.c - Main program for C-Kermit plus some miscellaneous functions */ @@ -64,7 +64,7 @@ char *ck_s_date = EDITDATE; /* See top */ char *buildid = EDITNDATE; /* See top */ #ifdef UNIX -static char sccsid[] = "@(#)C-Kermit 9.0.301"; +static char sccsid[] = "@(#)C-Kermit 9.0.302"; #endif /* UNIX */ /* @@ -78,8 +78,8 @@ static char sccsid[] = "@(#)C-Kermit 9.0.301"; for future releases. */ -char *ck_s_ver = "9.0.301"; /* C-Kermit version string */ -long ck_l_ver = 900301L; /* C-Kermit version number */ +char *ck_s_ver = "9.0.302"; /* C-Kermit version string */ +long ck_l_ver = 900302L; /* C-Kermit version number */ #ifdef OS2 char *ck_s_xver = "3.0.0"; /* Product-specific version string */ @@ -168,7 +168,7 @@ char *copyright[] = { " the documentation and/or other materials provided with the", " distribution.", " ", -" + Neither the name of the nor the names of its", +" + Neither the name of Columbia University nor the names of its", " contributors may be used to endorse or promote products derived", " from this software without specific prior written permission.", " ", diff --git a/ckcnet.c b/ckcnet.c index 5384e00..2bb01a6 100644 --- a/ckcnet.c +++ b/ckcnet.c @@ -1,9 +1,9 @@ -char *cknetv = "Network support, 9.0.296, 16 Mar 2010"; +char *cknetv = "Network support, 9.0.297, 14 Jul 2011"; /* C K C N E T -- Network support */ /* - Copyright (C) 1985, 2010, + Copyright (C) 1985, 2011, Trustees of Columbia University in the City of New York. All rights reserved. See the C-Kermit COPYING.TXT file or the copyright text in the ckcmai.c module for disclaimer and permissions. @@ -258,7 +258,13 @@ struct timezone { #endif /* OSF13 */ #ifndef I386IX -#include /* Already included above */ +#ifndef HPUXPRE65 +#include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ #endif /* I386IX */ #include /* Everybody needs this */ diff --git a/ckcplm.txt b/ckcplm.txt index fc7595a..e00edde 100644 --- a/ckcplm.txt +++ b/ckcplm.txt @@ -231,7 +231,7 @@ foo(x,y) int x, y; { be selected by defining a symbol, which, if not defined, leaves the program exactly as it was before the changes. * Although it might be possible to "clean up" the "#ifdef mess", - nobody has accesss to all the hundreds of platforms served by the + nobody has access to all the hundreds of platforms served by the #ifdefs to check the results. And to answer the second-most-oft-repeated question: "Why don't you @@ -961,7 +961,7 @@ foo(x,y) int x, y; { calling and return conventions, and has the same type. The Group E modules contain both functions and global variables that - are accesssed by modules in the other groups. These are now described. + are accessed by modules in the other groups. These are now described. (By the way, I got this list by linking all the C-Kermit modules together except ckutio and ckufio. These are the symbols that ld @@ -1082,7 +1082,7 @@ foo(x,y) int x, y; { char *dftty; Default communication device. Set by Group E module. Used in - many places. This variable should be initialized the the symbol + many places. This variable should be initialized the symbol CTTNAM, which is defined in ckcdeb.h, e.g. as "/dev/tty" for UNIX, "TT:" for VMS, etc. Example: char *dftty = CTTNAM; @@ -1147,7 +1147,7 @@ foo(x,y) int x, y; { #define ZSYSFN 8 /* Input from a system function (pipe) */ #define ZRFILE 9 /* Local file for READ command */ (NEW) #define ZWFILE 10 /* Local file for WRITE command */ (NEW) - #define ZMFILE 11 /* Auxilliary file for internal use */ (NEW) + #define ZMFILE 11 /* Auxiliary file for internal use */ (NEW) #define ZNFILS 12 /* How many defined file numbers */ In the descriptions below, fn refers to a filename, and n refers to one @@ -1244,8 +1244,7 @@ foo(x,y) int x, y; { Check to see if file with name fn is a regular, readable, existing file, suitable for Kermit to send -- not a directory, not a symbolic link, etc. Returns: - -3: if file exists but is not accesssible (e.g. - read-protected); + -3: if file exists but is not accessible (e.g. read-protected); -2: if file exists but is not of a readable type (e.g. a directory); -1: on error (e.g. file does not exist, or fn is garbage); @@ -1261,7 +1260,7 @@ foo(x,y) int x, y; { long zgetfs(fn) char *fn; - Gets the size of the given file, regardless of accesssibility. + Gets the size of the given file, regardless of accessibility. Used for directory listings. Unlike zchki(), should return the size of any kind of file, even a directory. zgetfs() also should serve as a mini "get file info" function that can be used until @@ -1384,9 +1383,9 @@ foo(x,y) int x, y; { int zsetroot(char * dir) - Sets the root for the user's file accesss, like Unix chroot(), + Sets the root for the user's file access, like Unix chroot(), but does not require privilege. In Unix, this must be - implemented entirely by Kermit's own file accesss routines. + implemented entirely by Kermit's own file access routines. Returns: 1: Success -1: Invalid argument @@ -1741,7 +1740,7 @@ foo(x,y) int x, y; { int zxcmd(n,s) char *s; - Runs a system command so its output can be accesssed as if it + Runs a system command so its output can be accessed as if it were file n. The command is run in ordinary, unprivileged user mode. If n is ZSTDIO or ZCTERM, returns -1. @@ -1813,7 +1812,7 @@ foo(x,y) int x, y; { isn't. Makes any appropriate system log entries (IKSD logins, failed login attempts, etc). If password is valid, logs the user in as herself (if real user), or sets up restricted anonymous - accesss if user is guest (e.g. changes file-system root to + access if user is guest (e.g. changes file-system root to anonroot and sets isguest = 1). VOID @@ -1835,14 +1834,14 @@ foo(x,y) int x, y; { installed to prevent such security breaches by turning off the program's special privileges at all times except when they are needed. - In UNIX, the only need Kermit has for privileged status is accesss to + In UNIX, the only need Kermit has for privileged status is access to the UUCP lockfile directory, in order to read, create, and destroy lockfiles, and to open communication devices that are normally protected against the user (see the [133]Unix C-Kermit Installation Instructions for discussion). Therefore, privileges should only be enabled for these operations and disabled at all other times. This relieves the programmer of the responsibility of putting expensive and - unreliable accesss checks around every file accesss and subprocess + unreliable access checks around every file access and subprocess creation. Strictly speaking, these functions are not required in all C-Kermit @@ -1889,7 +1888,7 @@ foo(x,y) int x, y; { Attempts to turns privileges off in such a way that they can be turned on again later. Then checks to make sure that they were really turned off. If they were not really turned off, then they - are cancelled permanently. Returns: + are canceled permanently. Returns: 0 on success nonzero on failure @@ -2061,9 +2060,9 @@ foo(x,y) int x, y; { int ttclos() Closes the communication device (tty or network). If there were - any kind of exclusive accesss locks connected with the tty, - these are released. If the tty has a modem connection, it is - hung up. For true tty devices, the original tty device modes are + any kind of exclusive access locks connected with the tty, these + are released. If the tty has a modem connection, it is hung up. + For true tty devices, the original tty device modes are restored. Returns: -1: on failure. 0: on success. @@ -2267,9 +2266,9 @@ foo(x,y) int x, y; { <=0: no timer, wait forever (e.g. for incoming call). For real tty devices, ttopen() attempts to gain - exclusive accesss to the tty device, for example in + exclusive access to the tty device, for example in UNIX by creating a "lockfile" (in other operating - systems, like VMS, exclusive accesss probably + systems, like VMS, exclusive access probably requires no special action). Side effects: @@ -2283,8 +2282,8 @@ foo(x,y) int x, y; { Returns: 0: on success -5: if device is in use - -4: if accesss to device is denied - -3: if accesss to lock mechanism denied + -4: if access to device is denied + -3: if access to lock mechanism denied -2: upon timeout waiting for device to open -1: on other error @@ -2880,7 +2879,7 @@ I.1. Format of System-Dependent File Permissions in A-Packets For UNIX (System ID = U1), it's the familiar 3-digit octal number, the low-order 9 bits of the filemode: Owner, Group, World, e.g. 660 = - read/write accesss for owner and group, none for world, recorded as a + read/write access for owner and group, none for world, recorded as a 3-digit octal string. High-order UNIX permission bits are not transmitted. diff --git a/ckermit70.txt b/ckermit70.txt index 795db1c..a796cfd 100644 --- a/ckermit70.txt +++ b/ckermit70.txt @@ -12,7 +12,7 @@ For C-Kermit 7.0 As of C-Kermit version: 7.0.196 This file created: 8 February 2000 This file last updated: -Mon Sep 13 08:52:41 2010 +Mon Aug 8 10:39:18 2011 Authors: Frank da Cruz and Christine M. Gianone @@ -650,9 +650,9 @@ II. NEW FEATURES command or program. The built-in command might not behave the way the platform-specific external one did, but many options are available for customization. Of course the underlying - platform-specific command can still be accesssed with "!", "@", or + platform-specific command can still be accessed with "!", "@", or "RUN" wherever the installation does not forbid. In UNIX, the "ls" - command can be accesssed directly as "ls" in C-Kermit. See + command can be accessed directly as "ls" in C-Kermit. See [352]Section 4.5.1 for details. 7. SEND ? prints a list of switches rather than a list of filenames. If you want to see a list of filenames, use a (system-dependent) @@ -2289,11 +2289,11 @@ II. NEW FEATURES As of C-Kermit 7.0, in the UNIX version only, the COPY and RENAME commands are built in and do not call the underlying platform's COPY or RENAME command. This allows them to work in "NOPUSH" versions and other - circumstances where it can't accesss system commands, and it allows - file copying and renaming to be done portably in scripts. The + circumstances where it can't access system commands, and it allows file + copying and renaming to be done portably in scripts. The characteristics of the built-in COPY or RENAME include: * It fails if the source file is a directory or is wild or lacks read - accesss. + access. * It fails if the source file is the destination file. * It allows the destination file to be a directory, in which case the source file is copied (or renamed) into it with the same name. @@ -2332,12 +2332,12 @@ II. NEW FEATURES 1.18. The MANUAL Command - The MANUAL command can be used to accesss the appropriate Kermit manual + The MANUAL command can be used to access the appropriate Kermit manual or other manual. The general syntax is: MANUAL [ string ] If the string is omitted, C-Kermit asks the underlying system to - accesss the C-Kermit manual using whatever method is appropriate + access the C-Kermit manual using whatever method is appropriate for the system. The specific action depends on the system. In UNIX, a "man" command is @@ -2516,13 +2516,13 @@ Compiled Dec 31 1999 10:38:54, options: 1. Only one READ file and one WRITE file can be open at a time. 2. The READ and WRITE commands are strictly line oriented. 3. These commands can not be used with binary files. - 4. They do not support read/write accesss or random accesss. + 4. They do not support read/write access or random access. 5. The syntax is a bit counterintuitive for programmers. The new file i/o system allows multiple files to be open at once, in any desired combination of modes (read/write/append) supported by the operating system, for line, block (record), or character i/o, for - sequential or random accesss, using consistent syntax and conventions. + sequential or random access, using consistent syntax and conventions. The new system, however, does not replace the old one, since the old system still must be used for: @@ -2582,8 +2582,8 @@ Compiled Dec 31 1999 10:38:54, options: The command to open a file is: FILE OPEN [ switches ] variable filename - Opens a file for the type of accesss specified by the switches, - or for read-only accesss if no switches are given. Upon success, + Opens a file for the type of access specified by the switches, + or for read-only access if no switches are given. Upon success, a channel number is assigned to this file and stored in the given variable so you can refer to the open file in subsequent i/o commands. If the file can not be opened, the FILE OPEN @@ -2592,9 +2592,9 @@ Compiled Dec 31 1999 10:38:54, options: The FILE OPEN switches are: /READ - Open the file for read accesss. If no switches are given, /READ + Open the file for read access. If no switches are given, /READ is assumed. If the file does not exist or can't be opened for - read accesss, the FILE OPEN command fails. + read access, the FILE OPEN command fails. /WRITE Allow writing. If a file of the same name already exists, it is @@ -2614,7 +2614,7 @@ Compiled Dec 31 1999 10:38:54, options: switch is meaningless (but still can be used) in UNIX. In VMS, Windows, and OS/2, it inhibits end-of-line processing and conversion, and so should be used for binary files and/or files - that are to be accesssed in record or character mode rather than + that are to be accessed in record or character mode rather than line by line. The variable for the channel number can be any kind of variable: the @@ -3046,10 +3046,10 @@ Compiled Dec 31 1999 10:38:54, options: The loop works because a relative SEEK outside the file fails. - It is also possible to use block i/o to manage random-accesss files - with fixed-length records (as long as they don't contain NUL - characters). Suppose, for example, you have a file of "card image" - records with fixed-field information about customers, such as: + It is also possible to use block i/o to manage random-access files with + fixed-length records (as long as they don't contain NUL characters). + Suppose, for example, you have a file of "card image" records with + fixed-field information about customers, such as: Name: Columns 1-32 (column numbers are 1-based) Address: Columns 33-72 @@ -4106,7 +4106,7 @@ define HSDIAL { ; High Speed DIAL set dial macro xxx dial xyzcorp - This defines a DIAL MACRO called xxx, which puts an accesss code on the + This defines a DIAL MACRO called xxx, which puts an access code on the front of the number. Another example might be: def xxx if equal "\v(modem)" "hayes-1200" return \freplace(\%1,$,{,,,,,}) @@ -4143,11 +4143,11 @@ define HSDIAL { ; High Speed DIAL be busy. To illustrate the final item, suppose you have a choice among many - phone service providers; the provider is chosen by dialing an accesss + phone service providers; the provider is chosen by dialing an access code before the number. Different providers might be better (e.g. cheaper) for certain times of day or days of the week, or for dialing - certain locations; you can use the DIAL macro to add the accesss for - the most desirable provider. + certain locations; you can use the DIAL macro to add the access for the + most desirable provider. Similarly, when the same number might be reached through multiple providers, it's possible that one provider might not be able to @@ -4646,7 +4646,7 @@ define HSDIAL { ; High Speed DIAL disabled. SET TELNET ENVIRONMENT DISPLAY is used to set the DISPLAY variable that - is sent to the host, as well as the the XDISPLAY location. + is sent to the host, as well as the XDISPLAY location. 2.3.5. Connecting to Raw TCP Sockets @@ -4968,7 +4968,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} Although C-Kermit includes its own Telnet implementation, you might need to use an external Telnet program to make certain connections; - perhaps because it has accesss or security features not available in + perhaps because it has access or security features not available in C-Kermit itself. As noted above, the only precautions necessary are usually: @@ -5238,7 +5238,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} set host /server * if fail stop 1 X.25 "set host *" failed - And then accesss it from the client as follows: + And then access it from the client as follows: set network type x.25 if fail stop 1 Sorry - no X.25 support @@ -5459,7 +5459,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} open any dialout device when its open count indicates that another process has it open. SHOW COMM (in QNX only) displays the setting, and if you have a port open, it also shows the current open count (with - C-Kermit's own accesss always counting as 1). + C-Kermit's own access always counting as 1). 2.12. The Connection Log @@ -5552,10 +5552,10 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} On multiuser systems, it is possible to keep a single, shared, system-wide connection log, but this is not recommended since (a) it - requires you keep a publicly write-accesssible logfile (a glaring - target for mischief), and (b) it would require each user to log to that - file and not disable logging. A better method for logging connections, - in UNIX at least, is syslogging (see [429]ckuins.txt Section 15 and + requires you keep a publicly write-accessible logfile (a glaring target + for mischief), and (b) it would require each user to log to that file + and not disable logging. A better method for logging connections, in + UNIX at least, is syslogging (see [429]ckuins.txt Section 15 and [430]Section 4.2 of the [431]IKSD Administration Guide for details). 2.13. Automatic Connection-Specific Flow Control Selection @@ -5792,7 +5792,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} Make an secure private connection with SSL (only if SSL support is included in your version of Kermit). In this case the port name might need to be https rather than http, e.g. "set host - secureserver.xyxcorp.com https /ssl". + secureserver.xyzcorp.com https /ssl". /TLS Make an secure private connection with TLS (only if TLS support @@ -5830,10 +5830,10 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} eight headers may be specified. /USER:name - In case a page requires a username for accesss. + In case a page requires a username for access. /PASSWORD:password - In case a page requires a password for accesss. + In case a page requires a password for access. /ARRAY:arrayname Tells Kermit to store the response headers in the given array, @@ -5943,7 +5943,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} As noted in the manual, C-Kermit's CONNECT command on UNIX is not a terminal emulator, but rather a "semitransparent pipe" between the - terminal or emulator you are using to accesss C-Kermit, and the remote + terminal or emulator you are using to access C-Kermit, and the remote host to which C-Kermit is connected. The "semitransparent" qualifier is because of character-set translation as well as several actions taken by the emulator in response to the characters or strings that pass @@ -5953,7 +5953,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} printing, also called Controller printing (as distinct from Autoprint or line or screen print). It is intended mainly for use on UNIX workstation consoles (as opposed to remote logins), but with some care - can also be used when accesssing C-Kermit remotely. + can also be used when accessing C-Kermit remotely. Transparent printing is related to APC by sharing C-Kermit's built-in ANSI escape-sequence parser to detect "printer on" and "printer off" @@ -6010,7 +6010,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} 2. Only the 7-bit forms of the escape sequences are supported. The 8-bit CSI C1 control is not recognized. 3. Autoprint is not supported, since this requires a full-fledged - terminal emulator with direct accesss to the screen. + terminal emulator with direct access to the screen. 4. The start-print and stop-print sequences pass through to the screen (there is no way to avoid this without causing unacceptable delays or deadlocks in CONNECT mode). Thus if your terminal or emulator @@ -6615,8 +6615,8 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} 4.2.1.3. SECURITY - Some sites might not wish to allow accesss to system commands or - external programs from within Kermit. Such accesss, including all the + Some sites might not wish to allow access to system commands or + external programs from within Kermit. Such access, including all the features described here, can be disabled in various ways: 1. When building from source code, include -DNOPUSH among the CFLAGS. @@ -7480,7 +7480,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} mailed or printed and then deleted. This has the advantages of (a) not requiring a temporary file, and (b) allowing mail to have a proper subject in place of the filename. Temporary files were bad not only - because they required (a) space, and (b) writeability of the current + because they required (a) space, and (b) writability of the current directory, but also because using them could result in wiping out an existing file. See [467]Section 4.7 for more about SEND /MAIL and SEND /PRINT. @@ -7791,10 +7791,10 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} 4.4. File Permissions "Permissions" refers to a code associated with a file that specifies - who is allowed to accesss it, and in what manner. For example, the + who is allowed to access it, and in what manner. For example, the owner, the members of one or more groups, the system administrator, and everybody else, might be allowed various combinations of Read, Write, - Append, Execute, or Listing accesss. + Append, Execute, or Listing access. The permission code goes by different names on different platforms. In UNIX, it might be called the filemode. In VMS, it is called the file @@ -7879,7 +7879,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} 4.4.2.1.1. UNIX UNIX supports three categories of users, File Owner, Group, and World, - and three types of file accesss permission: Read, Write, and Execute. + and three types of file access permission: Read, Write, and Execute. Thus, a UNIX file's permissions are expressed in 9 bits. The system-dependent permission string for UNIX is a 3-digit octal @@ -7891,7 +7891,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} 4.4.2.1.2. VMS VMS supports four categories of users, System, File Owner, Group, and - World, and four types of file accesss permission: Read, Write, Execute, + World, and four types of file access permission: Read, Write, Execute, and Delete. Thus, a VMS file's permissions are expressed in 16 bits. The system-dependent protection string for VMS is a 4-digit hexadecimal @@ -7961,7 +7961,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} whether the file "foo" exists; and it runs an inferior process, which might be a problem in some environments for resource and/or security reasons, and won't work at all in a "nopush" environment (e.g. one in - which C-Kermit is configured to forbid accesss to exterior commands and + which C-Kermit is configured to forbid access to exterior commands and programs, e.g. in a VMS "captive account"). In C-Kermit 7.0 on VMS and UNIX, and in K95 1.1.19 and later, the @@ -8154,7 +8154,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} shows the "/tmp/foo" file. If you want to see all "foo" files in the /tmp tree, do "cd /tmp" and then "dir /recursive foo". * If a file size of -1 is shown, or date-time of 0000-00-00 00:00:00, - this means the file was located, but accesss to information about + this means the file was located, but access to information about the file was denied to C-Kermit. * In VMS, if FOO.DIR;1 is a directory within your current directory, "directory foo" and "directory [.foo]" list the files in the [.FOO] @@ -8184,7 +8184,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} wd /headings *.txt - Of course you can still accesss your external directory listing program + Of course you can still access your external directory listing program by using RUN or "!", e.g. in VMS: run directory /size/date/protection/except=*.obj oofa.*;0 @@ -8597,7 +8597,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} /DOTFILES (UNIX and OS-9 only) Normally files whose names begin with "." - are skipped when matching wildcards that do not also beging with + are skipped when matching wildcards that do not also begin with ".". Include /DOTFILES to force these files to be included too. /RECURSIVE @@ -9907,8 +9907,8 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} Chooses buffered file output; this is the default. UNIX does its normal sort of disk buffering. The optional size specifies Kermit's own file output buffer size, and therefore the - frequency of disk accessses (write() system calls) -- the bigger - the size, the fewer the disk accessses. + frequency of disk accesses (write() system calls) -- the bigger + the size, the fewer the disk accesses. SET FILE OUTPUT UNBUFFERED [ size ] This forces each file output write() call to actually commit the @@ -10548,7 +10548,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} 4.20.2.5. Streaming on X.25 Connections - We have only limited accesss to X.25 networks. One trial was performed + We have only limited access to X.25 networks. One trial was performed in which the 1MB Solaris 2.4 Sparc executable was transferred over a SunLink X.25 connection; nothing is known about the actual physical connection. With a packet length of 8000 and a window size of 30, the @@ -10901,8 +10901,8 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} visual aspect of the packet that would be seen by the terminal (or, more to the point, the emulator, such as K95). This way, only C-Kermit goes into RECEIVE mode, and not also the terminal emulator through - which C-Kermit is accesssed. And therefore, it is no longer necessary - to SET TERMINAL AUTODOWNLOAD OFF to prevent multiple Kermits from going + which C-Kermit is accessed. And therefore, it is no longer necessary to + SET TERMINAL AUTODOWNLOAD OFF to prevent multiple Kermits from going into receive mode at once, but of course it is still necessary to ensure that, when you have multiple Kermits in a chain, that the desired one receives the autodownload. @@ -10949,7 +10949,7 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} started in interactive mode, and would cause it to exit if it entered server mode via command-line option.) When C-Kermit is to be the server, you can use { ENABLE, DISABLE } EXIT to - control the client's accesss to this feature. + control the client's access to this feature. REMOTE MKDIR directory-name Tells the client to ask the server to create a directory with @@ -11119,8 +11119,8 @@ SET HOST /PTY {sh -c "grep somestring *.txt"} When attempting to execute a REMOTE RMDIR, the server can remove only a single directory, not an entire sequence or tree. The system service that is called to remove the directory generally requires not only that - the server process has write delete accesss, but also that the - directory contain no files. + the server process has write delete access, but also that the directory + contain no files. In the future, a REMOTE RMDIR /RECURSIVE command (and the accompanying protocol) might be added. For now, use the equivalent REMOTE HOST @@ -11389,7 +11389,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 CP855 This PC Code Page contains all the Cyrillic letters that are also in ISO 8859-5, and is therefore useful for non-Russian - Cyrillic text (Ukrainian, Belorussian, etc), unlike CP866, which + Cyrillic text (Ukrainian, Belarusian, etc), unlike CP866, which has a smaller repertoire of Cyrillic letters. CP1251 @@ -11530,7 +11530,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 [547]http://www.unicode.org/ - and accesss the various online introductions, FAQs, technical reports, + and access the various online introductions, FAQs, technical reports, and other information. For greater depth, order the latest version of the published Unicode Standard. The following overview contains a great many oversimplifications and perhaps an opinion or two. @@ -11598,7 +11598,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 bytes in UCS-2 text pose problems for current applications and transmission methods. And to make matters worse, different hardware platforms store UCS-2 characters in different byte order. Thus a UCS-2 - file transferred by FTP (or accesssed via NFS, etc) between two + file transferred by FTP (or accessed via NFS, etc) between two computers with different architecture might have its bytes in the wrong order (or worse; see [549]Section 6.6.5.1 ). @@ -11676,7 +11676,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 storage. Any officially sanctioned method of doing this is called a UCS Transformation Format, or UTF. One such method, called UTF-16, is essentially identical with UCS-2 except that it designates certain code - values as "escape sequences" (called surrogate pairs) to accesss + values as "escape sequences" (called surrogate pairs) to access characters in other planes without having to use full UCS-4. We won't discuss UTF-16 further here, since at the moment there are no other planes. Several other UTF's (such as UTF-1, UTF-2, and UTF-7) have @@ -11691,7 +11691,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 conversion between ASCII and UTF-8 is no conversion at all, and applications or platforms (such as Plan 9 from Bell Labs) that use UTF-8 "for everything" can still run traditional ASCII-only - applications and be accesssed from them. In particular, unlike UCS-2, + applications and be accessed from them. In particular, unlike UCS-2, ASCII characters are not padded with NUL bytes. But also unlike UCS-2, there is no transparency for Latin-1 or any other non-ASCII character set. Every non-ASCII UCS-2 character is represented by a sequence of 2 @@ -12092,7 +12092,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 UTF-8 was first used in Plan 9 and soon will be available in Linux. It will probably spread from there (Unicode in some form is, of course, - also used in Windows NT, but only internally -- not for accesss from + also used in Windows NT, but only internally -- not for access from outside). To use UTF-8 or any other character set that uses 8-bit bytes in your @@ -12137,7 +12137,7 @@ C-Kermit> remote directory | sort +0.22 -0.40 stated without doubt that C-Kermit's key mapping will not work for UTF-8 values, since (a) the key map is indexed by 8-bit byte values and (b) C-Kermit reads keystrokes a byte at a time (these comments do not - apply to K95, which has direct accesss to the keyboard and can read + apply to K95, which has direct access to the keyboard and can read "wide" keycodes and uses them to index a "wide" keymap). Restrictions: As noted, the CONNECT command does not support UCS-2 as a @@ -13236,7 +13236,7 @@ while true { IF WRITEABLE name Succeeds if name is the name of an existing file or directory - that is writeable, e.g.: + that is writable, e.g.: if not writeable \v(lockdir) echo Please read installation instructions! @@ -13319,7 +13319,7 @@ while true { [a b c d e f g h i j k l m n o p q r s t u v w x y z] Note that \%* can not be used at top level, since Kermit does not have - accesss to the raw command line (only to its elements separately, after + access to the raw command line (only to its elements separately, after they have been processed by the shell and the C library). C-Kermit 7.0 also adds a SHIFT command: @@ -13974,11 +13974,31 @@ while true { creating \&b[] if necessary or, if \&b[] is already declared, stopping early if its size is less than 14. - ARRAY COPY \&a[17] \&b + ARRAY COPY \&a[17:] \&b This copies all the elements of \&a[] starting with 17 until the last to \&b[], creating \&b[] if necessary or, if \&b[] is already declared, stopping early if \&b[] is - not big enough. + not big enough. Suppose, for example, you have a script + whose arguments are string1, string2, and a list of files, + whose job is to change all occurrences of string1 to + string2 in each of the files. But if the list of files is + omitted, then "*" (all files in the current directory) is + assumed: + +if < \v(argc) 3 exit 1 "Usage: \%0 string1 string2 [ files ]" +if not def \%3 { + .n := \ffiles(*,&a) +} else { + array copy &_[3:] &a + .n := \fdim(&a) +} +for i 1 n 1 { + ! cat \&a[i] | sed -e "s|\%1|\%2|g" > /tmp/_x + rename /tmp/_x \&a[i] +} + + ARRAY COPY \&a[17] \&b + Same as previous example. ARRAY CLEAR arrayname Sets all the elements of the array to the empty value. You may @@ -14142,10 +14162,10 @@ while true { * An attempt to set the value of an array element that is out of bounds or that has not been declared simply fails. - C programmers expect an array of size nto have elements 0 through n-1. + C programmers expect an array of size n to have elements 0 through n-1. Fortran programmers expect the same array to have elements 1 through n. C-Kermit accommodates both styles; when you declare an array of size n, - it has n=1 elements, 0 through n, and you can use the array in your + it has n+1 elements, 0 through n, and you can use the array in your accustomed manner, 0-based or 1-based. However, note that C-Kermit has certain biases towards 1-based arrays: @@ -14383,7 +14403,7 @@ while true { "file:index", or "file.index", and the code above would have worked just as well (with the corresponding syntax adjustments). But to be able to use an associative array in a program after the array is built, - we need a method of accesssing all its elements without knowing in + we need a method of accessing all its elements without knowing in advance what they are. That's where the chosen notation comes in. First of all, any macro name that ends with "" (where "xxx" is any @@ -14427,7 +14447,7 @@ while true { .max := \&b[\%i] } } - echo Most popular file: \m(name), accessses: \m(max) + echo Most popular file: \m(name), accesses: \m(max) This lists the files and counts and then announces which file has the highest count. @@ -14871,7 +14891,7 @@ while true { contain the command-line arguments, if any, that appear after "--" or "=", if any. This array is saved and restored around macro calls; recall that inside macros it contains the macro argument vector - (allowing you to accesss arguments programmatically, and to have more + (allowing you to access arguments programmatically, and to have more than 9 of them). At top level, notice the difference between the \&@[] and \&_[] arrays. @@ -15046,7 +15066,7 @@ while true { shell. In VMS and other non-UNIX platforms, the Kerbang line has no effect and can be omitted. - It might be desireable for a script to know whether it has been invoked + It might be desirable for a script to know whether it has been invoked directly from the shell (as a Kerbang script) or by a TAKE command given to the Kermit prompt or in a Kermit command file or macro. This can be done as in this example: @@ -15330,11 +15350,13 @@ ELSE command-list the rules of precedence. All Boolean assertions are always evaluated; there is no "early stopping" property and therefore no question about when or if side effects will occur -- if any Boolean - assertion has side effects, they will always occur. + assertion has side effects, they will always occur. (Early stopping + is, however, possible with the [631]S-Expression IF introduced in + C-Kermit 8.0.) Constructions of arbitrary complexity are possible, within reason. - Also see [631]Section 7.4 for new IF / WHILE conditions. + Also see [632]Section 7.4 for new IF / WHILE conditions. 7.21. Screen Formatting and Cursor Control @@ -15502,6 +15524,10 @@ ELSE command-list 7.23. Floating-Point Arithmetic + For a more convenient way of dealing with floating-point numbers + than the one described here, see the [633]C-Kermit 8.0 update notes, + the section on [634]S-Expressions. + C-Kermit 7.0 adds limited support for floating-point numbers (numbers that have fractional parts, like 3.141592653). This support is provided through a small repertoire of functions and in Boolean expressions that @@ -15693,7 +15719,7 @@ ELSE command-list result to \ffpround(xxx,0) (to round). Floating-point numbers (or variables or functions that return them) can - be used in Boolean expressions (see [632]Section 7.20.2) that compare + be used in Boolean expressions (see [635]Section 7.20.2) that compare numbers: = x y @@ -15724,7 +15750,7 @@ ELSE command-list and is executed otherwise. Floating-point numbers can be sorted using ARRAY SORT /NUMERIC (see - [633]Section 7.10.5 ). + [636]Section 7.10.5 ). Two floating-point constants are provided: @@ -15867,7 +15893,7 @@ ELSE command-list Syntactically, \m(name) and \s(name) differ only in that the sequence [*] at the end of the name (where * is any sequence of 0 or more characters) is treated as substring notation in \s(name), but is - considered part of the name in \m(name) (to see why, see [634]Section + considered part of the name in \m(name) (to see why, see [637]Section 7.10.9). 7.26. New WAIT Command Options @@ -15936,7 +15962,7 @@ ELSE command-list heading is the time of the most recent event (including when the program started). - See [635]Section 1.10, where the \v(kbchar) variable is explained. This + See [638]Section 1.10, where the \v(kbchar) variable is explained. This lets you modify a loop like the one above to also accept single-character commands, which interrupt the WAIT, and dispatch accordingly. For example: @@ -15978,8 +16004,8 @@ ELSE command-list 8. USING OTHER FILE TRANSFER PROTOCOLS In C-Kermit 7.0, alternative protocols can be selected using switches. - Switches are described in [636]Section 1.5; the use of - protocol-selection switches is described in [637]Section 4.7.1. + Switches are described in [639]Section 1.5; the use of + protocol-selection switches is described in [640]Section 4.7.1. Example: send /binary /protocol:zmodem x.tar.gz @@ -16025,7 +16051,7 @@ ELSE command-list where a keyword (rather than a single letter) specifies the function, and if an argument is to be included, it is separated by a colon (or equal sign). Most of the new extended-format command-line options are - only for use with the Internet Kermit Service Daemon; see the [638]IKSD + only for use with the Internet Kermit Service Daemon; see the [641]IKSD Administration Guide for details. However, several of them are also general in nature: @@ -16150,7 +16176,7 @@ ELSE command-list become the name of the script file, rather than the pathname of the C-Kermit program, which is its normal value. Primarily for use in the top line of "Kerbang" scripts in UNIX (see - [639]Section 7.19). Example from UNIX command line: + [642]Section 7.19). Example from UNIX command line: $ kermit [ regular kermit args ] + filename @@ -16190,11 +16216,11 @@ ELSE command-list kermit -L -s "*.c" In UNIX only, "kermit -L -s ." means to send the current - directory tree. See [640]Sections 4.10 and [641]4.11 about + directory tree. See [643]Sections 4.10 and [644]4.11 about recursive file transfer. -V - Equivalent to SET FILE PATTERNS OFF ([642]Section 4.3) and SET + Equivalent to SET FILE PATTERNS OFF ([645]Section 4.3) and SET TRANSFER MODE MANUAL. In other words, take the FILE TYPE setting literally. For example, "kermit -VT oofa.bin" means send the file in Text mode, no matter what its name is and no matter @@ -16226,7 +16252,7 @@ ELSE command-list thus it is called G-Kermit (for GNU Kermit). All it does is send and receive files, period. You can find it at: - [643]http://www.columbia.edu/kermit/gkermit.html + [646]http://www.columbia.edu/kermit/gkermit.html Where the C-Kermit 7.0 binary might be anywhere from 1 to 3 million bytes in size, the G-Kermit binary ranges from 30K to 100K, depending @@ -16245,7 +16271,7 @@ ELSE command-list In such cases G-Kermit might be preferred since it generally starts up faster, and yet transfers files just as fast on most (but not necessarily all) kinds of connections; for example, it supports - streaming ([644]Section 4.20). + streaming ([647]Section 4.20). G-Kermit is also handy for bootstrapping. It is easier to load on a new computer than C-Kermit -- it fits on a floppy diskette with plenty of @@ -16255,7 +16281,7 @@ ELSE command-list diskette on Xenix with "dosread", and then use G-Kermit to receive C-Kermit (which does not fit on a diskette). If diskettes aren't an option, other bootstrapping methods are possible too -- see the - [645]G-Kermit web page for details. + [648]G-Kermit web page for details. III. APPENDICES @@ -16632,7 +16658,7 @@ CC Nation Effective Mandatory Notes IV. ERRATA & CORRIGENDA - The following errors in [646]Using C-Kermit, Second Edition, first + The following errors in [649]Using C-Kermit, Second Edition, first printing, have been noted. First, some missing acknowledgements for C-Kermit 6.0: JE Jones of @@ -16700,7 +16726,7 @@ COVER "COS" is a misprint. There is no COS. Pretend it says "SCO" or "VOS". 393 \Fverify() description. The 3rd sentence could be stated more clearly as "If all characters in string2 are also in string1, 0 is returned." 398 Copying \ffiles() results to an array before is not required as of - C-Kermit 7.0 (see [647]Section 7.3). + C-Kermit 7.0 (see [650]Section 7.3). 403 In "(\%a + 3) * (\%b 5)", a minus sign is missing between b and 5. 407 C-Kermit 7.0 no longer supports multiline GET. Change "get, \%1, \%2" to "get {\%1} {\%2}" or "get /as:{\%2} {\%1}". @@ -16721,7 +16747,7 @@ COVER "COS" is a misprint. There is no COS. Pretend it says "SCO" or "VOS". 440 Change "set terminal byteszie" to "set terminal bytesize". Change "input Password:" to "input 10 Password". -448 Franchise script: "accesss line" should be "accesss \m(line)". +448 Franchise script: "access line" should be "access \m(line)". 453 There are two incorrectly coded IF statements in the DELIVER macro definition. Replace both occurrences of "if > \%1 \%3 {" with "xif > \%i \%3 {" (replace "if" by "xif" and "\%1" with "\%i"). @@ -16810,7 +16836,7 @@ Index: Missing entries: SET { SEND, RECEIVE } PATHNAMES, Call waiting, ... suggestions for improvements, additional index entries, and any other comments: - [648]kermit@columbia.edu + [651]kermit@columbia.edu APPENDIX V. ADDITIONAL COPYRIGHT NOTICES @@ -17000,11 +17026,11 @@ APPENDIX V. ADDITIONAL COPYRIGHT NOTICES Used for Big Number library in Kermit 95 (k95crypt.dll, k2crypt.dll). - [ [649]Top ] [ [650]C-Kermit ] [ [651]Kermit Home ] - __________________________________________________________________ + [ [652]Top ] [ [653]C-Kermit ] [ [654]Kermit Home ] __________________________________________________________________ - CKERMIT70.HTM / The Kermit Project / Columbia University / 8 Feb 2000 + CKERMIT70.HTM / The Kermit Project / Columbia University / 8 Feb 2000 / + Last update: 8 Aug 2011 References @@ -17638,24 +17664,27 @@ References 628. http://www.columbia.edu/kermit/ckermit70.html#x7.5 629. http://www.columbia.edu/kermit/ckb2.htm 630. http://www.columbia.edu/kermit/ckermit80.html - 631. http://www.columbia.edu/kermit/ckermit70.html#x7.4 - 632. http://www.columbia.edu/kermit/ckermit70.html#x7.20.2 - 633. http://www.columbia.edu/kermit/ckermit70.html#x7.10.5 - 634. http://www.columbia.edu/kermit/ckermit70.html#x7.10.9 - 635. http://www.columbia.edu/kermit/ckermit70.html#x1.10 - 636. http://www.columbia.edu/kermit/ckermit70.html#x1.5 - 637. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1 - 638. http://www.columbia.edu/kermit/iksd.html - 639. http://www.columbia.edu/kermit/ckermit70.html#x7.19 - 640. http://www.columbia.edu/kermit/ckermit70.html#x4.10 - 641. http://www.columbia.edu/kermit/ckermit70.html#x4.11 - 642. http://www.columbia.edu/kermit/ckermit70.html#x4.3 - 643. http://www.columbia.edu/kermit/gkermit.html - 644. http://www.columbia.edu/kermit/ckermit70.html#x4.20 - 645. http://www.columbia.edu/kermit/gkermit.html - 646. http://www.columbia.edu/kermit/ckb2.htm - 647. http://www.columbia.edu/kermit/ckermit70.html#x7.3 - 648. mailto:kermit@columbia.edu - 649. http://www.columbia.edu/kermit/ckermit70.html#top - 650. http://www.columbia.edu/kermit/ckermit.html - 651. http://www.columbia.edu/kermit/index.html + 631. http://www.columbia.edu/kermit/ckermit80.html#x9 + 632. http://www.columbia.edu/kermit/ckermit70.html#x7.4 + 633. http://www.columbia.edu/kermit/ckermit80.html + 634. http://www.columbia.edu/kermit/ckermit80.html#x9 + 635. http://www.columbia.edu/kermit/ckermit70.html#x7.20.2 + 636. http://www.columbia.edu/kermit/ckermit70.html#x7.10.5 + 637. http://www.columbia.edu/kermit/ckermit70.html#x7.10.9 + 638. http://www.columbia.edu/kermit/ckermit70.html#x1.10 + 639. http://www.columbia.edu/kermit/ckermit70.html#x1.5 + 640. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1 + 641. http://www.columbia.edu/kermit/iksd.html + 642. http://www.columbia.edu/kermit/ckermit70.html#x7.19 + 643. http://www.columbia.edu/kermit/ckermit70.html#x4.10 + 644. http://www.columbia.edu/kermit/ckermit70.html#x4.11 + 645. http://www.columbia.edu/kermit/ckermit70.html#x4.3 + 646. http://www.columbia.edu/kermit/gkermit.html + 647. http://www.columbia.edu/kermit/ckermit70.html#x4.20 + 648. http://www.columbia.edu/kermit/gkermit.html + 649. http://www.columbia.edu/kermit/ckb2.htm + 650. http://www.columbia.edu/kermit/ckermit70.html#x7.3 + 651. mailto:kermit@columbia.edu + 652. http://www.columbia.edu/kermit/ckermit70.html#top + 653. http://www.columbia.edu/kermit/ckermit.html + 654. http://www.columbia.edu/kermit/index.html diff --git a/ckermit80.txt b/ckermit80.txt index 7aae91a..196b68b 100644 --- a/ckermit80.txt +++ b/ckermit80.txt @@ -385,7 +385,7 @@ CONTENTS 1858. + General: o "Closing blah..." message upon exit could not be - surpressed. + suppressed. o Added /PAGE and /NOPAGE to DELETE switches. o Added GO response for DELETE /ASK (delete all the rest without asking). @@ -498,7 +498,7 @@ CONTENTS + We now make every attempt to not write passwords to the debug.log. + New Certificate Authority certificates file, includes the - Kermit Project at Columbia University so you can accesss our + Kermit Project at Columbia University so you can access our IKSD securely. + Secure targets improved and better documented in Unix makefile. @@ -1116,7 +1116,7 @@ set host /pipe ssh -e none -l olga -T -s hq.xyzcorp.com kermit PUT), they apply only to that command. /USER:name - To be used in case a page requires a username for accesss. The + To be used in case a page requires a username for access. The username is sent with page requests. If it is given with the OPEN command it is saved until needed. If a username is included in a URL, it overrides the username given in the switch. @@ -1127,7 +1127,7 @@ set host /pipe ssh -e none -l olga -T -s hq.xyzcorp.com kermit performed securely on HTTPS connections. /PASSWORD:text - To be used in case a web page requires a password for accesss. + To be used in case a web page requires a password for access. The password is sent with page requests. If it is given with the OPEN command it is saved until needed. If a password is given in a URL, it overrides the one given here. CAUTION: (same as for @@ -1540,7 +1540,7 @@ set host /pipe ssh -e none -l olga -T -s hq.xyzcorp.com kermit http www.columbia.edu -g kermit/index.html - If you need to accesss a website for which a username and password are + If you need to access a website for which a username and password are required, you can supply them on the command line with -u and -P. If you include a username but omit the password, Kermit prompts you for it: @@ -2034,7 +2034,7 @@ set host /pipe ssh -e none -l olga -T -s hq.xyzcorp.com kermit the server does support accounts, the account is accepted if it is valid and rejected if it is not. The account might be used for charging purposes or it might be a secondary password, or it - might be used for any other purpose, such as an accesss password + might be used for any other purpose, such as an access password for a particular disk. Servers that support accounts might or might not allow or require the account to be sent prior to login; usually it is sent after login, if at all. Synonym: @@ -2122,6 +2122,34 @@ bye ; Log out and disconnect [ [240]Top ] [ [241]FTP Top ] [ [242]C-Kermit Home ] [ [243]Kermit Home ] +3.1.5. Making Proxy Connections + + The simplist form of firewall traversal is the HTTP CONNECT command. + The CONNECT command was implemented to allow a public web server which + usually resides on the boundary between the public and private networks + to forward HTTP requests from clients on the private network to public + web sites. In order to allow secure web connections to be established, + the CONNECT command works by authenticating the client with a + username/password and then establishing a tunnel to the desired host. + + Many web servers support the CONNECT command and it can be configured + to allow outgoing connections to authenticated user to any TCP/IP + hostname/port combination accessible to the web server. The limitations + of HTTP CONNECT is that it can only be used for outgoing connections + for protocols that are implemented using TCP/IP. Protocols such as + Kerberos authentication that use UDP/IP cannot be tunneled using HTTP + CONNECT. + + Kermit provides support for the use of HTTP CONNECT proxy services with + the command: + + SET TCP HTTP-PROXY [/USER:username /PASSWORD:password] hostname/ip-address[:po +rt] + + When a port is not specified the default port configured on the HTTP + server is used. This is frequently port 443. When a hostname is + specified, it is resolved using the DNS available to the web server. + 3.2. Making Secure FTP Connections Also see: [244]Accessing IBM Information Exchange with Kermit. @@ -2129,8 +2157,8 @@ bye ; Log out and disconnect In the previous section, you can see several examples of traditional insecure authentication: username and password sent across the network in clear text. Of course this is bad practice on at least two counts: - (1) storing passwords in files (such as script files) gives accesss to - the target systems to anybody who can obtain read accesss to your + (1) storing passwords in files (such as script files) gives access to + the target systems to anybody who can obtain read access to your scripts; and (2) sending this information over the network leaves it open to interception by network sniffers or compromised hosts. @@ -2138,7 +2166,7 @@ bye ; Log out and disconnect servers are beginning to appear that offer secure forms of authentication, in which no information is sent over the network that would allow anyone who intercepts it to usurp your identity and gain - your accesss rights. + your access rights. Kermit provides an equivalent form of FTP security for each type of IETF standard security implemented in Telnet. These include @@ -2193,7 +2221,7 @@ bye ; Log out and disconnect SET FTP CREDENTIAL-FORWARDING { ON, OFF } Tells whether end-user credentials are to be forwarded to the server if supported by the authentication method (GSSAPI-KRB5 - only). This is often required to allow accesss to distributed + only). This is often required to allow access to distributed file systems (e.g. AFS.) SET FTP DATA-PROTECTION-LEVEL { CLEAR, CONFIDENTIAL, PRIVATE, SAFE } @@ -2344,7 +2372,7 @@ bye ; Log out and disconnect SET QUIET { ON, OFF } This command applies to Kermit in general, not just FTP. OFF by - default; when ON, it surpresses most messages from most commands + default; when ON, it suppresses most messages from most commands as well as the file-transfer display. SET FTP PROGRESS-MESSAGES { ON, OFF } @@ -2425,7 +2453,7 @@ bye ; Log out and disconnect transfer immediately and fail if an error occurs with any single file in the group. Example: you have given Kermit a list of files to send, and one of the files can not be found, or read - permission is denied. Note that cancelling a file by typing 'X' + permission is denied. Note that canceling a file by typing 'X' during transfer is not considered an error (if you want to cancel the entire transfer, type 'Z' or Ctrl-C). @@ -2688,7 +2716,7 @@ bye ; Log out and disconnect When used with FTP DELETE, the /RECURSIVE switch deletes files but not directories, and furthermore depends on the server providing recursive file lists, which is not the normal - behavior. For further details, see the decriptions of these + behavior. For further details, see the descriptions of these switches in [274]Section 3.6. Synonyms: FTP MDELETE (Kermit makes no distinction between DELETE and MDELETE); RDELETE. @@ -2784,7 +2812,7 @@ bye ; Log out and disconnect directory to the server's /tmp directory. This works only if the server uses the same directory notation that you used in the as-name AND the given directory already exists on the server AND if you have write - accesss to it. + access to it. Use caution when uploading from a case-sensitive file system, such as UNIX, to a file system that is not case sensitive, such as Windows or @@ -2886,7 +2914,7 @@ C-Kermit>ftp put ? Filename, or switch, one of the following: plus all directories beneath it, including empty directories, replicating the directory structure on the server. No special capabilities are required in the server, but of course your - login ID on the server must have the appropriate accesss and + login ID on the server must have the appropriate access and permission to create directories. Recursive PUTs work not only between like platforms (e.g. UNIX to UNIX) but also between unlike ones (e.g. UNIX to VMS or Windows), in which case @@ -2987,7 +3015,7 @@ C-Kermit>ftp put ? Filename, or switch, one of the following: Tells Kermit to ask the server to rename each file according to the given template as soon as, and only if, it has been received completely and successfully. The template works as in /AS-NAME. - Requires write and rename accesss on the server, so doesn't + Requires write and rename access on the server, so doesn't usually work with (e.g.) anonymous uploads to public incoming areas where the permissions don't allow renaming. Examples: @@ -3480,7 +3508,7 @@ C-Kermit>ftp put ? Filename, or switch, one of the following: /DELETE Each file that is downloaded successfully is to be deleted from - the server. Requires the appropriate file accesss rights on the + the server. Requires the appropriate file access rights on the server. /SERVER-RENAME-TO:template @@ -3964,18 +3992,18 @@ C-Kermit>ftp put ? Filename, or switch, one of the following: REMOTE TYPE (RTYPE) FTP TYPE REMOTE EXIT (REXIT) FTP BYE - The commands in the right-hand column always accesss FTP. The commands - in the left column can accesss either Kermit protocol or FTP: + The commands in the right-hand column always access FTP. The commands + in the left column can access either Kermit protocol or FTP: * When GET-PUT-REMOTE is set to KERMIT, or to AUTO when there is no - FTP connection, the commands in the left-hand column accesss Kermit + FTP connection, the commands in the left-hand column access Kermit protocol, and those right-hand column are required for FTP. * When GET-PUT-REMOTE is set to FTP, or to AUTO when there is an - active FTP connection, the commands in the left-hand column accesss - the FTP connection and can not be used to accesss Kermit protocol. + active FTP connection, the commands in the left-hand column access + the FTP connection and can not be used to access Kermit protocol. In this case, if you want to be able to use both Kermit protocol and the FTP connection, you must SET GET-PUT-REMOTE KERMIT, and - then use the FTP commands in the right-hand column to accesss the + then use the FTP commands in the right-hand column to access the FTP connection. Note that file-management commands such as DIRECTORY, DELETE, CD, PWD, @@ -4354,12 +4382,12 @@ C-Kermit>ftp put ? Filename, or switch, one of the following: FTP SIZE filename Sends a SIZE directive to the server for the given file. The filename must not contain wildcards. The server responds with an - error if the file can't be found, is not accesssible, or the - SIZE directive is not supported, otherwise with the length of - the file in bytes, which Kermit displays and also makes - available to you in its \v(ftp_message) variable. If the - directive is successful, Kermit (re-)enables it for internal use - by the GET and MGET directives on this connection. + error if the file can't be found, is not accessible, or the SIZE + directive is not supported, otherwise with the length of the + file in bytes, which Kermit displays and also makes available to + you in its \v(ftp_message) variable. If the directive is + successful, Kermit (re-)enables it for internal use by the GET + and MGET directives on this connection. FTP MODTIME filename Works just like the SIZE directive except it sends an MDTM @@ -5213,7 +5241,7 @@ mget /nlst t[1234].h 6.6. Arrow Keys - As of version 8.0.201, C-Kermit on most platforms lets you accesss the + As of version 8.0.201, C-Kermit on most platforms lets you access the command history buffer with arrow keys, just as you always could with control characters. The restrictions are: @@ -5224,7 +5252,7 @@ mget /nlst t[1234].h This change was made to facilitate command recall in Linux-based PDAs that don't have a Control key, or at least not one that's easily (or - always) accesssible, such as the Sharp Zaurus SL5500. + always) accessible, such as the Sharp Zaurus SL5500. [ [391]Top ] [ [392]Contents ] [ [393]C-Kermit Home ] [ [394]Kermit Home ] @@ -5606,7 +5634,7 @@ mget /nlst t[1234].h SET ROOT directory Like UNIX chroot, without requiring privilege. Sets the root for - file accesss, does not allow reference to or creation of files + file access, does not allow reference to or creation of files outside the root, and can't be undone. SET SEND PERMISSIONS { ON, OFF } @@ -6098,7 +6126,7 @@ ond. The following new or improved built-in functions are available: - \fcmdstack() Allows programmatic accesss to the command stack. + \fcmdstack() Allows programmatic access to the command stack. \fcvtdate() [448]Section 8.13, format options added \fdelta2secs() [449]Section 8.13 \fdostounixpath(s1) Converts a DOS filename to Unix format. @@ -6124,7 +6152,7 @@ ond. \fverify(s1,s2,n) As of version 8.0.211, returns -1 if s2 is an empty string. Previously it returned 0, making \fverify(abc,\%a) look as if - \%a was a string combosed of a's, b's, and/or c's when in fact + \%a was a string composed of a's, b's, and/or c's when in fact it contained nothing. \fcode(string) @@ -6302,7 +6330,7 @@ ond. 8.7.3. The \fcmdstack() Function - The new \fcmdstack() function gives accesss to the command stack: + The new \fcmdstack() function gives access to the command stack: \fcmdstack(n1,n2) Arguments: n1 is the command stack level. If omitted, the @@ -7498,7 +7526,7 @@ Position Contents displaying summary results. You can do this by defining a macro named ON_CTRLC. When Ctrl-C is detected, and a macro with this name is defined, Kermit executes it from the current command level, thus giving - it full accesss to the environment in which the interruption occurred, + it full access to the environment in which the interruption occurred, including local variables and open files. Only when the ON_CTRLC macro completes execution is the command stack rolled back to top level. @@ -7867,7 +7895,7 @@ def newarea { ON means always print the value; OFF means never print it. In any case, the value of the most recent S-Expression (and the - S-Expression itself) may be accesssed programmatically through the + S-Expression itself) may be accessed programmatically through the following variables: \v(sexpression) @@ -9284,7 +9312,7 @@ def newarea { Added in C-Kermit 8.0.201: Rudimentary support for Caller ID, for use with the ANSWER command. If the modem reports Caller ID information, - Kermit stores it in variables that you can accesss after the call is + Kermit stores it in variables that you can access after the call is answered: \v(callid_date) The date of the call @@ -9325,7 +9353,7 @@ def newarea { Kermit presently has no built-in knowledge of the Caller ID capabilities or commands of the modems in its database. - Since the variables can be accesssed only after the call is answered, + Since the variables can be accessed only after the call is answered, the only way to refuse a call is to answer it, inspect the variables, and then hang it up if desired. @@ -9476,8 +9504,8 @@ def newarea { 14. DIALOUT FROM TELNET TERMINAL SERVERS For years, C-Kermit has supported dialing out from Telnet modem servers - (also called reverse terminal servers or accesss servers), but until - now there was no way for Kermit to control the communication parameters + (also called reverse terminal servers or access servers), but until now + there was no way for Kermit to control the communication parameters (speed, parity, etc) on the serial port of the terminal server; it had to use whatever was there. @@ -9514,7 +9542,7 @@ def newarea { connection automatically when the telephone call is hung up (e.g. "autohangup" on Cisco models). - For a Linux-based Telnet Com-Port server, click the Srdird link: + For a Linux-based Telnet Com-Port server, click the Sredird link: [ [575]Top ] [ [576]Contents ] [ [577]Sredird ] [ [578]C-Kermit Home ] [ [579]Kermit Home ] diff --git a/ckermit90.txt b/ckermit90.txt index 09f7c8b..adf6ee3 100644 --- a/ckermit90.txt +++ b/ckermit90.txt @@ -13,8 +13,10 @@ C-Kermit 9.0 Update Notes - Note: C-Kermit 9.0.301 contains a correction that applies only to + Note: C-Kermit 9.0.301 contains a correction that applies only to Solaris 10 and 11. + C-Kermit 9.0.302 contains corrections that apply only to FreeBSD 8 + and 9. * [15]Large Files * [16]How to Test Large-File Transfer * [17]Arithmetic with Large Integers @@ -51,21 +53,21 @@ C-Kermit 9.0 Update Notes because it's an interactive program, not a compiler. The scripting language is the command language. Kind of like the Unix shell but "somewhat" less cryptic, including concepts not only from C but from - PL/I, Snobol, LISP, and Smalltalk. The language itself is built upon - the command language of the much-loved [36]DECSYSTEM-20 from the 1970s - and 80s, the Clipper Ship of the Text Era. (Text is not a bad word. - Those of us who can touch-type and who are proficient in text-based - computing environments like Unix shell or VMS DCL are likely to be - orders of magnitude more productive than users of GUIs.) + PL/I, Snobol, LISP, Bliss, and Smalltalk. The language itself is built + upon the command language of the much-loved [36]DECSYSTEM-20 from the + 1970s and 80s, the Clipper Ship of the Text Era. (Text is not a bad + word. Those of us who can touch-type and who are proficient in + text-based computing environments like Unix shell or VMS DCL are likely + to be orders of magnitude more productive than users of GUIs.) Thanks to (at least) Jeff Altman, William Bader, Ian Beckwith, Nelson - Beebe, Gerry Belanger, Joop Boonen, Rob Brown, Christian Corti, John - Dunlap, Peter Eichhorn, Carl Friedberg, Terry Kennedy, Günter Knauf, - Jason Lehr, Arthur Marsh, Lewis McCarthy, Gary Mills, Jonathan Reams, - Mike Rechtman, Mark Sapiro, Steven Schweda (SMS), Kinjal Shah, Michael - Sokolov, Andy Tanenbaum, Seth Theriault, Zach A. Thomas, Martin - Vorländer, and Eric Weaver for assistance, and to Hewlett-Packard - Company for support. + Beebe, Gerry Belanger, Joop Boonen, Rob Brown, Christian Corti, Alexey + Dokuchaev, John Dunlap, Peter Eichhorn, Carl Friedberg, Terry Kennedy, + Günter Knauf, Jason Lehr, Arthur Marsh, Lewis McCarthy, Gary Mills, Ed + Ravin, Jonathan Reams, Mike Rechtman, Mark Sapiro, Steven Schweda + (SMS), Kinjal Shah, Michael Sokolov, Andy Tanenbaum, Seth Theriault, + Zach A. Thomas, Martin Vorländer, and Eric Weaver for assistance, and + to Hewlett-Packard Company for support. - Frank da Cruz [37]fdc@columbia.edu, 30 June 2011 @@ -86,21 +88,23 @@ C-Kermit> send /recursive /dotfiles /nobackup * index.html.~243~). And then I did the same with the FTP sites, about 8GB in all. Watching the file-transfer display was kind of like having 30 years of my life flash before my eyes in a few minutes. Then I - copied the two directories to DVD (the FTP site had to split over 2 + copied the two directories to DVD (the FTP site had to be split over 2 DVDs). The whole operation took under half an hour. The directory tree on the CD is directly usable in Windows, Unix, or any other operating - system (unlike if I had made, say, a gzipped tar archive or a zip + system (unlike if I had transferred the files all in binary mode or all + in text mode, or if I had made, say, a gzipped tar archive or a zip archive). I believe that, to this day, Kermit is the only software that can do this. If someday I have to upload from these DVDs to Unix, VMS, or any other operating system, it can be done exactly the same way, with any necessary conversions on text files done automatically, and - binary files left intact. + binary files left intact, recursively through a whole very large + directory tree. What's New in General Very briefly, the major items: * [39]Open Source license. - * [40]64-bit file accesss and transfer and 64-bit integer arithmetic + * [40]64-bit file access and transfer and 64-bit integer arithmetic on most common platforms. * Support for recent releases of Linux, Mac OS X, *BSD, etc ([41]see table). @@ -132,11 +136,11 @@ Large Files platforms that support them. A "large file" is one whose size is greater than 2^31-1 (2,147,483,647) bytes (2GB-1); that is, one whose size requires more than 31 bits to represent. Before now, Kermit was - able to accesss such files only on 100% 64-bit platforms such as - Digital Unix, later known as Tru64 Unix. In the new release, Kermit - takes advantage of the X/Open Single UNIX Specification Version 2 (UNIX - 98) Large File Support (LFS) specification, which allows 32-bit - platforms to create, accesss, and manage files larger than 2GB. + able to access such files only on 100% 64-bit platforms such as Digital + Unix, later known as Tru64 Unix. In the new release, Kermit takes + advantage of the X/Open Single UNIX Specification Version 2 (UNIX 98) + Large File Support (LFS) specification, which allows 32-bit platforms + to create, access, and manage files larger than 2GB. Accommodating large files required code changes in many modules, affecting not only file transfer, but also file management functions @@ -272,13 +276,12 @@ FORCE-3 Packet Protocol In practice, however, it is possible to code the packet receiver "cheat" by reading the packet data before verifying the block check. - Thus when the receiver is C-Kermit 9.0 Beta.01 or later or E-Kermit 1.7 - or later, it is only necessary to give the "set block 5" command to the + Thus when the receiver is C-Kermit 9.0 or later or E-Kermit 1.7 or + later, it is only necessary to give the "set block 5" command to the file sender, and the receiver will check for a FORCE-3 first packet. If - the receiver does not support this feature, however, the the initial - packet will be be rejected (after several retries) and the file - transfer will not take place. There is no attempt to "back off" to - normal behavior. + the receiver does not support this feature, however, the initial packet + will be be rejected (after several retries) and the file transfer will + not take place. There is no attempt to "back off" to normal behavior. CAPTION: Table 4. Kermit Protocol Packet Block Check Types @@ -319,7 +322,7 @@ Variable Evaluation a single letter, for example \a, \b, etc. The contributed code evaluated these variables recursively, meaning if the definition of a variable contained variable references, then these were resolved when - derefencing the variable, and the process would continue as deep down + dereferencing the variable, and the process would continue as deep down as necessary to resolve the thing fully. This was sometimes handy, but it had one severe drawback: There was no @@ -402,7 +405,7 @@ Variable Evaluation anyway there should never be any harm in evaluating them recursively because their final value is always (or should be) numeric, not some string that might contain backslashes. - * The VARIABLE-EVALUTION setting is on the command stack. Thus you + * The VARIABLE-EVALUATION setting is on the command stack. Thus you can give this command in a macro, command file, or user-defined function without affecting the calling environment. * The new \frecurse() function forces recursive evaluation of its @@ -889,7 +892,7 @@ Other New Features versions that support large files. * User-settable FTP timeout, works on both the data and control connection. - * FTP accesss to ports higher than 16383. + * FTP access to ports higher than 16383. * Built-in FTP client for VMS. This is the [70]same FTP client Unix C-Kermit has had since version 8.0, minimally adapted to VMS by SMS, supporting binary and Stream_LF file transfer only (in other @@ -1105,7 +1108,7 @@ exit 0 them to analyze web logs, see the Weblog script below. * - Lazy IF Conditions: Third, now you can do this: + Lazy IF Conditions: Now you can do this: define foo some number if foo command @@ -1116,9 +1119,9 @@ exit 0 Of course the old way still works too. But watch out because if the variable name is the same as a symbolic IF condition (for example COUNT), it won't do what you expected. (IF COUNT was used for loop - control in early versions of MS-DOS Kermit, before it got true FOR + control in early versions of MS-DOS Kermit, before it got real FOR and WHILE loops; it was added to C-Kermit for compatibility, and it - can't be removed because it could break existing scripts). + can't be removed because that could break existing scripts). * Escape sequences are now stripped from text-mode session logs not only in CONNECT sessions but also in whatever is logged by the INPUT command; described in the [85]next section. @@ -1307,16 +1310,16 @@ Using External File-Transfer Protocols on Secure Connections ckupty.[ch], which are well-proven in terms of portability and of actually working. They are currently used by SET HOST /PTY for making terminal connections to external processes. But these routines are - written on the assumption that the pty is to be accesssed - interactively, and maybe they are setting the fork/pty arrangement up - in such a way that that's not suitable for file transfer. The Pass One - routine is called xttptycmd() in ckutio.c. + written on the assumption that the pty is to be accessed interactively, + and maybe they are setting the fork/pty arrangement up in such a way + that that's not suitable for file transfer. The Pass One routine is + called xttptycmd() in ckutio.c. So in Pass Two I made a second copy of the routine, yttptycmd(), that manages the pty and fork itself, so all the code is in one place and it's simple and understandable. But it still doesn't work for Zmodem downloads. In this routine, I use openpty() to get the pty pair, which - is not portable, so I can have accesss to both the master and slave pty + is not portable, so I can have access to both the master and slave pty file descriptors. This version can be used only a platforms that have openpty(): Linux, Mac OS X, NetBSD, etc. diff --git a/ckubwr.txt b/ckubwr.txt index 44177a5..38b064a 100644 --- a/ckubwr.txt +++ b/ckubwr.txt @@ -10,8 +10,8 @@ C-Kermit Unix Hints and Tips Frank da Cruz [11]The Kermit Project, [12]Columbia University - As of: C-Kermit 9.0.300 30 June 2011 - This page last updated: Wed Jul 6 10:02:34 2011 (New York USA Time) + As of: C-Kermit 9.0.302, 20 August 2011 + This page last updated: Sun Aug 21 12:08:52 2011 (New York USA Time) IF YOU ARE READING A PLAIN-TEXT version of this document, note it is a plain-text dump of a Web page. You can visit the original (and @@ -26,41 +26,44 @@ Known problems with C-Kermit 9.0 * Domain name resolution does not work in Solaris 10 or 11 (fixed in [14]9.0.301). + * UUCP lockfile failure in FreeBSD 8 (fixed in [15]9.0.302). + * Build failure FreeBSD 9 (fixed in [16]9.0.302). * Opening new SSH sessions after closing previous ones sometimes fails. + * Heimdal Kerberos not supported. - [ [15]C-Kermit ] [ [16]Installation Instructions ] [ [17]TUTORIAL ] + [ [17]C-Kermit ] [ [18]Installation Instructions ] [ [19]TUTORIAL ] CONTENTS - 1. [18]INTRODUCTION - 2. [19]PREBUILT C-KERMIT BINARIES - 3. [20]PLATFORM-SPECIFIC NOTES - 4. [21]GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS - 5. [22]INITIALIZATION AND COMMAND FILES - 6. [23]COMMUNICATION SPEED SELECTION - 7. [24]COMMUNICATIONS AND DIALING - 8. [25]HARDWARE FLOW CONTROL - 9. [26]TERMINAL CONNECTION AND KEY MAPPING - 10. [27]FILE TRANSFER - 11. [28]EXTERNAL FILE TRANSFER PROTOCOLS - 12. [29]SECURITY - 13. [30]MISCELLANEOUS USER REPORTS - 14. [31]THIRD-PARTY DRIVERS - - Quick Links: [ [32]Linux ] [ [33]*BSD ] [[34]Mac OS X] [ [35]AIX ] [ - [36]HP-UX ] [ [37]Solaris ] [ [38]SCO ] + 1. [20]INTRODUCTION + 2. [21]PREBUILT C-KERMIT BINARIES + 3. [22]PLATFORM-SPECIFIC NOTES + 4. [23]GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS + 5. [24]INITIALIZATION AND COMMAND FILES + 6. [25]COMMUNICATION SPEED SELECTION + 7. [26]COMMUNICATIONS AND DIALING + 8. [27]HARDWARE FLOW CONTROL + 9. [28]TERMINAL CONNECTION AND KEY MAPPING + 10. [29]FILE TRANSFER + 11. [30]EXTERNAL FILE TRANSFER PROTOCOLS + 12. [31]SECURITY + 13. [32]MISCELLANEOUS USER REPORTS + 14. [33]THIRD-PARTY DRIVERS + + Quick Links: [ [34]Linux ] [ [35]*BSD ] [[36]Mac OS X] [ [37]AIX ] [ + [38]HP-UX ] [ [39]Solaris ] [ [40]SCO ] 1. INTRODUCTION - [ [39]Top ] [ [40]Contents ] [ [41]Next ] + [ [41]Top ] [ [42]Contents ] [ [43]Next ] SECTION CONTENTS - 1.1. [42]Documentation - 1.2. [43]Technical Support - 1.3. [44]The Year 2000 - 1.4. [45]The Euro + 1.1. [44]Documentation + 1.2. [45]Technical Support + 1.3. [46]The Year 2000 + 1.4. [47]The Euro THIS IS WHAT USED TO BE CALLED the "beware file" for the Unix version of C-Kermit, previously distributed as ckubwr.txt and, before that, as @@ -75,9 +78,9 @@ CONTENTS internal cross references, and so on, to make it easier to use. This document applies to Unix C-Kermit in general, as well as to - specific Unix variations like [46]Linux, [47]AIX, [48]HP-UX, - [49]Solaris, and so on, and should be read in conjunction with the - [50]platform-independent C-Kermit beware file, which contains similar + specific Unix variations like [48]Linux, [49]AIX, [50]HP-UX, + [51]Solaris, and so on, and should be read in conjunction with the + [52]platform-independent C-Kermit beware file, which contains similar information, but applying to all versions of C-Kermit (VMS, Windows, OS/2, AOS/VS, VOS, etc, as well as to Unix). @@ -86,41 +89,41 @@ CONTENTS are relevant to you. Numerous offsite Web links are supposed to lead to further information but, as you know, Web links go stale frequently and without warning. If you can supply additional, corrected, updated, or - better Web links, please feel free to [51]let me know. + better Web links, please feel free to [53]let me know. 1.1. Documentation - [ [52]Top ] [ [53]Contents ] [ [54]Next ] + [ [54]Top ] [ [55]Contents ] [ [56]Next ] - C-Kermit 6.0 is documented in the book [55]Using C-Kermit, Second + C-Kermit 6.0 is documented in the book [57]Using C-Kermit, Second Edition, by Frank da Cruz and Christine M. Gianone, Digital Press, Burlington, MA, USA, ISBN 1-55558-164-1 (1997), 622 pages. This remains the definitive C-Kermit documentation. Until the third edition is published (sorry, there is no firm timeframe for this), please also refer to: - [56]Supplement to Using C-Kermit, Second Edition, For C-Kermit 7.0 + [58]Supplement to Using C-Kermit, Second Edition, For C-Kermit 7.0 Thorough documentation of features new to version 7.0. - [57]Supplement to Using C-Kermit, Second Edition, For C-Kermit 8.0 + [59]Supplement to Using C-Kermit, Second Edition, For C-Kermit 8.0 Thorough documentation of features new to version 8.0. - [58]Supplement to Using C-Kermit, Second Edition, For C-Kermit 9.0 + [60]Supplement to Using C-Kermit, Second Edition, For C-Kermit 9.0 Thorough documentation of features new to version 9.0. 1.2. Technical Support - [ [59]Top ] [ [60]Contents ] [ [61]Section Contents ] [ [62]Next ] [ - [63]Previous ] + [ [61]Top ] [ [62]Contents ] [ [63]Section Contents ] [ [64]Next ] [ + [65]Previous ] For information on how to get technical support, please visit: - [64]http://www.columbia.edu/kermit/support.html + [66]http://www.columbia.edu/kermit/support.html 1.3. The Year 2000 - [ [65]Top ] [ [66]Contents ] [ [67]Section Contents ] [ [68]Next ] [ - [69]Previous ] + [ [67]Top ] [ [68]Contents ] [ [69]Section Contents ] [ [70]Next ] [ + [71]Previous ] The Unix version of C-Kermit, release 6.0 and later, is "Year 2000 compliant", but only if the underlying operating system is too. Contact @@ -167,7 +170,7 @@ CONTENTS 1.4. The Euro - [ [70]Top ] [ [71]Contents ] [ [72]Section Contents ] [ [73]Previous ] + [ [72]Top ] [ [73]Contents ] [ [74]Section Contents ] [ [75]Previous ] C-Kermit 7.0 and later support Unicode (ISO 10646), ISO 8859-15 Latin Alphabet 9, PC Code Page 858, Windows Code Pages 1250 and 1251, and @@ -177,7 +180,7 @@ CONTENTS 2. PREBUILT C-KERMIT BINARIES - [ [74]Top ] [ [75]Contents ] [ [76]Next ] [ [77]Previous ] + [ [76]Top ] [ [77]Contents ] [ [78]Next ] [ [79]Previous ] It is often dangerous to run a binary C-Kermit (or any other) program built on a different computer. Particularly if that computer had a @@ -214,38 +217,38 @@ CONTENTS 3. NOTES ON SPECIFIC UNIX VERSIONS - [ [78]Top ] [ [79]Contents ] [ [80]Next ] [ [81]Previous ] + [ [80]Top ] [ [81]Contents ] [ [82]Next ] [ [83]Previous ] SECTION CONTENTS - 3.0. [82]C-KERMIT ON PC-BASED UNIXES - 3.1. [83]C-KERMIT AND AIX - 3.2. [84]C-KERMIT AND HP-UX - 3.3. [85]C-KERMIT AND LINUX - 3.4. [86]C-KERMIT AND NEXTSTEP - 3.5. [87]C-KERMIT AND QNX - 3.6. [88]C-KERMIT AND SCO - 3.7. [89]C-KERMIT AND SOLARIS - 3.8. [90]C-KERMIT AND SUNOS - 3.9. [91]C-KERMIT AND ULTRIX - 3.10. [92]C-KERMIT AND UNIXWARE - 3.11. [93]C-KERMIT AND APOLLO SR10 - 3.12. [94]C-KERMIT AND TANDY XENIX 3.0 - 3.13. [95]C-KERMIT AND OSF/1 (DIGITAL UNIX) (TRU64 UNIX) - 3.14. [96]C-KERMIT AND SGI IRIX - 3.15. [97]C-KERMIT AND THE BEBOX - 3.16. [98]C-KERMIT AND DG/UX - 3.17. [99]C-KERMIT AND SEQUENT DYNIX - 3.18. [100]C-KERMIT AND {FREE,OPEN,NET}BSD - 3.19. [101]C-KERMIT AND MAC OS X - 3.20. [102]C-KERMIT AND COHERENT + 3.0. [84]C-KERMIT ON PC-BASED UNIXES + 3.1. [85]C-KERMIT AND AIX + 3.2. [86]C-KERMIT AND HP-UX + 3.3. [87]C-KERMIT AND LINUX + 3.4. [88]C-KERMIT AND NEXTSTEP + 3.5. [89]C-KERMIT AND QNX + 3.6. [90]C-KERMIT AND SCO + 3.7. [91]C-KERMIT AND SOLARIS + 3.8. [92]C-KERMIT AND SUNOS + 3.9. [93]C-KERMIT AND ULTRIX + 3.10. [94]C-KERMIT AND UNIXWARE + 3.11. [95]C-KERMIT AND APOLLO SR10 + 3.12. [96]C-KERMIT AND TANDY XENIX 3.0 + 3.13. [97]C-KERMIT AND OSF/1 (DIGITAL UNIX) (TRU64 UNIX) + 3.14. [98]C-KERMIT AND SGI IRIX + 3.15. [99]C-KERMIT AND THE BEBOX + 3.16. [100]C-KERMIT AND DG/UX + 3.17. [101]C-KERMIT AND SEQUENT DYNIX + 3.18. [102]C-KERMIT AND {FREE,OPEN,NET}BSD + 3.19. [103]C-KERMIT AND MAC OS X + 3.20. [104]C-KERMIT AND COHERENT The following sections apply to specific Unix versions. Most of them contain references to FAQs (Frequently Asked Questions), but these tend to be ephemeral. For possibly more current information see: - [103]http://www.faqs.org - [104]http://aplawrence.com/Unixart/newtounix.html + [105]http://www.faqs.org + [106]http://aplawrence.com/Unixart/newtounix.html One thread that runs through many of them, and implicitly perhaps through all, concerns the problems that occur when trying to dial out @@ -254,7 +257,7 @@ CONTENTS gross, involving configuring the device for bidirectional use. This is done in a highly OS-dependent and often obscure manner, and the effects (good or evil) are also highly dependent on the particular OS (and - getty variety, etc). Many examples are given in the [105]OS-specific + getty variety, etc). Many examples are given in the [107]OS-specific sections below. An important point to keep in mind is that C-Kermit is a @@ -268,28 +271,28 @@ CONTENTS something on your particular Unix version, you might be right -- we can't claim to be expert in hundreds of different OS / version / hardware / library combinations. If you're a programmer, take a look at - the source code and [106]send us your suggested fixes or changes. Or - else just [107]send us a report about what seems to be wrong and we'll + the source code and [108]send us your suggested fixes or changes. Or + else just [109]send us a report about what seems to be wrong and we'll see what we can do. 3.0. C-KERMIT ON PC-BASED UNIXES - [ [108]Top ] [ [109]Contents ] [ [110]Section Contents ] [ [111]Next ] + [ [110]Top ] [ [111]Contents ] [ [112]Section Contents ] [ [113]Next ] - Also see: [112]http://www.pcunix.com/. + Also see: [114]http://www.pcunix.com/. SECTION CONTENTS - 3.0.1. [113]Interrupt Conflicts - 3.0.2. [114]Windows-Specific Hardware - 3.0.3. [115]Modems - 3.0.4. [116]Character Sets - 3.0.5. [117]Keyboard, Screen, and Mouse Access - 3.0.6. [118]Laptops + 3.0.1. [115]Interrupt Conflicts + 3.0.2. [116]Windows-Specific Hardware + 3.0.3. [117]Modems + 3.0.4. [118]Character Sets + 3.0.5. [119]Keyboard, Screen, and Mouse Access + 3.0.6. [120]Laptops 3.0.1. Interrupt Conflicts - [ [119]Top ] [ [120]Contents ] [ [121]Section Contents ] [ [122]Next ] + [ [121]Top ] [ [122]Contents ] [ [123]Section Contents ] [ [124]Next ] PCs are not the best platform for real operating systems like Unix. The architecture suffers from numerous deficiencies, not the least of which @@ -348,8 +351,8 @@ CONTENTS 3.0.2. Windows-Specific Hardware - [ [123]Top ] [ [124]Contents ] [ [125]Section Contents ] [ [126]Next ] - [ [127]Previous ] + [ [125]Top ] [ [126]Contents ] [ [127]Section Contents ] [ [128]Next ] + [ [129]Previous ] To complicate matters, the PC platform is becoming increasingly and inexorably Windows-oriented. More and more add-on devices are "Windows @@ -358,7 +361,7 @@ CONTENTS device itself to do. PCMCIA, PCI, or "Plug-n-Play" devices are rarely supported on PC-based Unix versions such as SCO; Winmodems, Winprinters, and the like are not supported on any Unix variety (with - [128]a few exceptions). The self-proclaimed Microsoft PC 97 (or later) + [130]a few exceptions). The self-proclaimed Microsoft PC 97 (or later) standard only makes matters worse since its only purpose to ensure that PCs are "optimized to run Windows 95 and Windows NT 4.0 and future versions of these operating systems". @@ -370,7 +373,7 @@ CONTENTS matter, all non-Windows operating systems) combined. If your version of Unix (SCO, Linux, BSDI, FreeBSD, etc) does not support a particular device, then C-Kermit can't use it either. C-Kermit, like any Unix - application, must accesss all devices through drivers and not directly + application, must access all devices through drivers and not directly because Unix is a real operating system. Don't waste time thinking that you, or anybody else, could write a @@ -387,7 +390,7 @@ CONTENTS "Legacy Free". One can only speculate what that could mean. Most likely it means it will ONLY run the very latest versions of Windows, and is made exclusively of Winmodems, Winprinters, Winmemory, and Win-CPU-fans - (Legacy Free is a concept [129]pioneered by Microsoft). + (Legacy Free is a concept [131]pioneered by Microsoft). Before you buy a new PC or add-on equipment, especially serial ports, internal modems, or printers, make sure they are compatible with your @@ -406,8 +409,8 @@ CONTENTS 3.0.3. Modems - [ [130]Top ] [ [131]Contents ] [ [132]Section Contents ] [ [133]Next ] - [ [134]Previous ] + [ [132]Top ] [ [133]Contents ] [ [134]Section Contents ] [ [135]Next ] + [ [136]Previous ] External modems are recommended: @@ -430,7 +433,7 @@ CONTENTS software will know how to control it.) For more about Unix compatible modems, see: - [135]http://www.idir.net/~gromitkc/winmodem.html + [137]http://www.idir.net/~gromitkc/winmodem.html Remember that PCs, even now -- more than two decades after they were first introduced -- are not (in general) capable of supporting more @@ -441,14 +444,14 @@ CONTENTS PnP in my computer bios. I was having IRQ conflicts between my serial mouse and 'com 3'. Both modems work fine for me. My first modem is ttyS0 and my second is ttyS1." Special third-party multiport boards - such as [136]DigiBoard are available for certain Unix platforms + such as [138]DigiBoard are available for certain Unix platforms (typically SCO, maybe Linux) that come with special platform-specific drivers. 3.0.4. Character Sets - [ [137]Top ] [ [138]Contents ] [ [139]Section Contents ] [ [140]Next ] - [ [141]Previous ] + [ [139]Top ] [ [140]Contents ] [ [141]Section Contents ] [ [142]Next ] + [ [143]Previous ] PCs generally have PC code pages such as CP437 or CP850, and these are often used by PC-based Unix operating systems, particularly on the @@ -476,8 +479,8 @@ CONTENTS 3.0.5. Keyboard, Screen, and Mouse Access - [ [142]Top ] [ [143]Contents ] [ [144]Section Contents ] [ [145]Next ] - [ [146]Previous ] + [ [144]Top ] [ [145]Contents ] [ [146]Section Contents ] [ [147]Next ] + [ [148]Previous ] Finally, note that as a real operating system, Unix (unlike Windows) does not provide the intimate connection to the PC keyboard, screen, @@ -490,46 +493,46 @@ CONTENTS b. Unix sessions can come from anywhere, not just the PC's own keyboard and screen; and: c. even though it might be possible for an application that actually - is running on the PC's keyboard and screen to accesss these devices + is running on the PC's keyboard and screen to access these devices directly, there are no APIs (outside of X) for this. 3.0.6. Laptops - [ [147]Top ] [ [148]Contents ] [ [149]Section Contents ] [ - [150]Previous ] + [ [149]Top ] [ [150]Contents ] [ [151]Section Contents ] [ + [152]Previous ] (To be filled in . . .) 3.1. C-KERMIT AND AIX - [ [151]Top ] [ [152]Contents ] [ [153]Section Contents ] [ [154]Next ] - [ [155]Previous ] + [ [153]Top ] [ [154]Contents ] [ [155]Section Contents ] [ [156]Next ] + [ [157]Previous ] SECTION CONTENTS - 3.1.1. [156]AIX: General - 3.1.2. [157]AIX: Network Connections - 3.1.3. [158]AIX: Serial Connections - 3.1.4. [159]AIX: File Transfer - 3.1.5. [160]AIX: Xterm Key Map + 3.1.1. [158]AIX: General + 3.1.2. [159]AIX: Network Connections + 3.1.3. [160]AIX: Serial Connections + 3.1.4. [161]AIX: File Transfer + 3.1.5. [162]AIX: Xterm Key Map For additional information see: - * [161]http://www.emerson.emory.edu/services/aix-faq/ - * [162]http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html - * [163]http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top + * [163]http://www.emerson.emory.edu/services/aix-faq/ + * [164]http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html + * [165]http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top .html - * [164]http://aixpdslib.seas.ucla.edu/ - * [165]http://www.rootvg.net (AIX history) - * [166]ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1 - * [167]ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/a + * [166]http://aixpdslib.seas.ucla.edu/ + * [167]http://www.rootvg.net (AIX history) + * [168]ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1 + * [169]ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/a ix - and/or read the [168]comp.unix.aix newsgroup. + and/or read the [170]comp.unix.aix newsgroup. ________________________________________________________________________ 3.1.1. AIX: General - [ [169]Top ] [ [170]Contents ] [ [171]Section Contents ] [ [172]Next ] + [ [171]Top ] [ [172]Contents ] [ [173]Section Contents ] [ [174]Next ] About AIX version numbers: "uname -a" tells the two-digit version number, such as 3.2 or 4.1. The three-digit form can be seen with the @@ -548,8 +551,8 @@ CONTENTS 3.1.2. AIX: Network Connections - [ [173]Top ] [ [174]Contents ] [ [175]Section Contents ] [ [176]Next ] - [ [177]Previous ] + [ [175]Top ] [ [176]Contents ] [ [177]Section Contents ] [ [178]Next ] + [ [179]Previous ] File transfers into AIX 4.2 or 4.3 through the AIX Telnet or Rlogin server have been observed to fail (or accumulate huge numbers of @@ -563,7 +566,7 @@ CONTENTS removed from the picture; e.g, by using "set host * 3000" on AIX. The problem can be completely cured by replacing the IBM Telnet server - with [178]MIT's Kerberos Telnet server -- even if you don't actually + with [180]MIT's Kerberos Telnet server -- even if you don't actually use the Kerberos part. Diagnosis: AIX pseudoterminals (which are controlled by the Telnet server to give you a login terminal for your session) have quirks that not even IBM knows about. The situation with @@ -625,15 +628,15 @@ CONTENTS 3.1.3. AIX: Serial Connections - [ [179]Top ] [ [180]Contents ] [ [181]Section Contents ] [ [182]Next ] - [ [183]Previous ] + [ [181]Top ] [ [182]Contents ] [ [183]Section Contents ] [ [184]Next ] + [ [185]Previous ] In AIX 3, 4, or 5, C-Kermit won't be able to "set line /dev/tty0" (or any other dialout device) if you haven't installed "cu" or "uucp" on your system, because installing these is what creates the UUCP lockfile - directory. If SET LINE commands always result in "Sorry, accesss to - lock denied", even when C-Kermit has been given the same owner, group, - and permissions as cu: + directory. If SET LINE commands always result in "Sorry, access to lock + denied", even when C-Kermit has been given the same owner, group, and + permissions as cu: -r-sr-xr-x 1 uucp uucp 67216 Jul 27 1999 cu @@ -719,7 +722,7 @@ CONTENTS /dev/tty, as opposed to a specify port device). 3. Fixes for bugs in the original AIX 4.2 tty (serial i/o) support and other AIX bugs are available from IBM at: - [184]http://service.software.ibm.com/rs6000/ + [186]http://service.software.ibm.com/rs6000/ Downloads -> Software Fixes -> Download FixDist gets an application for looking up known problems. @@ -735,8 +738,8 @@ CONTENTS 3.1.4. AIX: File Transfer - [ [185]Top ] [ [186]Contents ] [ [187]Section Contents ] [ [188]Next ] - [ [189]Previous ] + [ [187]Top ] [ [188]Contents ] [ [189]Section Contents ] [ [190]Next ] + [ [191]Previous ] Evidently AIX 4.3 (I don't know about earlier versions) does not allow open files to be overwritten. This can cause Kermit transfers to fail @@ -811,8 +814,8 @@ CONTENTS 3.1.5. AIX: Xterm Key Map - [ [190]Top ] [ [191]Contents ] [ [192]Section Contents ] [ - [193]Previous ] + [ [192]Top ] [ [193]Contents ] [ [194]Section Contents ] [ + [195]Previous ] Here is a sample configuration for setting up an xterm keyboard for VT220 or higher terminal emulation on AIX, courtesy of Bruce Momjian, @@ -879,21 +882,21 @@ CONTENTS 3.2. C-KERMIT AND HP-UX - [ [194]Top ] [ [195]Contents ] [ [196]Section Contents ] [ [197]Next ] - [ [198]Previous ] + [ [196]Top ] [ [197]Contents ] [ [198]Section Contents ] [ [199]Next ] + [ [200]Previous ] SECTION CONTENTS - 3.2.0. [199]Common Problems - 3.2.1. [200]Building C-Kermit on HP-UX - 3.2.2. [201]File Transfer - 3.2.3. [202]Dialing Out and UUCP Lockfiles in HP-UX - 3.2.4. [203]Notes on Specific HP-UX Releases - 3.2.5. [204]HP-UX and X.25 + 3.2.0. [201]Common Problems + 3.2.1. [202]Building C-Kermit on HP-UX + 3.2.2. [203]File Transfer + 3.2.3. [204]Dialing Out and UUCP Lockfiles in HP-UX + 3.2.4. [205]Notes on Specific HP-UX Releases + 3.2.5. [206]HP-UX and X.25 REFERENCES - For further information, read the [205]comp.sys.hp.hpux newsgroup. + For further information, read the [207]comp.sys.hp.hpux newsgroup. C-Kermit is included as part of the HP-UX operating system by contract between Hewlett Packard and Columbia University for HP-UX 10.00 and @@ -914,7 +917,7 @@ CONTENTS 3.2.0. Common Problems - [ [206]Top ] [ [207]Contents ] [ [208]Section Contents ] [ [209]Next ] + [ [208]Top ] [ [209]Contents ] [ [210]Section Contents ] [ [211]Next ] Some HP workstations have a BREAK/RESET key. If you hit this key while C-Kermit is running, it might kill or suspend the C-Kermit process. @@ -945,8 +948,8 @@ CONTENTS 3.2.1. Building C-Kermit on HP-UX - [ [210]Top ] [ [211]Contents ] [ [212]Section Contents ] [ [213]Next ] - [ [214]Previous ] + [ [212]Top ] [ [213]Contents ] [ [214]Section Contents ] [ [215]Next ] + [ [216]Previous ] This section applies mainly to old (pre-10.20) HP-UX version on old, slow, and/or memory-constrained hardware. @@ -975,7 +978,7 @@ CONTENTS The optimizing compiler might complain about "some optimizations skipped" on certain modules, due to lack of space available to the optimizer. You can increase the space (the incantation depends on the - particular compiler version -- see the [215]makefile), but doing so + particular compiler version -- see the [217]makefile), but doing so tends to make the compilations take a much longer time. For example, the "hpux0100o+" makefile target adds the "+Onolimit" compiler flag, and about an hour to the compile time on an HP-9000/730. But it *does* @@ -986,8 +989,8 @@ CONTENTS 3.2.2. File Transfer - [ [216]Top ] [ [217]Contents ] [ [218]Section Contents ] [ [219]Next ] - [ [220]Previous ] + [ [218]Top ] [ [219]Contents ] [ [220]Section Contents ] [ [221]Next ] + [ [222]Previous ] Telnet connections into HP-UX versions up to and including 11.11 (and possibly 11.20) tend not to lend themselves to file transfer due to @@ -1105,8 +1108,8 @@ CONTENTS 3.2.3. Dialing Out and UUCP Lockfiles in HP-UX - [ [221]Top ] [ [222]Contents ] [ [223]Section Contents ] [ [224]Next ] - [ [225]Previous ] + [ [223]Top ] [ [224]Contents ] [ [225]Section Contents ] [ [226]Next ] + [ [227]Previous ] HP workstations do not come with dialout devices configured; you have to do it yourself (as root). First look in /dev to see what's there; @@ -1177,9 +1180,9 @@ CONTENTS through a true null modem). Do not use the ttydp device for dialing out. - Kermit's accesss to serial devices is controlled by "UUCP lockfiles", + Kermit's access to serial devices is controlled by "UUCP lockfiles", which are intended to prevent different users using different software - programs (Kermit, cu, etc, and UUCP itself) from accesssing the same + programs (Kermit, cu, etc, and UUCP itself) from accessing the same serial device at the same time. When a device is in use by a particular user, a file with a special name is created in: @@ -1193,7 +1196,7 @@ CONTENTS installed setuid to the owner (bin) of the serial device and setgid to the group (daemon) of the /var/spool/locks directory. Kermit's setuid and setgid privileges are enabled only when opening the device and - accesssing the lockfiles. + accessing the lockfiles. Let's say "unit" means a string of decimal digits (the interface instance number) followed (in HP-UX 10.00 and later) by the letter "p" @@ -1224,7 +1227,7 @@ CONTENTS In other words, if the device name begins with "cu", a second lockfile for the "ttyd" device, same unit, is created, which should prevent - dialin accesss on that device. + dialin access on that device. The case allows for symbolic links, etc, but of course it is not foolproof since we have no way of telling which device is really @@ -1255,7 +1258,7 @@ CONTENTS When the "set line" command succeeds in HP-UX 10.00 and later, C-Kermit also creates a Unix System V R4 "advisory lock" as a further precaution - (but not guarantee) against any other process obtaining accesss to the + (but not guarantee) against any other process obtaining access to the device while you are using it. If the selected device was in use by "cu", Kermit can't open it, @@ -1310,17 +1313,17 @@ CONTENTS SECTION CONTENTS - 3.2.4.1. [226]HP-UX 11 - 3.2.4.2. [227]HP-UX 10 - 3.2.4.3. [228]HP-UX 9 - 3.2.4.4. [229]HP-UX 8 - 3.2.4.5. [230]HP-UX 7 and Earlier + 3.2.4.1. [228]HP-UX 11 + 3.2.4.2. [229]HP-UX 10 + 3.2.4.3. [230]HP-UX 9 + 3.2.4.4. [231]HP-UX 8 + 3.2.4.5. [232]HP-UX 7 and Earlier 3.2.4.1. HP-UX 11 - [ [231]Top ] [ [232]Contents ] [ [233]Section Contents ] [ [234]Next ] + [ [233]Top ] [ [234]Contents ] [ [235]Section Contents ] [ [236]Next ] - As noted in [235]Section 3.2.2, the HP-UX 11 Telnet server and/or + As noted in [237]Section 3.2.2, the HP-UX 11 Telnet server and/or pseudoterminal driver are a serious impediment to file transfer over Telnet connections into HP-UX. If you have a Telnet connection into HP-UX 11, tell your desktop Kermit program to: @@ -1354,8 +1357,8 @@ CONTENTS 3.2.4.2. HP-UX 10 - [ [236]Top ] [ [237]Contents ] [ [238]Section Contents ] [ [239]Next ] - [ [240]Previous ] + [ [238]Top ] [ [239]Contents ] [ [240]Section Contents ] [ [241]Next ] + [ [242]Previous ] Beginning in HP-UX 10.10, libcurses is linked to libxcurses, the new UNIX95 (X/Open) version of curses, which has some serious bugs; some @@ -1380,8 +1383,8 @@ CONTENTS 3.2.4.3. HP-UX 9 - [ [241]Top ] [ [242]Contents ] [ [243]Section Contents ] [ [244]Next ] - [ [245]Previous ] + [ [243]Top ] [ [244]Contents ] [ [245]Section Contents ] [ [246]Next ] + [ [247]Previous ] HP-UX 9.00 and 9.01 need patch PHNE_10572 (note: this replaces PHNE_3641) for hptt0.o, asio0.o, and ttycomn.o in libhp-ux.a. Contact @@ -1406,8 +1409,8 @@ CONTENTS 3.2.4.4. HP-UX 8 - [ [246]Top ] [ [247]Contents ] [ [248]Section Contents ] [ [249]Next ] - [ [250]Previous ] + [ [248]Top ] [ [249]Contents ] [ [250]Section Contents ] [ [251]Next ] + [ [252]Previous ] To make C-Kermit work on HP-UX 8.05 on a model 720, obtain and install HP-UX patch PHNE_0899. This patch deals with a lot of driver issues, @@ -1428,8 +1431,8 @@ CONTENTS 3.2.4.5. HP-UX 7 and Earlier - [ [251]Top ] [ [252]Contents ] [ [253]Section Contents ] [ - [254]Previous ] + [ [253]Top ] [ [254]Contents ] [ [255]Section Contents ] [ + [256]Previous ] When transferring files into HP-UX 5 or 6 over a Telnet connection, you must not use streaming, and you must not use a packet length greater @@ -1460,8 +1463,8 @@ CONTENTS 3.2.5. HP-UX and X.25 - [ [255]Top ] [ [256]Contents ] [ [257]Section Contents ] [ - [258]Previous ] + [ [257]Top ] [ [258]Contents ] [ [259]Section Contents ] [ + [260]Previous ] Although C-Kermit presently does not include built-in support for HP-UX X.25 (as it does for the Sun and IBM X.25 products), it can still be @@ -1477,17 +1480,17 @@ CONTENTS 3.3. C-KERMIT AND LINUX - [ [259]Top ] [ [260]Contents ] [ [261]Section Contents ] [ [262]Next ] - [ [263]Previous ] + [ [261]Top ] [ [262]Contents ] [ [263]Section Contents ] [ [264]Next ] + [ [265]Previous ] SECTION CONTENTS - 3.3.1. [264]Problems Building C-Kermit for Linux - 3.3.2. [265]Problems with Serial Devices in Linux - 3.3.3. [266]Terminal Emulation in Linux - 3.3.4. [267]Dates and Times - 3.3.5. [268]Startup Errors - 3.3.6. [269]The Fullscreen File Transfer Display + 3.3.1. [266]Problems Building C-Kermit for Linux + 3.3.2. [267]Problems with Serial Devices in Linux + 3.3.3. [268]Terminal Emulation in Linux + 3.3.4. [269]Dates and Times + 3.3.5. [270]Startup Errors + 3.3.6. [271]The Fullscreen File Transfer Display (August 2010) Reportedly C-Kermit packages for certain Linux distributions such as Centos and Ubuntu have certain features @@ -1505,7 +1508,7 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) This is not Kermit Project code. Turns out to be something in glibc's resolver, and can be fixed by changing /etc/nsswitch.conf, - but it might break other software, such as [270]Avahi or anything + but it might break other software, such as [272]Avahi or anything (such as Gnome, Java, or Cups) that depends on it. I'm not sure where it happens; I don't think Kermit tries to get its IP address at startup time, only when it's needed or asked for, e.g. when @@ -1513,50 +1516,50 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) REFERENCES - For further information, read the [271]comp.os.linux.misc, - [272]comp.os.linux.answers, and other Linux-oriented newsgroups, and + For further information, read the [273]comp.os.linux.misc, + [274]comp.os.linux.answers, and other Linux-oriented newsgroups, and see: The Linux Document Project (LDP) - [273]http://www.tldp.org/ + [275]http://www.tldp.org/ The Linux FAQ - [274]http://www.tldp.org/FAQ/Linux-FAQ.html + [276]http://www.tldp.org/FAQ/Linux-FAQ.html The Linux HOWTOs (especially the Serial HOWTO) - [275]http://www.tldp.org/HOWTO/Serial-HOWTO.html + [277]http://www.tldp.org/HOWTO/Serial-HOWTO.html - [276]http://tldp.org/HOWTO/Modem-HOWTO.html + [278]http://tldp.org/HOWTO/Modem-HOWTO.html - [277]ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO + [279]ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO - [278]ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO + [280]ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO - [279]http://www.tldp.org/HOWTO/ + [281]http://www.tldp.org/HOWTO/ - [280]http://www.tldp.org/hmirrors.html + [282]http://www.tldp.org/hmirrors.html Linux Vendor Tech Support Pages: - [281]http://www.redhat.com/apps/support/ + [283]http://www.redhat.com/apps/support/ - [282]http://www.debian.org/support + [284]http://www.debian.org/support - [283]http://www.slackware.com/support/ + [285]http://www.slackware.com/support/ - [284]http://www.caldera.com/support/ + [286]http://www.caldera.com/support/ - [285]SUSE Linux Support + [287]SUSE Linux Support - [286]http://www.mandrake.com/support/ + [288]http://www.mandrake.com/support/ - [287]http://www.turbolinux.com/support/ + [289]http://www.turbolinux.com/support/ Linux Winmodem Support - [288]http://www.linmodems.org/ + [290]http://www.linmodems.org/ - Also see general comments on PC-based Unixes in [289]Section 3.0. + Also see general comments on PC-based Unixes in [291]Section 3.0. What Linux version is it? -- "uname -a" supplies only kernel information, but these days it's the distribution that matters: Red Hat @@ -1570,17 +1573,17 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) Did you know: DECnet is available for Linux? See: - [290]http://linux.dreamtime.org/decnet/ + [292]http://linux.dreamtime.org/decnet/ (But there is no support for it in C-Kermit -- anybody interested in - adding it, please [291]let me know). + adding it, please [293]let me know). Before proceeding, let's handle the some of the most frequently asked question in the Linux newsgroups: 1. Neither C-Kermit nor any other Linux application can use Winmodems, - except in the [292]rare cases where Linux drivers have been written - for them. See [293]Section 3.0.2 for details. + except in the [294]rare cases where Linux drivers have been written + for them. See [295]Section 3.0.2 for details. 2. "Why does it take such a long time to make a telnet connection to (or from) my Linux PC?" (this applies to C-Kermit and to regular Telnet). Most telnet servers these days perform reverse DNS lookups @@ -1602,9 +1605,9 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) thought to be secure, whereas Telnet is thought to be insecure. This is true for clear-text Telnet (because passwords travel in the clear across the network), but apparently few people realize that - [294]secure Telnet clients and servers have been available for + [296]secure Telnet clients and servers have been available for years, and these are more secure than SSH (for reasons explained - [295]HERE). + [297]HERE). 4. (Any question that has the word "FTP" in it...) The knee-jerk reaction being "Don't use FTP, use SCP!" (or SFTP). Same answer as above, but moreso. SCP and SFTP are not only not platform neutral, @@ -1618,7 +1621,7 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) 3.3.1. Problems Building C-Kermit for Linux - [ [296]Top ] [ [297]Contents ] [ [298]Section Contents ] [ [299]Next ] + [ [298]Top ] [ [299]Contents ] [ [300]Section Contents ] [ [301]Next ] Modern Linux distributions like Red Hat give you a choice at installation whether to include "developer tools". Obviously, you can't @@ -1645,17 +1648,17 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) 3.3.2. Problems with Serial Devices in Linux - [ [300]Top ] [ [301]Contents ] [ [302]Section Contents ] [ [303]Next ] - [ [304]Previous ] + [ [302]Top ] [ [303]Contents ] [ [304]Section Contents ] [ [305]Next ] + [ [306]Previous ] Also see: "man setserial", "man irqtune". - And: [305]Sections 3.0, [306]6, [307]7, and [308]8 of this document. + And: [307]Sections 3.0, [308]6, [309]7, and [310]8 of this document. NOTE: Red Hat Linux 7.2 and later include a new API that allows serial-port arbitration by non-setuid/gid programs. This API has not yet been added to C-Kermit. If C-Kermit is to be used for dialing out on Red Hat 7.2 or later, it must still be installed as described - in in Sections [309]10 and [310]11 of the [311]Installation + in in Sections [311]10 and [312]11 of the [313]Installation Instructions. Don't expect it to be easy. Queries like the following are posted to @@ -1684,7 +1687,7 @@ write(3, "RESOLVE-ADDRESS 255.255.255.255\n", 32) setserial -g /dev/cua1 tells me that the uart is 'unknown'. I have tried setting the UART - manullay via. setserial to 16550A, 16550, and the other one (8550?) + manually via. setserial to 16550A, 16550, and the other one (8550?) (I didn't try 16540). None of these manual settings resulted in any success. @@ -1735,7 +1738,7 @@ $ cat /proc/interrupts 15: 6 XT-PIC ide1 Watch out for PCI, PCMCIA and Plug-n-Play devices, Winmodems, and the - like (see cautions in [312]Section 3.0 Linux supports Plug-n-Play + like (see cautions in [314]Section 3.0 Linux supports Plug-n-Play devices to some degree via the isapnp and pnpdump programs; read the man pages for them. (If you don't have them, look on your installation CD for isapnptool or download it from sunsite or a sunsite mirror or @@ -1810,7 +1813,7 @@ $ cat /proc/interrupts will phase (have phased) it out in favor of the ttyS device. See (if it's still there): - [313]http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html + [315]http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html (no, of course it isn't; you'll have to use your imagination). One user reported that C-Kermit 7.0, when built with egcs 1.1.2 and run on Linux @@ -1831,11 +1834,11 @@ $ cat /proc/interrupts 3.3.3. Terminal Emulation in Linux - [ [314]Top ] [ [315]Contents ] [ [316]Section Contents ] [ [317]Next ] - [ [318]Previous ] + [ [316]Top ] [ [317]Contents ] [ [318]Section Contents ] [ [319]Next ] + [ [320]Previous ] C-Kermit is not a terminal emulator. For a brief explanation of why - not, see [319]Section 3.0.5. For a fuller explanation, [320]ClICK HERE. + not, see [321]Section 3.0.5. For a fuller explanation, [322]ClICK HERE. In Unix, terminal emulation is supplied by the Window in which you run Kermit: the regular console screen, which provides Linux Console @@ -1843,7 +1846,7 @@ $ cat /proc/interrupts xterm window, which gives VTxxx emulation. An xterm that includes color ANSI and VT220 emulation is available with Xfree86: - [321]http://dickey.his.com/xterm/xterm.html + [323]http://dickey.his.com/xterm/xterm.html Before starting C-Kermit in an xterm window, you might need to tell the xterm window's shell to "stty sane". @@ -1878,13 +1881,13 @@ $ cat /proc/interrupts Console-mode keys are mapped separately using loadkeys, and different keycodes are used. Find out what they are with showkey. - For a much more complete VT220/320 key mapping for [322]Xfree86 xterm, - [323]CLICK HERE. + For a much more complete VT220/320 key mapping for [324]Xfree86 xterm, + [325]CLICK HERE. 3.3.4. Dates and Times - [ [324]Top ] [ [325]Contents ] [ [326]Section Contents ] [ [327]Next ] - [ [328]Previous ] + [ [326]Top ] [ [327]Contents ] [ [328]Section Contents ] [ [329]Next ] + [ [330]Previous ] If C-Kermit's date-time (e.g. as shown by its DATE command) differs from the system's date and time: @@ -1897,8 +1900,8 @@ $ cat /proc/interrupts 3.3.5. Startup Errors - [ [329]Top ] [ [330]Contents ] [ [331]Section Contents ] [ [332]Next ] - [ [333]Previous ] + [ [331]Top ] [ [332]Contents ] [ [333]Section Contents ] [ [334]Next ] + [ [335]Previous ] C-Kermit should work on all versions of Linux current through March 2003, provided it was built on the same version you have, with the same @@ -1908,8 +1911,8 @@ $ cat /proc/interrupts C-Kermit binary will not stop working at a later date, since Linux tends to change out from under its applications. If that happens, rebuild C-Kermit from source. If something goes wrong with the build - process, look on the [334]C-Kermit website for a newer version. If you - have the latest version, then [335]report the problem to us. + process, look on the [336]C-Kermit website for a newer version. If you + have the latest version, then [337]report the problem to us. Inability to transfer files in Red Hat 7.2: the typical symptom would be if you start Kermit and tell it to RECEIVE, it fails right away with @@ -1927,7 +1930,7 @@ $ cat /proc/interrupts assigning a controlling TTY for the session, which would make most use of "/dev/tty" somewhat less than useful. - [336]http://www.redhat.com/support/errata/RHBA-2001-153.html + [338]http://www.redhat.com/support/errata/RHBA-2001-153.html Quoting: "Due to terminal handling problems in /bin/login, tcsh would not find the controlling terminal correctly, and a shell in single user @@ -1939,7 +1942,7 @@ $ cat /proc/interrupts Kermit RPM for Red Hat Linux, not working; either it won't start at all, or it gives error messages about "terminal type unknown" and refuses to initialize its curses support. The following is from the - [337]Kermit newsgroup: + [339]Kermit newsgroup: From: rchandra@hal9000.buf.servtech.com Newsgroups: comp.protocols.kermit.misc @@ -1977,7 +1980,7 @@ $ cat /proc/interrupts ln -s /usr/share/terminfo /usr/lib/terminfo So what this says is that the terminfo database/directory structure - can be accesssed by either path. When something goes to reference + can be accessed by either path. When something goes to reference /usr/lib/terminfo, the symlink redirects it to essentially /usr/share/terminfo, which is where it really resides on your system. I personally prefer wherever possible to use relative @@ -1991,8 +1994,8 @@ $ cat /proc/interrupts 3.3.6. The Fullscreen File Transfer Display - [ [338]Top ] [ [339]Contents ] [ [340]Section Contents ] [ - [341]Previous ] + [ [340]Top ] [ [341]Contents ] [ [342]Section Contents ] [ + [343]Previous ] Starting with ncurses versions dated 1998-12-12 (about a year before ncurses 5.0), ncurses sets the terminal for buffered i/o, but @@ -2019,8 +2022,8 @@ $ cat /proc/interrupts 3.4. C-KERMIT AND NEXTSTEP - [ [342]Top ] [ [343]Contents ] [ [344]Section Contents ] [ [345]Next ] - [ [346]Previous ] + [ [344]Top ] [ [345]Contents ] [ [346]Section Contents ] [ [347]Next ] + [ [348]Previous ] Run C-Kermit in a Terminal, Stuart, or xterm window, or when logged in remotely through a serial port or TELNET connection. C-Kermit does not @@ -2077,10 +2080,10 @@ $ cat /proc/interrupts 3.5. C-KERMIT AND QNX - [ [347]Top ] [ [348]Contents ] [ [349]Section Contents ] [ [350]Next ] - [ [351]Previous ] + [ [349]Top ] [ [350]Contents ] [ [351]Section Contents ] [ [352]Next ] + [ [353]Previous ] - See also: The [352]comp.os.qnx newsgroup. + See also: The [354]comp.os.qnx newsgroup. Support for QNX 4.x was added in C-Kermit 5A(190). This is a full-function implementation, thoroughly tested on QNX 4.21 and later, @@ -2089,7 +2092,7 @@ $ cat /proc/interrupts successfully (after stripping most most features, I succeeded in getting it to compile and link without complaint, but the executable just beeps when you run it); for 16-bit QNX 4.2x, use C-Kermit 6.0 or - earlier, or else [353]G-Kermit. + earlier, or else [355]G-Kermit. The 32-bit version (and the 16-bit version prior to C-Kermit 7.0) supports most of C-Kermit's advanced features including TCP/IP, high @@ -2118,8 +2121,8 @@ $ cat /proc/interrupts UUCP line locking. If you have a UUCP product installed on your QNX system, remove the -DNOUUCP switch from the makefile entry and rebuild. Then check to see that Kermit's UUCP lockfile conventions are the same - as those of your UUCP package; if not, read the [354]UUCP lockfile - section of the [355]Installation Instructions and make the necessary + as those of your UUCP package; if not, read the [356]UUCP lockfile + section of the [357]Installation Instructions and make the necessary changes to the makefile entry (e.g. add -DHDBUUCP). QNX does, however, allow a program to get the device open count. This @@ -2145,62 +2148,62 @@ $ cat /proc/interrupts 3.6. C-KERMIT AND SCO - [ [356]Top ] [ [357]Contents ] [ [358]Section Contents ] [ [359]Next ] - [ [360]Previous ] + [ [358]Top ] [ [359]Contents ] [ [360]Section Contents ] [ [361]Next ] + [ [362]Previous ] SECTION CONTENTS -3.6.1. [361]SCO XENIX -3.6.2. [362]SCO UNIX and OSR5 -3.6.3. [363]Unixware -3.6.4. [364]Open UNIX 8 +3.6.1. [363]SCO XENIX +3.6.2. [364]SCO UNIX and OSR5 +3.6.3. [365]Unixware +3.6.4. [366]Open UNIX 8 REFERENCES * The comp.unix.sco.* newsgroups. - * [365]Section 3.10 below for Unixware. + * [367]Section 3.10 below for Unixware. * The following FAQs: The comp.sco.misc FAQ: - [366]http://aplawrence.com/SCOFAQ/ + [368]http://aplawrence.com/SCOFAQ/ Caldera (SCO) comp.unix.sco.programmer FAQ: - [367]http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl + [369]http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl The UnixWare 7/OpenUNIX 8 FAQ: - [368]http://www.zenez.com/cgi-bin/scouw7faq/faq.pl - [369]http://zenez.pcunix.com/cgi-bin/scouw7faq/faq.pl + [370]http://www.zenez.com/cgi-bin/scouw7faq/faq.pl + [371]http://zenez.pcunix.com/cgi-bin/scouw7faq/faq.pl High Speed Modems for SCO Unix: - [370]http://pcunix.com/Unixart/modems.html + [372]http://pcunix.com/Unixart/modems.html The UnixWare FAQ - [371]http://www.freebird.org/faq/ + [373]http://www.freebird.org/faq/ The UnixWare 1.x and 2.0 Programmer FAQ - [372]http://www.freebird.org/faq/developer.html + [374]http://www.freebird.org/faq/developer.html Caldera Support Knowledge Base - [373]http://support.caldera.com/caldera + [375]http://support.caldera.com/caldera - [374]http://stage.caldera.com/ta/ + [376]http://stage.caldera.com/ta/ Caldera (SCO) Technical Article Search Center - [375]http://aplawrence.com/newtosco.html + [377]http://aplawrence.com/newtosco.html New to SCO (Tony Lawrence) The same comments regarding terminal emulation and key mapping apply to SCO operating systems as to all other Unixes. C-Kermit is not a terminal emulator, and you can't use it to map F-keys, Arrow keys, etc. The way to do this is with xmodmap (xterm) or loadkeys (console). For a - brief explanation, see [376]Section 3.0.5. For a fuller explanation, - [377]ClICK HERE. + brief explanation, see [378]Section 3.0.5. For a fuller explanation, + [379]ClICK HERE. - Also see general comments on PC-based Unixes in [378]Section 3.0. + Also see general comments on PC-based Unixes in [380]Section 3.0. 3.6.1. SCO XENIX - [ [379]Top ] [ [380]Contents ] [ [381]Section Contents ] [ [382]Next ] + [ [381]Top ] [ [382]Contents ] [ [383]Section Contents ] [ [384]Next ] Old Xenix versions... Did you know: Xenix 3.0 is *older* than Xenix 2.0? @@ -2209,7 +2212,7 @@ $ cat /proc/interrupts DTR to hang up a modem does not work. DTR goes down but does not come up again. Workaround: Use SET MODEM HANGUP-METHOD MODEM-COMMAND. Anybody who would like to fix this is welcome to take a look at - tthang() in [383]ckutio.c. Also: modem signals can not be read in + tthang() in [385]ckutio.c. Also: modem signals can not be read in Xenix, and the maximum serial speed is 38400. There is all sorts of confusion among SCO versions, particularly when @@ -2222,15 +2225,15 @@ $ cat /proc/interrupts Xenix 2.3.0 and later claim to support RTSFLOW and CTSFLOW, but this is not modern bidirectional hardware flow control; rather it implements the original RS-232 meanings of these signals for unidirectional - half-duplex line accesss: If both RTSFLOW and CTSFLOW bits are set, + half-duplex line access: If both RTSFLOW and CTSFLOW bits are set, Xenix asserts RTS when it wants to send data and waits for CTS assertion before it actually starts sending data (also, reportedly, even this is broken in Xenix 2.3.0 and 2.3.1). 3.6.2. SCO UNIX AND OSR5 - [ [384]Top ] [ [385]Contents ] [ [386]Section Contents ] [ [387]Next ] - [ [388]Previous ] + [ [386]Top ] [ [387]Contents ] [ [388]Section Contents ] [ [389]Next ] + [ [390]Previous ] SCO systems tend to use different names (i.e. drivers) for the same device. Typically /dev/tty1a refers to a terminal device that has no @@ -2262,7 +2265,7 @@ $ cat /proc/interrupts using third-party drivers. (Example: hardware flow control works, reportedly, only on uppercase device like tty1A -- not tty1a -- and only when CLOCAL is clear when using the SCO sio driver, but there are - no such restrictions in, e.g., [389]Digiboard drivers). + no such restrictions in, e.g., [391]Digiboard drivers). One user reports that he can't transfer large files with C-Kermit under SCO OSR5.0.0 and 5.0.4 -- after the first 5K, everything falls apart. @@ -2270,7 +2273,7 @@ $ cat /proc/interrupts Later, he said that replacing SCO's SIO driver with FAS, an alternative communications driver, made the problem go away: - [390]ftp://ftp.fu-berlin.de/pub/unix/driver/fas + [392]ftp://ftp.fu-berlin.de/pub/unix/driver/fas With regard to bidirectional serial ports on OpenServer 5.0.4, the following advice appeared on an SCO-related newsgroup: @@ -2305,14 +2308,14 @@ $ cat /proc/interrupts One SCO user of C-Kermit 5A(190) reported that only one copy of Kermit can run at a time when a Stallion Technologies multiport boards are - installed. Cause, cure, and present status unknown (see [391]Section 14 + installed. Cause, cure, and present status unknown (see [393]Section 14 for more info regarding Stallion). Prior to SCO OpenServer 5.0.4, the highest serial port speed supported by SCO was 38400. However, in some SCO versions (e.g. OSR5) it is possible to map rarely-used lower speeds (like 600 and 1800) to higher ones like 57600 and 115200. To find out how, go to - [392]http://www.sco.com/ and search for "115200". In OSR5.0.4, serial + [394]http://www.sco.com/ and search for "115200". In OSR5.0.4, serial speeds up to 921600 are supported through the POSIX interface; C-Kermit 6.1.193 or later, when built for OSR5.0.4 using /bin/cc (NOT the UDK, which hides the high-speed definitions from CPP), supports these @@ -2335,7 +2338,7 @@ $ cat /proc/interrupts SCO OpenServer Release 5.0.4 or later SCO Internet FastStart Release 1.0.0 or later - SCO supplements are at [393]ftp://ftp.sco.com/; the "rs40" series are + SCO supplements are at [395]ftp://ftp.sco.com/; the "rs40" series are under directory /Supplements/internet Kermit includes the high serial speeds in all OSR5 builds, but that @@ -2388,11 +2391,11 @@ $ cat /proc/interrupts 3.6.3. Unixware - [ [394]Top ] [ [395]Contents ] [ [396]Section Contents ] [ [397]Next ] - [ [398]Previous ] + [ [396]Top ] [ [397]Contents ] [ [398]Section Contents ] [ [399]Next ] + [ [400]Previous ] Unixware changed hands several times before landing at SCO, and so has - its [399]own section in this document. (Briefly: AT&T UNIX Systems + its [401]own section in this document. (Briefly: AT&T UNIX Systems Laboratories sold the rights to the UNIX name and to System V R4 (or R5?) to Novell; later Novell spun its UNIX division off into a new company called Univel, which eventually was bought by SCO, which later @@ -2400,8 +2403,8 @@ $ cat /proc/interrupts 3.6.4. Open UNIX 8 - [ [400]Top ] [ [401]Contents ] [ [402]Section Contents ] [ - [403]Previous ] + [ [402]Top ] [ [403]Contents ] [ [404]Section Contents ] [ + [405]Previous ] SCO was bought by Caldera in 2000 or 2001 and evolved Unixware 7.1 into Caldera Open UNIX 8.00. It's just like Unixware 7.1 as far as Kermit is @@ -2413,47 +2416,47 @@ $ cat /proc/interrupts 3.7. C-KERMIT AND SOLARIS - [ [404]Top ] [ [405]Contents ] [ [406]Section Contents ] [ [407]Next ] - [ [408]Previous ] + [ [406]Top ] [ [407]Contents ] [ [408]Section Contents ] [ [409]Next ] + [ [410]Previous ] SECTION CONTENTS -3.7.1. [409]Serial Port Configuration -3.7.2. [410]Serial Port Problems -3.7.3. [411]SunLink X.25 -3.7.4. [412]Sun Workstation Keyboard Mapping -3.7.5. [413]Solaris 2.4 and Earlier +3.7.1. [411]Serial Port Configuration +3.7.2. [412]Serial Port Problems +3.7.3. [413]SunLink X.25 +3.7.4. [414]Sun Workstation Keyboard Mapping +3.7.5. [415]Solaris 2.4 and Earlier REFERENCES - * The [414]comp.unix.solaris newsgroup - * [415]http://accesss1.sun.com/ - * [416]http://docs.sun.com/ - * [417]http://www.sunhelp.com/ - * [418]http://www.wins.uva.nl/pub/solaris/solaris2/ - * [419]http://www.wins.uva.nl/cgi-bin/sfaq.cgi - * [420]ftp://ftp.wins.uva.nl/pub/solaris - * [421]http://www.science.uva.nl/pub/solaris/solaris2.html + * The [416]comp.unix.solaris newsgroup + * [417]http://access1.sun.com/ + * [418]http://docs.sun.com/ + * [419]http://www.sunhelp.com/ + * [420]http://www.wins.uva.nl/pub/solaris/solaris2/ + * [421]http://www.wins.uva.nl/cgi-bin/sfaq.cgi + * [422]ftp://ftp.wins.uva.nl/pub/solaris + * [423]http://www.science.uva.nl/pub/solaris/solaris2.html And about serial communications in particular, see "Celeste's Tutorial on Solaris 2.x Modems and Terminals": - [422]http://www.stokely.com/ + [424]http://www.stokely.com/ In particular: - [423]http://www.stokely.com/unix.sysadm.resources/faqs.sun.html + [425]http://www.stokely.com/unix.sysadm.resources/faqs.sun.html For PC-based Solaris, also see general comments on PC-based Unixes in - [424]Section 3.0. Don't expect Solaris or any other kind of Unix to + [426]Section 3.0. Don't expect Solaris or any other kind of Unix to work right on a PC until you resolve all interrupt conflicts. Don't expect to be able to use COM3 or COM4 (or even COM2) until you have configured their addresses and interrupts. 3.7.1. Serial Port Configuration - [ [425]Top ] [ [426]Contents ] [ [427]Section Contents ] [ [428]Section - Contents ] [ [429]Next ] + [ [427]Top ] [ [428]Contents ] [ [429]Section Contents ] [ [430]Section + Contents ] [ [431]Next ] Your serial port can't be used -- or at least won't work right -- until it is enabled in Solaris. For example, you get a message like "SERIAL: @@ -2501,8 +2504,8 @@ $ cat /proc/interrupts 3.7.2. Serial Port Problems - [ [430]Top ] [ [431]Contents ] [ [432]Section Contents ] [ [433]Next ] - [ [434]Previous ] + [ [432]Top ] [ [433]Contents ] [ [434]Section Contents ] [ [435]Next ] + [ [436]Previous ] Current advice from Sun is to always the /dev/cua/x devices for dialing out, rather than the /dev/term/x. Nevertheless, if you have trouble @@ -2515,8 +2518,8 @@ $ cat /proc/interrupts 3.7.3. SunLink X.25 - [ [435]Top ] [ [436]Contents ] [ [437]Section Contents ] [ [438]Next ] - [ [439]Previous ] + [ [437]Top ] [ [438]Contents ] [ [439]Section Contents ] [ [440]Next ] + [ [441]Previous ] The built-in SunLink X.25 support for Solaris 2.3/2.4./25 and SunLink 8.01 or 9.00 works OK provided the X.25 system has been installed and @@ -2556,11 +2559,11 @@ $ cat /proc/interrupts 3.7.4. Sun Workstation Keyboard Mapping - [ [440]Top ] [ [441]Contents ] [ [442]Section Contents ] [ [443]Next ] - [ [444]Previous ] + [ [442]Top ] [ [443]Contents ] [ [444]Section Contents ] [ [445]Next ] + [ [446]Previous ] Hints for using a Sun workstation keyboard for VT emulation when - accesssing VMS, from the [445]comp.os.vms newsgroup: + accessing VMS, from the [447]comp.os.vms newsgroup: From: Jerry Leichter Newsgroups: comp.os.vms @@ -2636,8 +2639,8 @@ $ cat /proc/interrupts 3.7.5. Solaris PPP Connections - [ [446]Top ] [ [447]Contents ] [ [448]Section Contents ] [ [449]Next ] - [ [450]Previous ] + [ [448]Top ] [ [449]Contents ] [ [450]Section Contents ] [ [451]Next ] + [ [452]Previous ] The following is a report from a user of C-Kermit 8.0 on Solaris 8 and 9, who had complained that while Kermit file transfers worked perfectly @@ -2682,8 +2685,8 @@ $ cat /proc/interrupts 3.7.6. Solaris 2.4 and Earlier - [ [451]Top ] [ [452]Contents ] [ [453]Section Contents ] [ - [454]Previous ] + [ [453]Top ] [ [454]Contents ] [ [455]Section Contents ] [ + [456]Previous ] C-Kermit can't be compiled successfully under Solaris 2.3 using SUNWspro cc 2.0.1 unless at least some of the following patches are @@ -2816,22 +2819,22 @@ $ cat /proc/interrupts 3.8. C-KERMIT AND SUNOS - [ [455]Top ] [ [456]Contents ] [ [457]Section Contents ] [ [458]Next ] - [ [459]Previous ] + [ [457]Top ] [ [458]Contents ] [ [459]Section Contents ] [ [460]Next ] + [ [461]Previous ] For additional information, see "Celeste's Tutorial on SunOS 4.1.3+ Modems and Terminals": - [460]http://www.stokely.com/ + [462]http://www.stokely.com/ For FAQs, etc, from Sun, see: - * [461]http://accesss1.sun.com/ + * [463]http://access1.sun.com/ For history of Sun models and SunOS versions, see (should be all the same): - * [462]http://www.ludd.luth.se/~bear/project/sun/sun.hardware.txt - * [463]ftp://ftp.netcom.com/pub/ru/rubicon/sun.hdwr.ref - * [464]ftp://ftp.intnet.net/pub/SUN/Sun-Hardware-Ref + * [464]http://www.ludd.luth.se/~bear/project/sun/sun.hardware.txt + * [465]ftp://ftp.netcom.com/pub/ru/rubicon/sun.hdwr.ref + * [466]ftp://ftp.intnet.net/pub/SUN/Sun-Hardware-Ref Sun SPARCstation users should read the section "Setting up Modem Software" in the Desktop SPARC Sun System & Network Manager's Guide. If @@ -2907,10 +2910,10 @@ $ cat /proc/interrupts 3.9. C-KERMIT AND ULTRIX - [ [465]Top ] [ [466]Contents ] [ [467]Section Contents ] [ [468]Next ] - [ [469]Previous ] + [ [467]Top ] [ [468]Contents ] [ [469]Section Contents ] [ [470]Next ] + [ [471]Previous ] - See also: The [470]comp.unix.ultrix and [471]comp.sys.dec newsgroups. + See also: The [472]comp.unix.ultrix and [473]comp.sys.dec newsgroups. There is no hardware flow control in Ultrix. That's not a Kermit deficiency, but an Ultrix one. @@ -2951,18 +2954,18 @@ $ cat /proc/interrupts 3.10. C-KERMIT AND UNIXWARE - [ [472]Top ] [ [473]Contents ] [ [474]Section Contents ] [ [475]Next ] - [ [476]Previous ] + [ [474]Top ] [ [475]Contents ] [ [476]Section Contents ] [ [477]Next ] + [ [478]Previous ] See also: * The Freebird Project (Unixware software repository) - [477]http://www.freebird.org/ - * The UnixWare FAQ: [478]http://www.freebird.org/faq/ + [479]http://www.freebird.org/ + * The UnixWare FAQ: [480]http://www.freebird.org/faq/ * The following newsgroups: - + [479]comp.unix.unixware.misc - + [480]comp.unix.sco.misc. + + [481]comp.unix.unixware.misc + + [482]comp.unix.sco.misc. - Also see general comments on PC-based Unixes in [481]Section 3.0. By + Also see general comments on PC-based Unixes in [483]Section 3.0. By the way, this section is separate from the SCO (Caldera) section because at the time this section was started, Unixware was owned by a company called Univel. Later it was sold to Novell, and then to SCO. @@ -3000,13 +3003,13 @@ $ cat /proc/interrupts HOWEVER, turning on POSIX features engages all of the "#if (!_POSIX_SOURCE)" clauses in the UnixWare header files, which in turn - prevent us from having modem signals, accesss to the hardware flow + prevent us from having modem signals, access to the hardware flow control APIs, select(), etc -- in short, all the other things we need in communications software, especially when high speeds are used. Oh the irony. And so C-Kermit must be shamelessly butchered -- as it has been so many times before -- to allow us to have the needed features from the POSIX and non-POSIX worlds. See the UNIXWAREPOSIX sections of - [482]ckutio.c. + [484]ckutio.c. After the butchery, we wind up with Unixware 2.x having full modem-signal capability, but politically-correct Unixware 7.x lacking @@ -3064,8 +3067,8 @@ $ cat /proc/interrupts 3.11. C-KERMIT AND APOLLO SR10 - [ [483]Top ] [ [484]Contents ] [ [485]Section Contents ] [ [486]Next ] - [ [487]Previous ] + [ [485]Top ] [ [486]Contents ] [ [487]Section Contents ] [ [488]Next ] + [ [489]Previous ] Reportedly, version 5A(190), when built under Apollo SR10 using "make sr10-bsd", compiles, links, and executes OK, but leaves the terminal @@ -3079,8 +3082,8 @@ $ cat /proc/interrupts 3.12. C-KERMIT AND TANDY XENIX 3.0 - [ [488]Top ] [ [489]Contents ] [ [490]Section Contents ] [ [491]Next ] - [ [492]Previous ] + [ [490]Top ] [ [491]Contents ] [ [492]Section Contents ] [ [493]Next ] + [ [494]Previous ] C-Kermit 7.0 was too big to be built on Tandy Xenix, even in a minimum configuration; version 6.0 is the last one that fits. @@ -3096,8 +3099,8 @@ $ cat /proc/interrupts 3.13. C-KERMIT AND OSF/1 (DIGITAL UNIX) (TRU64 UNIX) - [ [493]Top ] [ [494]Contents ] [ [495]Section Contents ] [ [496]Next ] - [ [497]Previous ] + [ [495]Top ] [ [496]Contents ] [ [497]Section Contents ] [ [498]Next ] + [ [499]Previous ] While putting together and testing C-Kermit 8.0, it was discovered that binaries built for one version of Tru64 Unix (e.g. 4.0G) might exhibit @@ -3137,8 +3140,8 @@ $ cat /proc/interrupts Digital Unix 3.2 evidently wants to believe your terminal is one line longer than you say it is, e.g. when a "more" or "man" command is given. This is has nothing to do with C-Kermit, but tends to annoy - those who use Kermit or other terminal emulators to accesss Digital - Unix systems. Workaround: tell Unix to "stty rows 23" (or whatever). + those who use Kermit or other terminal emulators to access Digital Unix + systems. Workaround: tell Unix to "stty rows 23" (or whatever). Reportedly, there is some bizarre behavior when trying to use a version of C-Kermit built on one Digital Unix 4.0 system on another one, @@ -3159,15 +3162,15 @@ $ cat /proc/interrupts 3.14. C-KERMIT AND SGI IRIX - [ [498]Top ] [ [499]Contents ] [ [500]Section Contents ] [ [501]Next ] - [ [502]Previous ] + [ [500]Top ] [ [501]Contents ] [ [502]Section Contents ] [ [503]Next ] + [ [504]Previous ] See also: - * The [503]comp.sys.sgi.misc and [504]comp.sys.sgi.admin newsgroups. - [505]The SGI website + * The [505]comp.sys.sgi.misc and [506]comp.sys.sgi.admin newsgroups. + [507]The SGI website * The SGI FAQ: - + [506]http://www-viz.tamu.edu/~sgi-faq/ - + [507]ftp://viz.tamu.edu/pub/sgi/faq/ + + [508]http://www-viz.tamu.edu/~sgi-faq/ + + [509]ftp://viz.tamu.edu/pub/sgi/faq/ About IRIX version numbers: "uname -a" tells the "two-digit" version number, such as "5.3" or "6.5". The three-digit form can be seen with @@ -3185,7 +3188,7 @@ $ cat /proc/interrupts MIPS3 R4x00 MIPS4 R5000 and above - Furthermore, there are different Application Binary Inferfaces (ABIs): + Furthermore, there are different Application Binary Interfaces (ABIs): COFF 32 bits, IRIX 5.3, 5.2, 5.1, 4.x and below o32 ELF 32 bits, IRIX 5.3, 6.0 - 6.5 @@ -3244,26 +3247,26 @@ $ cat /proc/interrupts that they do not trap SIGTSTP themselves, so the shell is doing the suspending rather than the application. - Also see notes about IRIX 3.x in the [508]C-Kermit for Unix + Also see notes about IRIX 3.x in the [510]C-Kermit for Unix Installation Instructions. If you have problems making TCP/IP connections in versions of IRIX built with GCC 2.95.2, see the bugs section of: - [509]http://freeware.sgi.com/Installable/gcc-2.95.2.html. + [511]http://freeware.sgi.com/Installable/gcc-2.95.2.html. Reportedly, if you allow gcc to compile C-Kermit on Irix you should be aware that there might be problems with some of the network code. The specifics are at - [510]http://freeware.sgi.com/Installable/gcc-2.95.2.html; scroll down + [512]http://freeware.sgi.com/Installable/gcc-2.95.2.html; scroll down to the "known bugs" section at the end of the document. 3.15. C-KERMIT AND THE BEBOX - [ [511]Top ] [ [512]Contents ] [ [513]Section Contents ] [ [514]Next ] - [ [515]Previous ] + [ [513]Top ] [ [514]Contents ] [ [515]Section Contents ] [ [516]Next ] + [ [517]Previous ] - See also: The [516]comp.sys.be newsgroup. + See also: The [518]comp.sys.be newsgroup. The BeBox has been discontinued and BeOS repositioned for PC platforms. The POSIX parts of BeOS are not finished, nor is the sockets library, @@ -3305,8 +3308,8 @@ $ cat /proc/interrupts 3.16. C-KERMIT AND DG/UX - [ [517]Top ] [ [518]Contents ] [ [519]Section Contents ] [ [520]Next ] - [ [521]Previous ] + [ [519]Top ] [ [520]Contents ] [ [521]Section Contents ] [ [522]Next ] + [ [523]Previous ] Somebody downloaded the C-Kermit 6.0 binary built under DG/UX 5.40 and ran it under DG/UX 5.4R3.10 -- it worked OK except that file dates for @@ -3316,8 +3319,8 @@ $ cat /proc/interrupts 3.17. C-KERMIT AND SEQUENT DYNIX - [ [522]Top ] [ [523]Contents ] [ [524]Section Contents ] [ [525]Next ] - [ [526]Previous ] + [ [524]Top ] [ [525]Contents ] [ [526]Section Contents ] [ [527]Next ] + [ [528]Previous ] Reportedly, when coming into a Sequent Unix (DYNIX) system through an X.25 connection, Kermit doesn't work right because the Sequent's @@ -3329,8 +3332,8 @@ $ cat /proc/interrupts 3.18. C-KERMIT AND FREEBSD, OPENBSD, and NETBSD - [ [527]Top ] [ [528]Contents ] [ [529]Section Contents ] [ [530]Next ] - [ [531]Previous ] + [ [529]Top ] [ [530]Contents ] [ [531]Section Contents ] [ [532]Next ] + [ [533]Previous ] Some NebBSD users have reported difficulty escaping back from CONNECT mode, usually when running NetBSD on non-PC hardware. Probably a @@ -3344,8 +3347,8 @@ $ cat /proc/interrupts 3.19. C-KERMIT AND MAC OS X - [ [532]Top ] [ [533]Contents ] [ [534]Section Contents ] [ [535]Next ] - [ [536]Previous ] + [ [534]Top ] [ [535]Contents ] [ [536]Section Contents ] [ [537]Next ] + [ [538]Previous ] Mac OS X is Apple's 4.4BSD Unix variety, closely related to FreeBSD, but different. "uname -a" is singularly uninformative, as in Linux, @@ -3386,7 +3389,7 @@ $ cat /proc/interrupts I doubt that C-Kermit does anything useful with them. There is no code in C-Kermit for traditional two-forked Macintosh files, but it could be added if there is any demand (code for this existed in - [537]Mac Kermit, the old pre-Mac-OS-X Macintosh version of + [539]Mac Kermit, the old pre-Mac-OS-X Macintosh version of C-Kermit). * In case you want to transfer a traditional Macintosh text file (or data fork of a file that is plain text), you can use these C-Kermit @@ -3401,7 +3404,7 @@ send /text filename * Mac OS X can use a third-party package manager called "fink". Various fink packages for C-Kermit are floating around that are not standard releases. For example, there's a C-Kermit 8.0.201 package - in which C-Kermit was modifed (at least) to use a UUCP lockfile + in which C-Kermit was modified (at least) to use a UUCP lockfile directory that does not exist on vanilla Mac OS X systems. Mac OS X and Serial Ports @@ -3416,7 +3419,7 @@ Mac OS X and Serial Ports equipment, and scientific, medical, and lab equipment (to name a few). Among workers in these areas, there is a need to add serial ports back onto this platform, which is being filled by third-party products such - as the [538]Keyspan High Speed USB Serial Adapter USA-19HS, which has a + as the [540]Keyspan High Speed USB Serial Adapter USA-19HS, which has a DB-9 male connector. To use the Keyspan device, you must install the accompanying device drivers, which winds up giving you serial ports with names like /dev/cu.USA19H3b1P1.1, /dev/cu.KeySerial1, @@ -3431,7 +3434,7 @@ Mac OS X Serial Ports with C-Kermit 8.0 and earlier In earlier versions of C-Kermit, you'll need to either build a special -DNOUUCP version, or deal with the UUCP port contention sytem in - [539]all its glory (this is usually an exercise in futility because any + [541]all its glory (this is usually an exercise in futility because any other applications on your Mac that use the serial port will not necessarily follow the same conventions): @@ -3440,7 +3443,7 @@ Mac OS X Serial Ports with C-Kermit 8.0 and earlier chmod g+w /var/spool/lock chgrp xxxx /dev/cu.* (where xxxx is the name of the group for users to whom serial-port - accesss is to be granted). Use "admin" or other existing group, or + access is to be granted). Use "admin" or other existing group, or create a new group if desired. NB: In the absence of official guidance from Apple or anyone else, we @@ -3448,8 +3451,7 @@ Mac OS X Serial Ports with C-Kermit 8.0 and earlier directory (a) already exists on vanilla Mac OS X installations, and (b) it is the directory used for serial-port lockfiles on many other platforms. - 2. Put all users who need accesss to the serial port in the same - group. + 2. Put all users who need access to the serial port in the same group. 3. Make sure the serial device files that are to be used by C-Kermit have group read-write permission and (if you care) lack world read-write permission, e.g.: @@ -3463,7 +3465,7 @@ chmod 775 wermit mv wermit /usr/local/kermit (or whatever spot is more appropriate, e.g. /usr/bin/). For greater - detail about installation, [540]CLICK HERE. + detail about installation, [542]CLICK HERE. Alternatively, to build a pre-9.0 version of C-Kermit without UUCP lockfile support, set the NOUUCP flag; e.g. (for Mac OS 10.4): @@ -3473,7 +3475,7 @@ mv wermit /usr/local/kermit This circumvents the SET PORT failure "?Access to lockfile directory denied". But it also sacrifices Kermit's ability to ensure that only one copy of Kermit can have the device open at a time, since Mac OS X - is the same as all other varieties of Unix in that exclusive accesss to + is the same as all other varieties of Unix in that exclusive access to serial ports is not enforced in any way. But if it's for your own desktop machine that nobody else uses, a -DNOUUCP version might be adequate and preferable to the alternatives. @@ -3493,7 +3495,7 @@ RS-232 versus RS-422 they do not have enough wires (or more properly in the case RS-422/423, wire pairs) to convey a useful subset of modem signals. - Keyspan also sells a [541]USB Twin Serial Adapter that gives you two + Keyspan also sells a [543]USB Twin Serial Adapter that gives you two Mini-Din8 RS-422 ports, that are no better (or worse) for communicating with modems or serial devices than a real Mac Din-8 port was. In essence, you get Data In, Data Out, and two modem signals. It looks to @@ -3522,16 +3524,16 @@ C-Kermit> connect Instructions for the built-in modem (if any) remain to be written due to lack of knowledge. If you can contribute instructions, hints, or - tips, please [542]send them in. + tips, please [544]send them in. 3.20. C-KERMIT AND COHERENT - [ [543]Top ] [ [544]Contents ] [ [545]Section Contents ] [ - [546]Previous ] + [ [545]Top ] [ [546]Contents ] [ [547]Section Contents ] [ + [548]Previous ] Also see: - [547]http://www.uni-giessen.de/faq/archiv/coherent-faq.general/msg000 + [549]http://www.uni-giessen.de/faq/archiv/coherent-faq.general/msg000 00.html Mark Williams COHERENT was perhaps the first commercial Unix-based @@ -3555,7 +3557,7 @@ C-Kermit> connect 4. GENERAL UNIX-SPECIFIC HINTS, LIMITATIONS, AND BUGS - [ [548]Top ] [ [549]Contents ] [ [550]Next ] [ [551]Previous ] + [ [550]Top ] [ [551]Contents ] [ [552]Next ] [ [553]Previous ] 4.1. Modem Signals @@ -3608,7 +3610,7 @@ C-Kermit> connect switches, such as -x to put it in server mode) into the shell field of the /etc/passwd file. This works pretty well. In some cases, for "ultimate security", you might want to use a version built with - -DNOPUSH (see the [552]Configurations Options document for this, but + -DNOPUSH (see the [554]Configurations Options document for this, but even if you don't, then PUSHing or shelling out from C-Kermit just brings up a new copy of C-Kermit (but warning: this does not prevent the user from explicitly running a shell; e.g. "run /bin/sh"; use @@ -3703,7 +3705,7 @@ C-Kermit> connect platform ranging from very fast to very flow. SSH and PTY commands can fail if (a) all pseudoterminals are in use; or - (b) you do not have read/write accesss to the pseudoterminal that was + (b) you do not have read/write access to the pseudoterminal that was assigned. An example of (b) was reported with the Zipslack Slackware Linux distribution, in which the pseudoterminals were created with crw-r--r-- permission, instead of crw-rw-rw-. @@ -3728,11 +3730,11 @@ C-Kermit> connect 5. INITIALIZATION AND COMMAND FILES - [ [553]Top ] [ [554]Contents ] [ [555]Next ] [ [556]Previous ] + [ [555]Top ] [ [556]Contents ] [ [557]Next ] [ [558]Previous ] C-Kermit's initialization file for Unix is .kermrc (lowercase, starts with period) in your home directory, unless Kermit was built with the - system-wide initialization-file option (see the [557]C-Kermit for Unix + system-wide initialization-file option (see the [559]C-Kermit for Unix Installation Instructions). C-Kermit identifies your home directory based on the environment @@ -3795,7 +3797,7 @@ C-Kermit> connect 6. COMMUNICATION SPEED SELECTION - [ [558]Top ] [ [559]Contents ] [ [560]Next ] [ [561]Previous ] + [ [560]Top ] [ [561]Contents ] [ [562]Next ] [ [563]Previous ] Version-7 based Unix implementations, including 4.3 BSD and earlier and Unix systems based upon BSD, use a 4-bit field to record a serial @@ -3881,12 +3883,12 @@ C-Kermit> connect speed, and then the software must also be told to change to the new, higher speed. - For additional information, read [562]Section 9.5 of the Installation - Instructions, plus any platform-specific notes in [563]Section 3 above. + For additional information, read [564]Section 9.5 of the Installation + Instructions, plus any platform-specific notes in [565]Section 3 above. 7. COMMUNICATIONS AND DIALING - [ [564]Top ] [ [565]Contents ] [ [566]Next ] [ [567]Previous ] + [ [566]Top ] [ [567]Contents ] [ [568]Next ] [ [569]Previous ] 7.1. Serial Ports and Modems @@ -3969,9 +3971,9 @@ C-Kermit> connect 5. If MODEM HANGUP-METHOD is set to RS232-SIGNAL, change it to MODEM-COMMAND. Or vice-versa. 6. Try SET DIAL HANGUP OFF before the DIAL command. Also, SET DIAL - DISPLAY ON to watch what's happening. See [568]Section 8 of the - [569]Installation Instructions. - 7. Read pages 50-67 of [570]Using C-Kermit. + DISPLAY ON to watch what's happening. See [570]Section 8 of the + [571]Installation Instructions. + 7. Read pages 50-67 of [572]Using C-Kermit. 8. As a last resort, don't use the DIAL command at all; SET CARRIER OFF and CONNECT to the modem and dial interactively, or write a script program to dial the modem. @@ -3995,7 +3997,7 @@ C-Kermit> connect 8-bit data and Xon/Xoff flow control at the same time. However, as of edit 174, this code is entirely disabled because it is unreliable: even though the host operating system might (or might not) support LPASS8 - mode correctly, the host accesss protocols (terminal servers, telnet, + mode correctly, the host access protocols (terminal servers, telnet, rlogin, etc) generally have no way of finding out about it and therefore render it ineffective, causing file transfer failures. So as of edit 174, Kermit once again uses rawmode for 8-bit data, and so @@ -4083,7 +4085,7 @@ C-Kermit> connect hang up the connection when your computer drops the DTR signal. So before deciding Kermit doesn't work with your modem, check your modem configuration AND the cable (if any) connecting your modem to the - computer -- it should be a straight-through [571]modem cable conducting + computer -- it should be a straight-through [573]modem cable conducting the signals FG, SG, TD, RD, RTS, CTS, DSR, DTR, CD, and RI. Many Unix systems keep aliases for dialout devices; for example, @@ -4107,7 +4109,7 @@ C-Kermit> connect C-Kermit tries to use the 8th bit for data when parity is NONE, and this generally works on real Unix terminal (tty) devices, but it often - does not work when the Unix system is accesssed over a network via + does not work when the Unix system is accessed over a network via telnet or rlogin protocols, including (in many cases) through terminal servers. For example, an Encore computer with Annex terminal servers only gives a 7-bit path if the rlogin protocol is selected in the @@ -4124,7 +4126,7 @@ C-Kermit> connect 8. HARDWARE FLOW CONTROL - [ [572]Top ] [ [573]Contents ] [ [574]Next ] [ [575]Previous ] + [ [574]Top ] [ [575]Contents ] [ [576]Next ] [ [577]Previous ] SET FLOW RTS/CTS is available in Unix C-Kermit only when the underlying operating system provides an Application Program Interface (API) for @@ -4177,9 +4179,9 @@ C-Kermit> connect 9. TERMINAL CONNECTION AND KEY MAPPING - [ [576]Top ] [ [577]Contents ] [ [578]Next ] [ [579]Previous ] + [ [578]Top ] [ [579]Contents ] [ [580]Next ] [ [581]Previous ] - C-Kermit is not a terminal emulator. Refer to page 147 of [580]Using + C-Kermit is not a terminal emulator. Refer to page 147 of [582]Using C-Kermit, 2nd Edition: "Most versions of C-Kermit -- Unix, VMS, AOS/VS, VOS, etc -- provide terminal connection without emulation. These versions act as a 'semitransparent pipe' between the remote computer @@ -4190,12 +4192,12 @@ C-Kermit> connect If you are an X Windows user, you should be aware of an alternative to xterm that supports VT220 emulation, from Thomas E. Dickey: - [581]http://dickey.his.com/xterm/xterm.html + [583]http://dickey.his.com/xterm/xterm.html Unix C-Kermit's SET KEY command currently can not be used with keys that generate "wide" scan codes or multibyte sequences, such as workstation function or arrow keys, because Unix C-Kermit does not have - direct accesss to the keyboard. + direct access to the keyboard. However, many Unix workstations and/or console drivers provide their own key mapping feature. With xterm, for example, you can use 'xmodmap' @@ -4236,7 +4238,7 @@ C-Kermit> connect 10. FILE TRANSFER - [ [582]Top ] [ [583]Contents ] [ [584]Next ] [ [585]Previous ] + [ [584]Top ] [ [585]Contents ] [ [586]Next ] [ [587]Previous ] On most platforms, C-Kermit can not handle files longer than 2^31 or 2^32 bytes long, because it uses the traditional file i/o APIs that use @@ -4368,12 +4370,12 @@ C-Kermit> connect 11. EXTERNAL FILE TRANSFER PROTOCOLS - [ [586]Top ] [ [587]Contents ] [ [588]Next ] [ [589]Previous ] + [ [588]Top ] [ [589]Contents ] [ [590]Next ] [ [591]Previous ] SECTION CONTENTS - 11.1. [590]C-Kermit as an External Protocol - 11.2. [591]Invoking External Protocols from C-Kermit + 11.1. [592]C-Kermit as an External Protocol + 11.2. [593]Invoking External Protocols from C-Kermit Unix C-Kermit can be used in conjunction with other communications software in various ways. C-Kermit can be invoked from another @@ -4393,9 +4395,9 @@ C-Kermit> connect 11.1. C-KERMIT AS AN EXTERNAL PROTOCOL - [ [592]Top ] [ [593]Contents ] [ [594]Section Contents ] [ [595]Next ] + [ [594]Top ] [ [595]Contents ] [ [596]Section Contents ] [ [597]Next ] - (This section deleted; see [596]Using C-Kermit, 2nd Ed, Chapter 14.) + (This section deleted; see [598]Using C-Kermit, 2nd Ed, Chapter 14.) "pcomm" is a general-purpose terminal program that provides file transfer capabilities itself (X- and YMODEM variations) and the ability @@ -4427,7 +4429,7 @@ C-Kermit> connect Here's another example, for Seyon (a Linux communication program). First try the technique above. If that works, fine; otherwise... If - Seyon does not give you a way to accesss and pass along the file + Seyon does not give you a way to access and pass along the file descriptor, but it starts up the Kermit program with its standard i/o redirected to its (Seyon's) communications file descriptor, you can also experiment with the following method, which worked here in brief @@ -4457,11 +4459,11 @@ C-Kermit> connect 11.2. INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT - [ [597]Top ] [ [598]Contents ] [ [599]Section Contents ] [ - [600]Previous ] + [ [599]Top ] [ [600]Contents ] [ [601]Section Contents ] [ + [602]Previous ] (This section is obsolete, but not totally useless. See Chapter 14 - of [601]Using C-Kermit, 2nd Edition). + of [603]Using C-Kermit, 2nd Edition). After you have opened a communication link with C-Kermit's SET LINE (SET PORT) or SET HOST (TELNET) command, C-Kermit makes its file @@ -4520,15 +4522,15 @@ C-Kermit> connect 12. SECURITY - [ [602]Top ] [ [603]Contents ] [ [604]Next ] [ [605]Previous ] + [ [604]Top ] [ [605]Contents ] [ [606]Next ] [ [607]Previous ] As of version 7.0, C-Kermit supports a wide range of security options for authentication and encryption: Kerberos 4, Kerberos 5 / GSSAPI, - SSL/TLS, and SRP. See the separate [606]security document for details. + SSL/TLS, and SRP. See the separate [608]security document for details. 13. MISCELLANEOUS USER REPORTS - [ [607]Top ] [ [608]Contents ] [ [609]Next ] [ [610]Previous ] + [ [609]Top ] [ [610]Contents ] [ [611]Next ] [ [612]Previous ] Date: Thu, 12 Mar 92 1:59:25 MEZ From: Walter Mecky @@ -4572,7 +4574,7 @@ main() { > You must set line > Not a tty > No more processes. -> One of the following three actions clears the peoblem: +> One of the following three actions clears the problem: > shutdown -y -g0 -i6 > kill -9 the ttymon with the highest PID > Invoke sysadm and disable then enable the line you want to use. @@ -4594,7 +4596,7 @@ main() { We have successfully compiled the above release on a Unisys/Sperry 5000/95. We used the sys5r3 option, rather than sys5r2 since we have - VR3 running on our system. In order to allow dialout accesss to + VR3 running on our system. In order to allow dialout access to non-superusers, we had to do "chmod 666 /dev/tty###, where it had been -rw--w--w- (owned by uucp), and to do "chmod +w /usr/spool/locks". We have done text and binary file transfers through local and remote @@ -4648,7 +4650,7 @@ int argc; char *argv[]; { #ifdef DEBUG fprintf(stderr, "LOCKFILE? %s?\n", lockdev); #endif - if (accesss(lockdev, 00) == 0) { + if (access(lockdev, 00) == 0) { allow=TTY_LOCK; break; } @@ -4683,7 +4685,7 @@ int argc; char *argv[]; { 14. THIRD-PARTY DRIVERS - [ [611]Top ] [ [612]Contents ] [ [613]Next ] [ [614]Previous ] + [ [613]Top ] [ [614]Contents ] [ [615]Next ] [ [616]Previous ] Unix versions, especially those for PCs (SCO, Unixware, etc) might be augmented by third-party communication-board drivers from Digiboard, @@ -4709,7 +4711,7 @@ int argc; char *argv[]; { the rest are supported. This will, as I mentioned earlier, be fixed in the next release of our ATA software." - World Wide Escalation Support, Stallion Technologies, Toowong - QLD, [615]support@stallion.oz.au. + QLD, [617]support@stallion.oz.au. Later (December 1997, from the same source): @@ -4721,15 +4723,15 @@ int argc; char *argv[]; { as the early revision of the EasyIO card and the EasyConnection 8D4 panel, and as always asserted on those cards that do not support the DSR signal in the hardware. The new driver is available from - our Web site, [616]www.stallion.com, in the /drivers/ata5/UnixWare + our Web site, [618]www.stallion.com, in the /drivers/ata5/UnixWare directory. - [ [617]Top ] [ [618]Contents ] [ [619]C-Kermit Home ] [ [620]C-Kermit - 8.0 Overview ] [ [621]Kermit Home ] + [ [619]Top ] [ [620]Contents ] [ [621]C-Kermit Home ] [ [622]C-Kermit + 8.0 Overview ] [ [623]Kermit Home ] __________________________________________________________________ - C-Kermit 8.0 Unix Hints and Tips / [622]The Kermit Project / - [623]Columbia University / [624]kermit@columbia.edu + C-Kermit 8.0 Unix Hints and Tips / [624]The Kermit Project / + [625]Columbia University / [626]kermit@columbia.edu References @@ -4747,613 +4749,615 @@ References 12. http://www.columbia.edu/ 13. http://www.columbia.edu/kermit/ckubwr.html 14. http://www.columbia.edu/kermit/ckdaily.html - 15. http://www.columbia.edu/kermit/ckermit.html - 16. http://www.columbia.edu/kermit/ckuins.html - 17. http://www.columbia.edu/kermit/ckututor.html - 18. http://www.columbia.edu/kermit/ckubwr.html#x1 - 19. http://www.columbia.edu/kermit/ckubwr.html#x2 - 20. http://www.columbia.edu/kermit/ckubwr.html#x3 - 21. http://www.columbia.edu/kermit/ckubwr.html#x4 - 22. http://www.columbia.edu/kermit/ckubwr.html#x5 - 23. http://www.columbia.edu/kermit/ckubwr.html#x6 - 24. http://www.columbia.edu/kermit/ckubwr.html#x7 - 25. http://www.columbia.edu/kermit/ckubwr.html#x8 - 26. http://www.columbia.edu/kermit/ckubwr.html#x9 - 27. http://www.columbia.edu/kermit/ckubwr.html#x10 - 28. http://www.columbia.edu/kermit/ckubwr.html#x11 - 29. http://www.columbia.edu/kermit/ckubwr.html#x12 - 30. http://www.columbia.edu/kermit/ckubwr.html#x13 - 31. http://www.columbia.edu/kermit/ckubwr.html#x14 - 32. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 33. http://www.columbia.edu/kermit/ckubwr.html#x3.18 - 34. http://www.columbia.edu/kermit/ckubwr.html#x3.19 - 35. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 36. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 37. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 38. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 39. http://www.columbia.edu/kermit/ckubwr.html#top - 40. http://www.columbia.edu/kermit/ckubwr.html#contents - 41. http://www.columbia.edu/kermit/ckubwr.html#x2 - 42. http://www.columbia.edu/kermit/ckubwr.html#x1.1 - 43. http://www.columbia.edu/kermit/ckubwr.html#x1.2 - 44. http://www.columbia.edu/kermit/ckubwr.html#x1.3 - 45. http://www.columbia.edu/kermit/ckubwr.html#x1.4 - 46. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 47. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 48. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 49. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 50. http://www.columbia.edu/kermit/ckcbwr.html - 51. mailto:kermit-support@columbia.edu - 52. http://www.columbia.edu/kermit/ckubwr.html#top - 53. http://www.columbia.edu/kermit/ckubwr.html#contents - 54. http://www.columbia.edu/kermit/ckubwr.html#x1.2 - 55. http://www.columbia.edu/kermit/ck60manual.html - 56. http://www.columbia.edu/kermit/ckermit70.html - 57. http://www.columbia.edu/kermit/ckermit80.html - 58. http://www.columbia.edu/kermit/ckermit90.html - 59. http://www.columbia.edu/kermit/ckubwr.html#top - 60. http://www.columbia.edu/kermit/ckubwr.html#contents - 61. http://www.columbia.edu/kermit/ckubwr.html#x1 - 62. http://www.columbia.edu/kermit/ckubwr.html#x1.3 - 63. http://www.columbia.edu/kermit/ckubwr.html#x1.1 - 64. http://www.columbia.edu/kermit/support.html - 65. http://www.columbia.edu/kermit/ckubwr.html#top - 66. http://www.columbia.edu/kermit/ckubwr.html#contents - 67. http://www.columbia.edu/kermit/ckubwr.html#x1 - 68. http://www.columbia.edu/kermit/ckubwr.html#x1.4 - 69. http://www.columbia.edu/kermit/ckubwr.html#x1.2 - 70. http://www.columbia.edu/kermit/ckubwr.html#top - 71. http://www.columbia.edu/kermit/ckubwr.html#contents - 72. http://www.columbia.edu/kermit/ckubwr.html#x1 - 73. http://www.columbia.edu/kermit/ckubwr.html#x1.3 - 74. http://www.columbia.edu/kermit/ckubwr.html#top - 75. http://www.columbia.edu/kermit/ckubwr.html#contents - 76. http://www.columbia.edu/kermit/ckubwr.html#x3 - 77. http://www.columbia.edu/kermit/ckubwr.html#x1 - 78. http://www.columbia.edu/kermit/ckubwr.html#top - 79. http://www.columbia.edu/kermit/ckubwr.html#contents - 80. http://www.columbia.edu/kermit/ckubwr.html#x4 - 81. http://www.columbia.edu/kermit/ckubwr.html#x2 - 82. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 83. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 84. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 85. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 86. http://www.columbia.edu/kermit/ckubwr.html#x3.4 - 87. http://www.columbia.edu/kermit/ckubwr.html#x3.5 - 88. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 89. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 90. http://www.columbia.edu/kermit/ckubwr.html#x3.8 - 91. http://www.columbia.edu/kermit/ckubwr.html#x3.9 - 92. http://www.columbia.edu/kermit/ckubwr.html#x3.10 - 93. http://www.columbia.edu/kermit/ckubwr.html#x3.11 - 94. http://www.columbia.edu/kermit/ckubwr.html#x3.12 - 95. http://www.columbia.edu/kermit/ckubwr.html#x3.13 - 96. http://www.columbia.edu/kermit/ckubwr.html#x3.14 - 97. http://www.columbia.edu/kermit/ckubwr.html#x3.15 - 98. http://www.columbia.edu/kermit/ckubwr.html#x3.16 - 99. http://www.columbia.edu/kermit/ckubwr.html#x3.17 - 100. http://www.columbia.edu/kermit/ckubwr.html#x3.18 - 101. http://www.columbia.edu/kermit/ckubwr.html#x3.19 - 102. http://www.columbia.edu/kermit/ckubwr.html#x3.20 - 103. http://www.faqs.org/ - 104. http://aplawrence.com/Unixart/newtounix.html - 105. http://www.columbia.edu/kermit/ckubwr.html#x3 - 106. mailto:kermit-support@columbia.edu - 107. http://www.columbia.edu/kermit/support.html - 108. http://www.columbia.edu/kermit/ckubwr.html#top - 109. http://www.columbia.edu/kermit/ckubwr.html#contents - 110. http://www.columbia.edu/kermit/ckubwr.html#x3 - 111. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 112. http://www.pcunix.com/ - 113. http://www.columbia.edu/kermit/ckubwr.html#x3.0.1 - 114. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 - 115. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3 - 116. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4 - 117. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 - 118. http://www.columbia.edu/kermit/ckubwr.html#x3.0.6 - 119. http://www.columbia.edu/kermit/ckubwr.html#top - 120. http://www.columbia.edu/kermit/ckubwr.html#contents - 121. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 122. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 - 123. http://www.columbia.edu/kermit/ckubwr.html#top - 124. http://www.columbia.edu/kermit/ckubwr.html#contents - 125. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 126. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3 - 127. http://www.columbia.edu/kermit/ckubwr.html#x3.0.1 - 128. http://www.linmodems.org/ - 129. http://www.microsoft.com/hwdev/platform/PCdesign/LR/default.asp - 130. http://www.columbia.edu/kermit/ckubwr.html#top - 131. http://www.columbia.edu/kermit/ckubwr.html#contents - 132. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 133. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4 - 134. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 - 135. http://www.idir.net/~gromitkc/winmodem.html - 136. http://www.digi.com/ - 137. http://www.columbia.edu/kermit/ckubwr.html#top - 138. http://www.columbia.edu/kermit/ckubwr.html#contents - 139. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 140. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 - 141. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3 - 142. http://www.columbia.edu/kermit/ckubwr.html#top - 143. http://www.columbia.edu/kermit/ckubwr.html#contents - 144. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 145. http://www.columbia.edu/kermit/ckubwr.html#x3.0.6 - 146. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4 - 147. http://www.columbia.edu/kermit/ckubwr.html#top - 148. http://www.columbia.edu/kermit/ckubwr.html#contents - 149. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 150. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 - 151. http://www.columbia.edu/kermit/ckubwr.html#top - 152. http://www.columbia.edu/kermit/ckubwr.html#contents - 153. http://www.columbia.edu/kermit/ckubwr.html#x3 - 154. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 155. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 156. http://www.columbia.edu/kermit/ckubwr.html#x3.1.1 - 157. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2 - 158. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3 - 159. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4 - 160. http://www.columbia.edu/kermit/ckubwr.html#x3.1.5 - 161. http://www.emerson.emory.edu/services/aix-faq/ - 162. http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html - 163. http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top.html - 164. http://aixpdslib.seas.ucla.edu/ - 165. http://www.rootvg.net(AIXhistory)/ - 166. ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1 - 167. ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/aix - 168. news:comp.unix.aix - 169. http://www.columbia.edu/kermit/ckubwr.html#top - 170. http://www.columbia.edu/kermit/ckubwr.html#contents - 171. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 172. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2 - 173. http://www.columbia.edu/kermit/ckubwr.html#top - 174. http://www.columbia.edu/kermit/ckubwr.html#contents - 175. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 176. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3 - 177. http://www.columbia.edu/kermit/ckubwr.html#x3.1.1 - 178. http://www.columbia.edu/kermit/security.html#servers - 179. http://www.columbia.edu/kermit/ckubwr.html#top - 180. http://www.columbia.edu/kermit/ckubwr.html#contents - 181. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 182. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4 - 183. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2 - 184. http://service.software.ibm.com/rs6000/ - 185. http://www.columbia.edu/kermit/ckubwr.html#top - 186. http://www.columbia.edu/kermit/ckubwr.html#contents - 187. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 188. http://www.columbia.edu/kermit/ckubwr.html#x3.1.5 - 189. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3 - 190. http://www.columbia.edu/kermit/ckubwr.html#top - 191. http://www.columbia.edu/kermit/ckubwr.html#contents - 192. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 193. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4 - 194. http://www.columbia.edu/kermit/ckubwr.html#top - 195. http://www.columbia.edu/kermit/ckubwr.html#contents - 196. http://www.columbia.edu/kermit/ckubwr.html#x3 - 197. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 198. http://www.columbia.edu/kermit/ckubwr.html#x3.1 - 199. http://www.columbia.edu/kermit/ckubwr.html#x3.2.0 - 200. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1 - 201. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 - 202. http://www.columbia.edu/kermit/ckubwr.html#x3.2.3 - 203. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 204. http://www.columbia.edu/kermit/ckubwr.html#x3.2.5 - 205. news:comp.sys.hp.hpux - 206. http://www.columbia.edu/kermit/ckubwr.html#top - 207. http://www.columbia.edu/kermit/ckubwr.html#contents - 208. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 209. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1 - 210. http://www.columbia.edu/kermit/ckubwr.html#top - 211. http://www.columbia.edu/kermit/ckubwr.html#contents - 212. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 213. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 - 214. http://www.columbia.edu/kermit/ckubwr.html#x3.2.0 - 215. ftp://kermit.columbia.edu/kermit/f/makefile - 216. http://www.columbia.edu/kermit/ckubwr.html#top - 217. http://www.columbia.edu/kermit/ckubwr.html#contents - 218. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 219. http://www.columbia.edu/kermit/ckubwr.html#x3.2.3 - 220. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1 - 221. http://www.columbia.edu/kermit/ckubwr.html#top - 222. http://www.columbia.edu/kermit/ckubwr.html#contents - 223. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 224. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 225. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 - 226. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.1 - 227. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2 - 228. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3 - 229. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4 - 230. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.5 - 231. http://www.columbia.edu/kermit/ckubwr.html#top - 232. http://www.columbia.edu/kermit/ckubwr.html#contents - 233. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 234. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2 - 235. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 - 236. http://www.columbia.edu/kermit/ckubwr.html#top - 237. http://www.columbia.edu/kermit/ckubwr.html#contents - 238. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 239. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3 - 240. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.1 - 241. http://www.columbia.edu/kermit/ckubwr.html#top - 242. http://www.columbia.edu/kermit/ckubwr.html#contents - 243. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 244. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4 - 245. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2 - 246. http://www.columbia.edu/kermit/ckubwr.html#top - 247. http://www.columbia.edu/kermit/ckubwr.html#contents - 248. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 249. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.5 - 250. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3 - 251. http://www.columbia.edu/kermit/ckubwr.html#top - 252. http://www.columbia.edu/kermit/ckubwr.html#contents - 253. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 254. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4 - 255. http://www.columbia.edu/kermit/ckubwr.html#top - 256. http://www.columbia.edu/kermit/ckubwr.html#contents - 257. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 258. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 - 259. http://www.columbia.edu/kermit/ckubwr.html#top - 260. http://www.columbia.edu/kermit/ckubwr.html#contents - 261. http://www.columbia.edu/kermit/ckubwr.html#x3 - 262. http://www.columbia.edu/kermit/ckubwr.html#x3.4 - 263. http://www.columbia.edu/kermit/ckubwr.html#x3.2 - 264. http://www.columbia.edu/kermit/ckubwr.html#x3.3.1 - 265. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2 - 266. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3 - 267. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4 - 268. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5 - 269. http://www.columbia.edu/kermit/ckubwr.html#x3.3.6 - 270. http://en.wikipedia.org/wiki/Avahi_(software) - 271. news:comp.os.linux.misc - 272. news:comp.os.linux.answers - 273. http://www.tldp.org/ - 274. http://www.tldp.org/FAQ/Linux-FAQ.html - 275. http://www.tldp.org/HOWTO/Serial-HOWTO.html - 276. http://tldp.org/HOWTO/Modem-HOWTO.html - 277. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO - 278. ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO - 279. http://www.tldp.org/HOWTO/ - 280. http://www.tldp.org/hmirrors.html - 281. http://www.redhat.com/apps/support/ - 282. http://www.debian.org/support - 283. http://www.slackware.com/support/ - 284. http://www.caldera.com/support/ - 285. http://www.novell.com/support/microsites/microsite.do - 286. http://www.mandrake.com/support/ - 287. http://www.turbolinux.com/support/ - 288. http://www.linmodems.org/ - 289. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 290. http://linux.dreamtime.org/decnet/ - 291. mailto:kermit-support@columbia.edu - 292. http://www.linmodems.org/ - 293. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 - 294. http://www.columbia.edu/kermit/security.html#servers - 295. http://www.columbia.edu/kermit/sshclient.html - 296. http://www.columbia.edu/kermit/ckubwr.html#top - 297. http://www.columbia.edu/kermit/ckubwr.html#contents - 298. http://www.columbia.edu/kermit/ckubwr.html#x3 - 299. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2 - 300. http://www.columbia.edu/kermit/ckubwr.html#top - 301. http://www.columbia.edu/kermit/ckubwr.html#contents - 302. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 303. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3 - 304. http://www.columbia.edu/kermit/ckubwr.html#x3.3.1 - 305. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 306. http://www.columbia.edu/kermit/ckubwr.html#x6 - 307. http://www.columbia.edu/kermit/ckubwr.html#x7 - 308. http://www.columbia.edu/kermit/ckubwr.html#x8 - 309. http://www.columbia.edu/kermit/ckuins.html#x10 - 310. http://www.columbia.edu/kermit/ckuins.html#x11 - 311. http://www.columbia.edu/kermit/ckuins.html - 312. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 313. http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html - 314. http://www.columbia.edu/kermit/ckubwr.html#top - 315. http://www.columbia.edu/kermit/ckubwr.html#contents - 316. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 317. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4 - 318. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2 - 319. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 - 320. http://www.columbia.edu/kermit/ckfaq.html#term - 321. http://dickey.his.com/xterm/xterm.html - 322. http://dickey.his.com/xterm/xterm.html - 323. ftp://kermit.columbia.edu/kermit/f/xmodmap.txt - 324. http://www.columbia.edu/kermit/ckubwr.html#top - 325. http://www.columbia.edu/kermit/ckubwr.html#contents - 326. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 327. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5 - 328. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3 - 329. http://www.columbia.edu/kermit/ckubwr.html#top - 330. http://www.columbia.edu/kermit/ckubwr.html#contents - 331. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 332. http://www.columbia.edu/kermit/ckubwr.html#x3.3.6 - 333. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4 - 334. http://www.columbia.edu/kermit/ckermit.html - 335. mailto:kermit-support@columbia.edu - 336. http://www.redhat.com/support/errata/RHBA-2001-153.html - 337. news:comp.protocols.kermit.misc - 338. http://www.columbia.edu/kermit/ckubwr.html#top - 339. http://www.columbia.edu/kermit/ckubwr.html#contents - 340. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 341. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5 - 342. http://www.columbia.edu/kermit/ckubwr.html#top - 343. http://www.columbia.edu/kermit/ckubwr.html#contents - 344. http://www.columbia.edu/kermit/ckubwr.html#x3 - 345. http://www.columbia.edu/kermit/ckubwr.html#x3.5 - 346. http://www.columbia.edu/kermit/ckubwr.html#x3.3 - 347. http://www.columbia.edu/kermit/ckubwr.html#top - 348. http://www.columbia.edu/kermit/ckubwr.html#contents - 349. http://www.columbia.edu/kermit/ckubwr.html#x3 - 350. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 351. http://www.columbia.edu/kermit/ckubwr.html#x3.4 - 352. news:comp.os.qnx - 353. http://www.columbia.edu/kermit/gkermit.html - 354. http://www.columbia.edu/kermit/ckuins.html#x10 - 355. http://www.columbia.edu/kermit/ckuins.html - 356. http://www.columbia.edu/kermit/ckubwr.html#top - 357. http://www.columbia.edu/kermit/ckubwr.html#contents - 358. http://www.columbia.edu/kermit/ckubwr.html#x3 - 359. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 360. http://www.columbia.edu/kermit/ckubwr.html#x3.5 - 361. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1 - 362. http://www.columbia.edu/kermit/ckubwr.html#x3.6.2 - 363. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3 - 364. http://www.columbia.edu/kermit/ckubwr.html#x3.6.4 - 365. http://www.columbia.edu/kermit/ckubwr.html#x3.10 - 366. http://aplawrence.com/SCOFAQ/ - 367. http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl - 368. http://www.zenez.com/cgi-bin/scouw7faq/faq.pl - 369. http://zenez.pcunix.com/cgi-bin/scouw7faq/faq.pl - 370. http://pcunix.com/Unixart/modems.html - 371. http://www.freebird.org/faq/ - 372. http://www.freebird.org/faq/developer.html - 373. http://support.caldera.com/caldera - 374. http://stage.caldera.com/ta/ - 375. http://aplawrence.com/newtosco.html - 376. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 - 377. http://www.columbia.edu/kermit/ckfaq.html#term - 378. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 379. http://www.columbia.edu/kermit/ckubwr.html#top - 380. http://www.columbia.edu/kermit/ckubwr.html#contents - 381. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 382. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1 - 383. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 384. http://www.columbia.edu/kermit/ckubwr.html#top - 385. http://www.columbia.edu/kermit/ckubwr.html#contents - 386. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 387. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3 - 388. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1 - 389. http://www.digi.com/ - 390. ftp://ftp.fu-berlin.de/pub/unix/driver/fas - 391. http://www.columbia.edu/kermit/ckubwr.html#x14 - 392. http://www.sco.com/ - 393. ftp://ftp.sco.com/ - 394. http://www.columbia.edu/kermit/ckubwr.html#top - 395. http://www.columbia.edu/kermit/ckubwr.html#contents - 396. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 397. http://www.columbia.edu/kermit/ckubwr.html#x3.6.4 - 398. http://www.columbia.edu/kermit/ckubwr.html#x3.6.2 - 399. http://www.columbia.edu/kermit/ckubwr.html#x3.10 - 400. http://www.columbia.edu/kermit/ckubwr.html#top - 401. http://www.columbia.edu/kermit/ckubwr.html#contents - 402. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 403. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3 - 404. http://www.columbia.edu/kermit/ckubwr.html#top - 405. http://www.columbia.edu/kermit/ckubwr.html#contents - 406. http://www.columbia.edu/kermit/ckubwr.html#x3 - 407. http://www.columbia.edu/kermit/ckubwr.html#x3.8 - 408. http://www.columbia.edu/kermit/ckubwr.html#x3.6 - 409. http://www.columbia.edu/kermit/ckubwr.html#x3.7.1 - 410. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2 - 411. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3 - 412. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4 - 413. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5 - 414. news:comp.unix.solaris - 415. http://accesss1.sun.com/ - 416. http://docs.sun.com/ - 417. http://www.sunhelp.com/ - 418. http://www.wins.uva.nl/pub/solaris/solaris2/ - 419. http://www.wins.uva.nl/cgi-bin/sfaq.cgi - 420. ftp://ftp.wins.uva.nl/pub/solaris - 421. http://www.science.uva.nl/pub/solaris/solaris2.html - 422. http://www.stokely.com/ - 423. http://www.stokely.com/unix.sysadm.resources/faqs.sun.html - 424. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 425. http://www.columbia.edu/kermit/ckubwr.html#top - 426. http://www.columbia.edu/kermit/ckubwr.html#contents - 427. http://www.columbia.edu/kermit/ckubwr.html#x3 - 428. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 429. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2 - 430. http://www.columbia.edu/kermit/ckubwr.html#top - 431. http://www.columbia.edu/kermit/ckubwr.html#contents - 432. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 433. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3 - 434. http://www.columbia.edu/kermit/ckubwr.html#x3.7.1 - 435. http://www.columbia.edu/kermit/ckubwr.html#top - 436. http://www.columbia.edu/kermit/ckubwr.html#contents - 437. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 438. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4 - 439. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2 - 440. http://www.columbia.edu/kermit/ckubwr.html#top - 441. http://www.columbia.edu/kermit/ckubwr.html#contents - 442. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 443. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5 - 444. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3 - 445. news:comp.os.vms - 446. http://www.columbia.edu/kermit/ckubwr.html#top - 447. http://www.columbia.edu/kermit/ckubwr.html#contents - 448. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 449. http://www.columbia.edu/kermit/ckubwr.html#x3.7.6 - 450. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4 - 451. http://www.columbia.edu/kermit/ckubwr.html#top - 452. http://www.columbia.edu/kermit/ckubwr.html#contents - 453. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 454. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5 - 455. http://www.columbia.edu/kermit/ckubwr.html#top - 456. http://www.columbia.edu/kermit/ckubwr.html#contents - 457. http://www.columbia.edu/kermit/ckubwr.html#x3 - 458. http://www.columbia.edu/kermit/ckubwr.html#x3.9 - 459. http://www.columbia.edu/kermit/ckubwr.html#x3.7 - 460. http://www.stokely.com/ - 461. http://accesss1.sun.com/ - 462. http://www.ludd.luth.se/~bear/project/sun/sun.hardware.txt - 463. ftp://ftp.netcom.com/pub/ru/rubicon/sun.hdwr.ref - 464. ftp://ftp.intnet.net/pub/SUN/Sun-Hardware-Ref - 465. http://www.columbia.edu/kermit/ckubwr.html#top - 466. http://www.columbia.edu/kermit/ckubwr.html#contents - 467. http://www.columbia.edu/kermit/ckubwr.html#x3 - 468. http://www.columbia.edu/kermit/ckubwr.html#x3.10 - 469. http://www.columbia.edu/kermit/ckubwr.html#x3.8 - 470. news:comp.unix.ultrix - 471. news:comp.sys.dec - 472. http://www.columbia.edu/kermit/ckubwr.html#top - 473. http://www.columbia.edu/kermit/ckubwr.html#contents - 474. http://www.columbia.edu/kermit/ckubwr.html#x3 - 475. http://www.columbia.edu/kermit/ckubwr.html#x3.11 - 476. http://www.columbia.edu/kermit/ckubwr.html#x3.9 - 477. http://www.freebird.org/ - 478. http://www.freebird.org/faq/ - 479. news:comp.unix.unixware.misc - 480. news:comp.unix.sco.misc - 481. http://www.columbia.edu/kermit/ckubwr.html#x3.0 - 482. ftp://kermit.columbia.edu/kermit/f/ckutio.c - 483. http://www.columbia.edu/kermit/ckubwr.html#top - 484. http://www.columbia.edu/kermit/ckubwr.html#contents - 485. http://www.columbia.edu/kermit/ckubwr.html#x3 - 486. http://www.columbia.edu/kermit/ckubwr.html#x3.12 - 487. http://www.columbia.edu/kermit/ckubwr.html#x3.10 - 488. http://www.columbia.edu/kermit/ckubwr.html#top - 489. http://www.columbia.edu/kermit/ckubwr.html#contents - 490. http://www.columbia.edu/kermit/ckubwr.html#x3 - 491. http://www.columbia.edu/kermit/ckubwr.html#x3.13 - 492. http://www.columbia.edu/kermit/ckubwr.html#x3.11 - 493. http://www.columbia.edu/kermit/ckubwr.html#top - 494. http://www.columbia.edu/kermit/ckubwr.html#contents - 495. http://www.columbia.edu/kermit/ckubwr.html#x3 - 496. http://www.columbia.edu/kermit/ckubwr.html#x3.14 - 497. http://www.columbia.edu/kermit/ckubwr.html#x3.12 - 498. http://www.columbia.edu/kermit/ckubwr.html#top - 499. http://www.columbia.edu/kermit/ckubwr.html#contents - 500. http://www.columbia.edu/kermit/ckubwr.html#x3 - 501. http://www.columbia.edu/kermit/ckubwr.html#x3.15 - 502. http://www.columbia.edu/kermit/ckubwr.html#x3.13 - 503. news:comp.sys.sgi.misc - 504. news:comp.sys.sgi.admin - 505. http://www.sgi.com/ - 506. http://www-viz.tamu.edu/~sgi-faq/ - 507. ftp://viz.tamu.edu/pub/sgi/faq/ - 508. http://www.columbia.edu/kermit/ckuins.html - 509. http://freeware.sgi.com/Installable/gcc-2.95.2.html - 510. http://freeware.sgi.com/Installable/gcc-2.95.2.html - 511. http://www.columbia.edu/kermit/ckubwr.html#top - 512. http://www.columbia.edu/kermit/ckubwr.html#contents - 513. http://www.columbia.edu/kermit/ckubwr.html#x3 - 514. http://www.columbia.edu/kermit/ckubwr.html#x3.16 - 515. http://www.columbia.edu/kermit/ckubwr.html#x3.14 - 516. news:comp.sys.be - 517. http://www.columbia.edu/kermit/ckubwr.html#top - 518. http://www.columbia.edu/kermit/ckubwr.html#contents - 519. http://www.columbia.edu/kermit/ckubwr.html#x3 - 520. http://www.columbia.edu/kermit/ckubwr.html#x3.17 - 521. http://www.columbia.edu/kermit/ckubwr.html#x3.15 - 522. http://www.columbia.edu/kermit/ckubwr.html#top - 523. http://www.columbia.edu/kermit/ckubwr.html#contents - 524. http://www.columbia.edu/kermit/ckubwr.html#x3 - 525. http://www.columbia.edu/kermit/ckubwr.html#x3.18 - 526. http://www.columbia.edu/kermit/ckubwr.html#x3.16 - 527. http://www.columbia.edu/kermit/ckubwr.html#top - 528. http://www.columbia.edu/kermit/ckubwr.html#contents - 529. http://www.columbia.edu/kermit/ckubwr.html#x3 - 530. http://www.columbia.edu/kermit/ckubwr.html#x3.19 - 531. http://www.columbia.edu/kermit/ckubwr.html#x3.17 - 532. http://www.columbia.edu/kermit/ckubwr.html#top - 533. http://www.columbia.edu/kermit/ckubwr.html#contents - 534. http://www.columbia.edu/kermit/ckubwr.html#x3 - 535. http://www.columbia.edu/kermit/ckubwr.html#x3.20 - 536. http://www.columbia.edu/kermit/ckubwr.html#x3.18 - 537. http://www.columbia.edu/kermit/mac.html - 538. http://www.amazon.com/gp/product/B0000VYJRY?ie=UTF8&tag=aleidmoreldom-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0000VYJRY - 539. http://www.columbia.edu/kermit/ckuins.html#x10 - 540. http://www.columbia.edu/kermit/ckuins.html - 541. http://www.amazon.com/gp/product/B000FX61MS?ie=UTF8&tag=aleidmoreldom-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B000FX61MS - 542. mailto:kermit@columbia.edu - 543. http://www.columbia.edu/kermit/ckubwr.html#top - 544. http://www.columbia.edu/kermit/ckubwr.html#contents - 545. http://www.columbia.edu/kermit/ckubwr.html#x3 - 546. http://www.columbia.edu/kermit/ckubwr.html#x3.19 - 547. http://www.uni-giessen.de/faq/archiv/coherent-faq.general/msg00000.html - 548. http://www.columbia.edu/kermit/ckubwr.html#top - 549. http://www.columbia.edu/kermit/ckubwr.html#contents - 550. http://www.columbia.edu/kermit/ckubwr.html#x5 - 551. http://www.columbia.edu/kermit/ckubwr.html#x3 - 552. http://www.columbia.edu/kermit/ckccfg.html - 553. http://www.columbia.edu/kermit/ckubwr.html#top - 554. http://www.columbia.edu/kermit/ckubwr.html#contents - 555. http://www.columbia.edu/kermit/ckubwr.html#x6 - 556. http://www.columbia.edu/kermit/ckubwr.html#x4 - 557. http://www.columbia.edu/kermit/ckuins.html - 558. http://www.columbia.edu/kermit/ckubwr.html#top - 559. http://www.columbia.edu/kermit/ckubwr.html#contents - 560. http://www.columbia.edu/kermit/ckubwr.html#x7 - 561. http://www.columbia.edu/kermit/ckubwr.html#x5 - 562. http://www.columbia.edu/kermit/ckuins.html#9.5 - 563. http://www.columbia.edu/kermit/ckubwr.html#x3 - 564. http://www.columbia.edu/kermit/ckubwr.html#top - 565. http://www.columbia.edu/kermit/ckubwr.html#contents - 566. http://www.columbia.edu/kermit/ckubwr.html#x8 - 567. http://www.columbia.edu/kermit/ckubwr.html#x6 - 568. http://www.columbia.edu/kermit/ckuins.html#x8 - 569. http://www.columbia.edu/kermit/ckuins.html - 570. http://www.columbia.edu/kermit/ck60manual.html - 571. http://www.columbia.edu/kermit/cable.html - 572. http://www.columbia.edu/kermit/ckubwr.html#top - 573. http://www.columbia.edu/kermit/ckubwr.html#contents - 574. http://www.columbia.edu/kermit/ckubwr.html#x9 - 575. http://www.columbia.edu/kermit/ckubwr.html#x7 - 576. http://www.columbia.edu/kermit/ckubwr.html#top - 577. http://www.columbia.edu/kermit/ckubwr.html#contents - 578. http://www.columbia.edu/kermit/ckubwr.html#x10 - 579. http://www.columbia.edu/kermit/ckubwr.html#x8 - 580. http://www.columbia.edu/kermit/ck60manual.html - 581. http://dickey.his.com/xterm/xterm.html - 582. http://www.columbia.edu/kermit/ckubwr.html#top - 583. http://www.columbia.edu/kermit/ckubwr.html#contents - 584. http://www.columbia.edu/kermit/ckubwr.html#x11 - 585. http://www.columbia.edu/kermit/ckubwr.html#x9 - 586. http://www.columbia.edu/kermit/ckubwr.html#top - 587. http://www.columbia.edu/kermit/ckubwr.html#contents - 588. http://www.columbia.edu/kermit/ckubwr.html#x12 - 589. http://www.columbia.edu/kermit/ckubwr.html#x10 - 590. http://www.columbia.edu/kermit/ckubwr.html#x11.1 - 591. http://www.columbia.edu/kermit/ckubwr.html#x11.2 - 592. http://www.columbia.edu/kermit/ckubwr.html#top - 593. http://www.columbia.edu/kermit/ckubwr.html#contents - 594. http://www.columbia.edu/kermit/ckubwr.html#x11 - 595. http://www.columbia.edu/kermit/ckubwr.html#x11.2 - 596. http://www.columbia.edu/kermit/ck60manual.html - 597. http://www.columbia.edu/kermit/ckubwr.html#top - 598. http://www.columbia.edu/kermit/ckubwr.html#contents - 599. http://www.columbia.edu/kermit/ckubwr.html#x11 - 600. http://www.columbia.edu/kermit/ckubwr.html#x11.1 - 601. http://www.columbia.edu/kermit/ck60manual.html - 602. http://www.columbia.edu/kermit/ckubwr.html#top - 603. http://www.columbia.edu/kermit/ckubwr.html#contents - 604. http://www.columbia.edu/kermit/ckubwr.html#x13 - 605. http://www.columbia.edu/kermit/ckubwr.html#x11 - 606. http://www.columbia.edu/kermit/security.html - 607. http://www.columbia.edu/kermit/ckubwr.html#top - 608. http://www.columbia.edu/kermit/ckubwr.html#contents - 609. http://www.columbia.edu/kermit/ckubwr.html#x14 - 610. http://www.columbia.edu/kermit/ckubwr.html#x12 - 611. http://www.columbia.edu/kermit/ckubwr.html#top - 612. http://www.columbia.edu/kermit/ckubwr.html#contents - 613. http://www.columbia.edu/kermit/ckubwr.html#x15 - 614. http://www.columbia.edu/kermit/ckubwr.html#x14 - 615. mailto:support@stallion.oz.au - 616. http://www.stallion.com/ - 617. http://www.columbia.edu/kermit/ckubwr.html#top - 618. http://www.columbia.edu/kermit/ckubwr.html#contents - 619. http://www.columbia.edu/kermit/ckermit.html - 620. http://www.columbia.edu/kermit/ck80.html - 621. http://www.columbia.edu/kermit/index.html - 622. http://www.columbia.edu/kermit/index.html - 623. http://www.columbia.edu/ - 624. mailto:kermit@columbia.edu + 15. http://www.columbia.edu/kermit/ckdaily.html + 16. http://www.columbia.edu/kermit/ckdaily.html + 17. http://www.columbia.edu/kermit/ckermit.html + 18. http://www.columbia.edu/kermit/ckuins.html + 19. http://www.columbia.edu/kermit/ckututor.html + 20. http://www.columbia.edu/kermit/ckubwr.html#x1 + 21. http://www.columbia.edu/kermit/ckubwr.html#x2 + 22. http://www.columbia.edu/kermit/ckubwr.html#x3 + 23. http://www.columbia.edu/kermit/ckubwr.html#x4 + 24. http://www.columbia.edu/kermit/ckubwr.html#x5 + 25. http://www.columbia.edu/kermit/ckubwr.html#x6 + 26. http://www.columbia.edu/kermit/ckubwr.html#x7 + 27. http://www.columbia.edu/kermit/ckubwr.html#x8 + 28. http://www.columbia.edu/kermit/ckubwr.html#x9 + 29. http://www.columbia.edu/kermit/ckubwr.html#x10 + 30. http://www.columbia.edu/kermit/ckubwr.html#x11 + 31. http://www.columbia.edu/kermit/ckubwr.html#x12 + 32. http://www.columbia.edu/kermit/ckubwr.html#x13 + 33. http://www.columbia.edu/kermit/ckubwr.html#x14 + 34. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 35. http://www.columbia.edu/kermit/ckubwr.html#x3.18 + 36. http://www.columbia.edu/kermit/ckubwr.html#x3.19 + 37. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 38. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 39. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 40. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 41. http://www.columbia.edu/kermit/ckubwr.html#top + 42. http://www.columbia.edu/kermit/ckubwr.html#contents + 43. http://www.columbia.edu/kermit/ckubwr.html#x2 + 44. http://www.columbia.edu/kermit/ckubwr.html#x1.1 + 45. http://www.columbia.edu/kermit/ckubwr.html#x1.2 + 46. http://www.columbia.edu/kermit/ckubwr.html#x1.3 + 47. http://www.columbia.edu/kermit/ckubwr.html#x1.4 + 48. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 49. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 50. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 51. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 52. http://www.columbia.edu/kermit/ckcbwr.html + 53. mailto:kermit-support@columbia.edu + 54. http://www.columbia.edu/kermit/ckubwr.html#top + 55. http://www.columbia.edu/kermit/ckubwr.html#contents + 56. http://www.columbia.edu/kermit/ckubwr.html#x1.2 + 57. http://www.columbia.edu/kermit/ck60manual.html + 58. http://www.columbia.edu/kermit/ckermit70.html + 59. http://www.columbia.edu/kermit/ckermit80.html + 60. http://www.columbia.edu/kermit/ckermit90.html + 61. http://www.columbia.edu/kermit/ckubwr.html#top + 62. http://www.columbia.edu/kermit/ckubwr.html#contents + 63. http://www.columbia.edu/kermit/ckubwr.html#x1 + 64. http://www.columbia.edu/kermit/ckubwr.html#x1.3 + 65. http://www.columbia.edu/kermit/ckubwr.html#x1.1 + 66. http://www.columbia.edu/kermit/support.html + 67. http://www.columbia.edu/kermit/ckubwr.html#top + 68. http://www.columbia.edu/kermit/ckubwr.html#contents + 69. http://www.columbia.edu/kermit/ckubwr.html#x1 + 70. http://www.columbia.edu/kermit/ckubwr.html#x1.4 + 71. http://www.columbia.edu/kermit/ckubwr.html#x1.2 + 72. http://www.columbia.edu/kermit/ckubwr.html#top + 73. http://www.columbia.edu/kermit/ckubwr.html#contents + 74. http://www.columbia.edu/kermit/ckubwr.html#x1 + 75. http://www.columbia.edu/kermit/ckubwr.html#x1.3 + 76. http://www.columbia.edu/kermit/ckubwr.html#top + 77. http://www.columbia.edu/kermit/ckubwr.html#contents + 78. http://www.columbia.edu/kermit/ckubwr.html#x3 + 79. http://www.columbia.edu/kermit/ckubwr.html#x1 + 80. http://www.columbia.edu/kermit/ckubwr.html#top + 81. http://www.columbia.edu/kermit/ckubwr.html#contents + 82. http://www.columbia.edu/kermit/ckubwr.html#x4 + 83. http://www.columbia.edu/kermit/ckubwr.html#x2 + 84. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 85. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 86. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 87. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 88. http://www.columbia.edu/kermit/ckubwr.html#x3.4 + 89. http://www.columbia.edu/kermit/ckubwr.html#x3.5 + 90. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 91. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 92. http://www.columbia.edu/kermit/ckubwr.html#x3.8 + 93. http://www.columbia.edu/kermit/ckubwr.html#x3.9 + 94. http://www.columbia.edu/kermit/ckubwr.html#x3.10 + 95. http://www.columbia.edu/kermit/ckubwr.html#x3.11 + 96. http://www.columbia.edu/kermit/ckubwr.html#x3.12 + 97. http://www.columbia.edu/kermit/ckubwr.html#x3.13 + 98. http://www.columbia.edu/kermit/ckubwr.html#x3.14 + 99. http://www.columbia.edu/kermit/ckubwr.html#x3.15 + 100. http://www.columbia.edu/kermit/ckubwr.html#x3.16 + 101. http://www.columbia.edu/kermit/ckubwr.html#x3.17 + 102. http://www.columbia.edu/kermit/ckubwr.html#x3.18 + 103. http://www.columbia.edu/kermit/ckubwr.html#x3.19 + 104. http://www.columbia.edu/kermit/ckubwr.html#x3.20 + 105. http://www.faqs.org/ + 106. http://aplawrence.com/Unixart/newtounix.html + 107. http://www.columbia.edu/kermit/ckubwr.html#x3 + 108. mailto:kermit-support@columbia.edu + 109. http://www.columbia.edu/kermit/support.html + 110. http://www.columbia.edu/kermit/ckubwr.html#top + 111. http://www.columbia.edu/kermit/ckubwr.html#contents + 112. http://www.columbia.edu/kermit/ckubwr.html#x3 + 113. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 114. http://www.pcunix.com/ + 115. http://www.columbia.edu/kermit/ckubwr.html#x3.0.1 + 116. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 + 117. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3 + 118. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4 + 119. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 + 120. http://www.columbia.edu/kermit/ckubwr.html#x3.0.6 + 121. http://www.columbia.edu/kermit/ckubwr.html#top + 122. http://www.columbia.edu/kermit/ckubwr.html#contents + 123. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 124. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 + 125. http://www.columbia.edu/kermit/ckubwr.html#top + 126. http://www.columbia.edu/kermit/ckubwr.html#contents + 127. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 128. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3 + 129. http://www.columbia.edu/kermit/ckubwr.html#x3.0.1 + 130. http://www.linmodems.org/ + 131. http://www.microsoft.com/hwdev/platform/PCdesign/LR/default.asp + 132. http://www.columbia.edu/kermit/ckubwr.html#top + 133. http://www.columbia.edu/kermit/ckubwr.html#contents + 134. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 135. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4 + 136. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 + 137. http://www.idir.net/~gromitkc/winmodem.html + 138. http://www.digi.com/ + 139. http://www.columbia.edu/kermit/ckubwr.html#top + 140. http://www.columbia.edu/kermit/ckubwr.html#contents + 141. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 142. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 + 143. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3 + 144. http://www.columbia.edu/kermit/ckubwr.html#top + 145. http://www.columbia.edu/kermit/ckubwr.html#contents + 146. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 147. http://www.columbia.edu/kermit/ckubwr.html#x3.0.6 + 148. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4 + 149. http://www.columbia.edu/kermit/ckubwr.html#top + 150. http://www.columbia.edu/kermit/ckubwr.html#contents + 151. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 152. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 + 153. http://www.columbia.edu/kermit/ckubwr.html#top + 154. http://www.columbia.edu/kermit/ckubwr.html#contents + 155. http://www.columbia.edu/kermit/ckubwr.html#x3 + 156. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 157. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 158. http://www.columbia.edu/kermit/ckubwr.html#x3.1.1 + 159. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2 + 160. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3 + 161. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4 + 162. http://www.columbia.edu/kermit/ckubwr.html#x3.1.5 + 163. http://www.emerson.emory.edu/services/aix-faq/ + 164. http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html + 165. http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top.html + 166. http://aixpdslib.seas.ucla.edu/ + 167. http://www.rootvg.net(AIXhistory)/ + 168. ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1 + 169. ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/aix + 170. news:comp.unix.aix + 171. http://www.columbia.edu/kermit/ckubwr.html#top + 172. http://www.columbia.edu/kermit/ckubwr.html#contents + 173. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 174. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2 + 175. http://www.columbia.edu/kermit/ckubwr.html#top + 176. http://www.columbia.edu/kermit/ckubwr.html#contents + 177. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 178. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3 + 179. http://www.columbia.edu/kermit/ckubwr.html#x3.1.1 + 180. http://www.columbia.edu/kermit/security.html#servers + 181. http://www.columbia.edu/kermit/ckubwr.html#top + 182. http://www.columbia.edu/kermit/ckubwr.html#contents + 183. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 184. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4 + 185. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2 + 186. http://service.software.ibm.com/rs6000/ + 187. http://www.columbia.edu/kermit/ckubwr.html#top + 188. http://www.columbia.edu/kermit/ckubwr.html#contents + 189. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 190. http://www.columbia.edu/kermit/ckubwr.html#x3.1.5 + 191. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3 + 192. http://www.columbia.edu/kermit/ckubwr.html#top + 193. http://www.columbia.edu/kermit/ckubwr.html#contents + 194. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 195. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4 + 196. http://www.columbia.edu/kermit/ckubwr.html#top + 197. http://www.columbia.edu/kermit/ckubwr.html#contents + 198. http://www.columbia.edu/kermit/ckubwr.html#x3 + 199. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 200. http://www.columbia.edu/kermit/ckubwr.html#x3.1 + 201. http://www.columbia.edu/kermit/ckubwr.html#x3.2.0 + 202. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1 + 203. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 + 204. http://www.columbia.edu/kermit/ckubwr.html#x3.2.3 + 205. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 206. http://www.columbia.edu/kermit/ckubwr.html#x3.2.5 + 207. news:comp.sys.hp.hpux + 208. http://www.columbia.edu/kermit/ckubwr.html#top + 209. http://www.columbia.edu/kermit/ckubwr.html#contents + 210. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 211. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1 + 212. http://www.columbia.edu/kermit/ckubwr.html#top + 213. http://www.columbia.edu/kermit/ckubwr.html#contents + 214. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 215. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 + 216. http://www.columbia.edu/kermit/ckubwr.html#x3.2.0 + 217. ftp://kermit.columbia.edu/kermit/f/makefile + 218. http://www.columbia.edu/kermit/ckubwr.html#top + 219. http://www.columbia.edu/kermit/ckubwr.html#contents + 220. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 221. http://www.columbia.edu/kermit/ckubwr.html#x3.2.3 + 222. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1 + 223. http://www.columbia.edu/kermit/ckubwr.html#top + 224. http://www.columbia.edu/kermit/ckubwr.html#contents + 225. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 226. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 227. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 + 228. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.1 + 229. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2 + 230. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3 + 231. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4 + 232. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.5 + 233. http://www.columbia.edu/kermit/ckubwr.html#top + 234. http://www.columbia.edu/kermit/ckubwr.html#contents + 235. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 236. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2 + 237. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2 + 238. http://www.columbia.edu/kermit/ckubwr.html#top + 239. http://www.columbia.edu/kermit/ckubwr.html#contents + 240. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 241. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3 + 242. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.1 + 243. http://www.columbia.edu/kermit/ckubwr.html#top + 244. http://www.columbia.edu/kermit/ckubwr.html#contents + 245. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 246. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4 + 247. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2 + 248. http://www.columbia.edu/kermit/ckubwr.html#top + 249. http://www.columbia.edu/kermit/ckubwr.html#contents + 250. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 251. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.5 + 252. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3 + 253. http://www.columbia.edu/kermit/ckubwr.html#top + 254. http://www.columbia.edu/kermit/ckubwr.html#contents + 255. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 256. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4 + 257. http://www.columbia.edu/kermit/ckubwr.html#top + 258. http://www.columbia.edu/kermit/ckubwr.html#contents + 259. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 260. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4 + 261. http://www.columbia.edu/kermit/ckubwr.html#top + 262. http://www.columbia.edu/kermit/ckubwr.html#contents + 263. http://www.columbia.edu/kermit/ckubwr.html#x3 + 264. http://www.columbia.edu/kermit/ckubwr.html#x3.4 + 265. http://www.columbia.edu/kermit/ckubwr.html#x3.2 + 266. http://www.columbia.edu/kermit/ckubwr.html#x3.3.1 + 267. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2 + 268. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3 + 269. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4 + 270. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5 + 271. http://www.columbia.edu/kermit/ckubwr.html#x3.3.6 + 272. http://en.wikipedia.org/wiki/Avahi_(software) + 273. news:comp.os.linux.misc + 274. news:comp.os.linux.answers + 275. http://www.tldp.org/ + 276. http://www.tldp.org/FAQ/Linux-FAQ.html + 277. http://www.tldp.org/HOWTO/Serial-HOWTO.html + 278. http://tldp.org/HOWTO/Modem-HOWTO.html + 279. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO + 280. ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO + 281. http://www.tldp.org/HOWTO/ + 282. http://www.tldp.org/hmirrors.html + 283. http://www.redhat.com/apps/support/ + 284. http://www.debian.org/support + 285. http://www.slackware.com/support/ + 286. http://www.caldera.com/support/ + 287. http://www.novell.com/support/microsites/microsite.do + 288. http://www.mandrake.com/support/ + 289. http://www.turbolinux.com/support/ + 290. http://www.linmodems.org/ + 291. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 292. http://linux.dreamtime.org/decnet/ + 293. mailto:kermit-support@columbia.edu + 294. http://www.linmodems.org/ + 295. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2 + 296. http://www.columbia.edu/kermit/security.html#servers + 297. http://www.columbia.edu/kermit/sshclient.html + 298. http://www.columbia.edu/kermit/ckubwr.html#top + 299. http://www.columbia.edu/kermit/ckubwr.html#contents + 300. http://www.columbia.edu/kermit/ckubwr.html#x3 + 301. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2 + 302. http://www.columbia.edu/kermit/ckubwr.html#top + 303. http://www.columbia.edu/kermit/ckubwr.html#contents + 304. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 305. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3 + 306. http://www.columbia.edu/kermit/ckubwr.html#x3.3.1 + 307. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 308. http://www.columbia.edu/kermit/ckubwr.html#x6 + 309. http://www.columbia.edu/kermit/ckubwr.html#x7 + 310. http://www.columbia.edu/kermit/ckubwr.html#x8 + 311. http://www.columbia.edu/kermit/ckuins.html#x10 + 312. http://www.columbia.edu/kermit/ckuins.html#x11 + 313. http://www.columbia.edu/kermit/ckuins.html + 314. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 315. http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html + 316. http://www.columbia.edu/kermit/ckubwr.html#top + 317. http://www.columbia.edu/kermit/ckubwr.html#contents + 318. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 319. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4 + 320. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2 + 321. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 + 322. http://www.columbia.edu/kermit/ckfaq.html#term + 323. http://dickey.his.com/xterm/xterm.html + 324. http://dickey.his.com/xterm/xterm.html + 325. ftp://kermit.columbia.edu/kermit/f/xmodmap.txt + 326. http://www.columbia.edu/kermit/ckubwr.html#top + 327. http://www.columbia.edu/kermit/ckubwr.html#contents + 328. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 329. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5 + 330. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3 + 331. http://www.columbia.edu/kermit/ckubwr.html#top + 332. http://www.columbia.edu/kermit/ckubwr.html#contents + 333. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 334. http://www.columbia.edu/kermit/ckubwr.html#x3.3.6 + 335. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4 + 336. http://www.columbia.edu/kermit/ckermit.html + 337. mailto:kermit-support@columbia.edu + 338. http://www.redhat.com/support/errata/RHBA-2001-153.html + 339. news:comp.protocols.kermit.misc + 340. http://www.columbia.edu/kermit/ckubwr.html#top + 341. http://www.columbia.edu/kermit/ckubwr.html#contents + 342. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 343. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5 + 344. http://www.columbia.edu/kermit/ckubwr.html#top + 345. http://www.columbia.edu/kermit/ckubwr.html#contents + 346. http://www.columbia.edu/kermit/ckubwr.html#x3 + 347. http://www.columbia.edu/kermit/ckubwr.html#x3.5 + 348. http://www.columbia.edu/kermit/ckubwr.html#x3.3 + 349. http://www.columbia.edu/kermit/ckubwr.html#top + 350. http://www.columbia.edu/kermit/ckubwr.html#contents + 351. http://www.columbia.edu/kermit/ckubwr.html#x3 + 352. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 353. http://www.columbia.edu/kermit/ckubwr.html#x3.4 + 354. news:comp.os.qnx + 355. http://www.columbia.edu/kermit/gkermit.html + 356. http://www.columbia.edu/kermit/ckuins.html#x10 + 357. http://www.columbia.edu/kermit/ckuins.html + 358. http://www.columbia.edu/kermit/ckubwr.html#top + 359. http://www.columbia.edu/kermit/ckubwr.html#contents + 360. http://www.columbia.edu/kermit/ckubwr.html#x3 + 361. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 362. http://www.columbia.edu/kermit/ckubwr.html#x3.5 + 363. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1 + 364. http://www.columbia.edu/kermit/ckubwr.html#x3.6.2 + 365. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3 + 366. http://www.columbia.edu/kermit/ckubwr.html#x3.6.4 + 367. http://www.columbia.edu/kermit/ckubwr.html#x3.10 + 368. http://aplawrence.com/SCOFAQ/ + 369. http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl + 370. http://www.zenez.com/cgi-bin/scouw7faq/faq.pl + 371. http://zenez.pcunix.com/cgi-bin/scouw7faq/faq.pl + 372. http://pcunix.com/Unixart/modems.html + 373. http://www.freebird.org/faq/ + 374. http://www.freebird.org/faq/developer.html + 375. http://support.caldera.com/caldera + 376. http://stage.caldera.com/ta/ + 377. http://aplawrence.com/newtosco.html + 378. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5 + 379. http://www.columbia.edu/kermit/ckfaq.html#term + 380. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 381. http://www.columbia.edu/kermit/ckubwr.html#top + 382. http://www.columbia.edu/kermit/ckubwr.html#contents + 383. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 384. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1 + 385. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 386. http://www.columbia.edu/kermit/ckubwr.html#top + 387. http://www.columbia.edu/kermit/ckubwr.html#contents + 388. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 389. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3 + 390. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1 + 391. http://www.digi.com/ + 392. ftp://ftp.fu-berlin.de/pub/unix/driver/fas + 393. http://www.columbia.edu/kermit/ckubwr.html#x14 + 394. http://www.sco.com/ + 395. ftp://ftp.sco.com/ + 396. http://www.columbia.edu/kermit/ckubwr.html#top + 397. http://www.columbia.edu/kermit/ckubwr.html#contents + 398. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 399. http://www.columbia.edu/kermit/ckubwr.html#x3.6.4 + 400. http://www.columbia.edu/kermit/ckubwr.html#x3.6.2 + 401. http://www.columbia.edu/kermit/ckubwr.html#x3.10 + 402. http://www.columbia.edu/kermit/ckubwr.html#top + 403. http://www.columbia.edu/kermit/ckubwr.html#contents + 404. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 405. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3 + 406. http://www.columbia.edu/kermit/ckubwr.html#top + 407. http://www.columbia.edu/kermit/ckubwr.html#contents + 408. http://www.columbia.edu/kermit/ckubwr.html#x3 + 409. http://www.columbia.edu/kermit/ckubwr.html#x3.8 + 410. http://www.columbia.edu/kermit/ckubwr.html#x3.6 + 411. http://www.columbia.edu/kermit/ckubwr.html#x3.7.1 + 412. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2 + 413. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3 + 414. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4 + 415. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5 + 416. news:comp.unix.solaris + 417. http://access1.sun.com/ + 418. http://docs.sun.com/ + 419. http://www.sunhelp.com/ + 420. http://www.wins.uva.nl/pub/solaris/solaris2/ + 421. http://www.wins.uva.nl/cgi-bin/sfaq.cgi + 422. ftp://ftp.wins.uva.nl/pub/solaris + 423. http://www.science.uva.nl/pub/solaris/solaris2.html + 424. http://www.stokely.com/ + 425. http://www.stokely.com/unix.sysadm.resources/faqs.sun.html + 426. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 427. http://www.columbia.edu/kermit/ckubwr.html#top + 428. http://www.columbia.edu/kermit/ckubwr.html#contents + 429. http://www.columbia.edu/kermit/ckubwr.html#x3 + 430. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 431. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2 + 432. http://www.columbia.edu/kermit/ckubwr.html#top + 433. http://www.columbia.edu/kermit/ckubwr.html#contents + 434. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 435. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3 + 436. http://www.columbia.edu/kermit/ckubwr.html#x3.7.1 + 437. http://www.columbia.edu/kermit/ckubwr.html#top + 438. http://www.columbia.edu/kermit/ckubwr.html#contents + 439. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 440. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4 + 441. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2 + 442. http://www.columbia.edu/kermit/ckubwr.html#top + 443. http://www.columbia.edu/kermit/ckubwr.html#contents + 444. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 445. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5 + 446. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3 + 447. news:comp.os.vms + 448. http://www.columbia.edu/kermit/ckubwr.html#top + 449. http://www.columbia.edu/kermit/ckubwr.html#contents + 450. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 451. http://www.columbia.edu/kermit/ckubwr.html#x3.7.6 + 452. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4 + 453. http://www.columbia.edu/kermit/ckubwr.html#top + 454. http://www.columbia.edu/kermit/ckubwr.html#contents + 455. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 456. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5 + 457. http://www.columbia.edu/kermit/ckubwr.html#top + 458. http://www.columbia.edu/kermit/ckubwr.html#contents + 459. http://www.columbia.edu/kermit/ckubwr.html#x3 + 460. http://www.columbia.edu/kermit/ckubwr.html#x3.9 + 461. http://www.columbia.edu/kermit/ckubwr.html#x3.7 + 462. http://www.stokely.com/ + 463. http://access1.sun.com/ + 464. http://www.ludd.luth.se/~bear/project/sun/sun.hardware.txt + 465. ftp://ftp.netcom.com/pub/ru/rubicon/sun.hdwr.ref + 466. ftp://ftp.intnet.net/pub/SUN/Sun-Hardware-Ref + 467. http://www.columbia.edu/kermit/ckubwr.html#top + 468. http://www.columbia.edu/kermit/ckubwr.html#contents + 469. http://www.columbia.edu/kermit/ckubwr.html#x3 + 470. http://www.columbia.edu/kermit/ckubwr.html#x3.10 + 471. http://www.columbia.edu/kermit/ckubwr.html#x3.8 + 472. news:comp.unix.ultrix + 473. news:comp.sys.dec + 474. http://www.columbia.edu/kermit/ckubwr.html#top + 475. http://www.columbia.edu/kermit/ckubwr.html#contents + 476. http://www.columbia.edu/kermit/ckubwr.html#x3 + 477. http://www.columbia.edu/kermit/ckubwr.html#x3.11 + 478. http://www.columbia.edu/kermit/ckubwr.html#x3.9 + 479. http://www.freebird.org/ + 480. http://www.freebird.org/faq/ + 481. news:comp.unix.unixware.misc + 482. news:comp.unix.sco.misc + 483. http://www.columbia.edu/kermit/ckubwr.html#x3.0 + 484. ftp://kermit.columbia.edu/kermit/f/ckutio.c + 485. http://www.columbia.edu/kermit/ckubwr.html#top + 486. http://www.columbia.edu/kermit/ckubwr.html#contents + 487. http://www.columbia.edu/kermit/ckubwr.html#x3 + 488. http://www.columbia.edu/kermit/ckubwr.html#x3.12 + 489. http://www.columbia.edu/kermit/ckubwr.html#x3.10 + 490. http://www.columbia.edu/kermit/ckubwr.html#top + 491. http://www.columbia.edu/kermit/ckubwr.html#contents + 492. http://www.columbia.edu/kermit/ckubwr.html#x3 + 493. http://www.columbia.edu/kermit/ckubwr.html#x3.13 + 494. http://www.columbia.edu/kermit/ckubwr.html#x3.11 + 495. http://www.columbia.edu/kermit/ckubwr.html#top + 496. http://www.columbia.edu/kermit/ckubwr.html#contents + 497. http://www.columbia.edu/kermit/ckubwr.html#x3 + 498. http://www.columbia.edu/kermit/ckubwr.html#x3.14 + 499. http://www.columbia.edu/kermit/ckubwr.html#x3.12 + 500. http://www.columbia.edu/kermit/ckubwr.html#top + 501. http://www.columbia.edu/kermit/ckubwr.html#contents + 502. http://www.columbia.edu/kermit/ckubwr.html#x3 + 503. http://www.columbia.edu/kermit/ckubwr.html#x3.15 + 504. http://www.columbia.edu/kermit/ckubwr.html#x3.13 + 505. news:comp.sys.sgi.misc + 506. news:comp.sys.sgi.admin + 507. http://www.sgi.com/ + 508. http://www-viz.tamu.edu/~sgi-faq/ + 509. ftp://viz.tamu.edu/pub/sgi/faq/ + 510. http://www.columbia.edu/kermit/ckuins.html + 511. http://freeware.sgi.com/Installable/gcc-2.95.2.html + 512. http://freeware.sgi.com/Installable/gcc-2.95.2.html + 513. http://www.columbia.edu/kermit/ckubwr.html#top + 514. http://www.columbia.edu/kermit/ckubwr.html#contents + 515. http://www.columbia.edu/kermit/ckubwr.html#x3 + 516. http://www.columbia.edu/kermit/ckubwr.html#x3.16 + 517. http://www.columbia.edu/kermit/ckubwr.html#x3.14 + 518. news:comp.sys.be + 519. http://www.columbia.edu/kermit/ckubwr.html#top + 520. http://www.columbia.edu/kermit/ckubwr.html#contents + 521. http://www.columbia.edu/kermit/ckubwr.html#x3 + 522. http://www.columbia.edu/kermit/ckubwr.html#x3.17 + 523. http://www.columbia.edu/kermit/ckubwr.html#x3.15 + 524. http://www.columbia.edu/kermit/ckubwr.html#top + 525. http://www.columbia.edu/kermit/ckubwr.html#contents + 526. http://www.columbia.edu/kermit/ckubwr.html#x3 + 527. http://www.columbia.edu/kermit/ckubwr.html#x3.18 + 528. http://www.columbia.edu/kermit/ckubwr.html#x3.16 + 529. http://www.columbia.edu/kermit/ckubwr.html#top + 530. http://www.columbia.edu/kermit/ckubwr.html#contents + 531. http://www.columbia.edu/kermit/ckubwr.html#x3 + 532. http://www.columbia.edu/kermit/ckubwr.html#x3.19 + 533. http://www.columbia.edu/kermit/ckubwr.html#x3.17 + 534. http://www.columbia.edu/kermit/ckubwr.html#top + 535. http://www.columbia.edu/kermit/ckubwr.html#contents + 536. http://www.columbia.edu/kermit/ckubwr.html#x3 + 537. http://www.columbia.edu/kermit/ckubwr.html#x3.20 + 538. http://www.columbia.edu/kermit/ckubwr.html#x3.18 + 539. http://www.columbia.edu/kermit/mac.html + 540. http://www.amazon.com/gp/product/B0000VYJRY?ie=UTF8&tag=aleidmoreldom-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0000VYJRY + 541. http://www.columbia.edu/kermit/ckuins.html#x10 + 542. http://www.columbia.edu/kermit/ckuins.html + 543. http://www.amazon.com/gp/product/B000FX61MS?ie=UTF8&tag=aleidmoreldom-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B000FX61MS + 544. mailto:kermit@columbia.edu + 545. http://www.columbia.edu/kermit/ckubwr.html#top + 546. http://www.columbia.edu/kermit/ckubwr.html#contents + 547. http://www.columbia.edu/kermit/ckubwr.html#x3 + 548. http://www.columbia.edu/kermit/ckubwr.html#x3.19 + 549. http://www.uni-giessen.de/faq/archiv/coherent-faq.general/msg00000.html + 550. http://www.columbia.edu/kermit/ckubwr.html#top + 551. http://www.columbia.edu/kermit/ckubwr.html#contents + 552. http://www.columbia.edu/kermit/ckubwr.html#x5 + 553. http://www.columbia.edu/kermit/ckubwr.html#x3 + 554. http://www.columbia.edu/kermit/ckccfg.html + 555. http://www.columbia.edu/kermit/ckubwr.html#top + 556. http://www.columbia.edu/kermit/ckubwr.html#contents + 557. http://www.columbia.edu/kermit/ckubwr.html#x6 + 558. http://www.columbia.edu/kermit/ckubwr.html#x4 + 559. http://www.columbia.edu/kermit/ckuins.html + 560. http://www.columbia.edu/kermit/ckubwr.html#top + 561. http://www.columbia.edu/kermit/ckubwr.html#contents + 562. http://www.columbia.edu/kermit/ckubwr.html#x7 + 563. http://www.columbia.edu/kermit/ckubwr.html#x5 + 564. http://www.columbia.edu/kermit/ckuins.html#9.5 + 565. http://www.columbia.edu/kermit/ckubwr.html#x3 + 566. http://www.columbia.edu/kermit/ckubwr.html#top + 567. http://www.columbia.edu/kermit/ckubwr.html#contents + 568. http://www.columbia.edu/kermit/ckubwr.html#x8 + 569. http://www.columbia.edu/kermit/ckubwr.html#x6 + 570. http://www.columbia.edu/kermit/ckuins.html#x8 + 571. http://www.columbia.edu/kermit/ckuins.html + 572. http://www.columbia.edu/kermit/ck60manual.html + 573. http://www.columbia.edu/kermit/cable.html + 574. http://www.columbia.edu/kermit/ckubwr.html#top + 575. http://www.columbia.edu/kermit/ckubwr.html#contents + 576. http://www.columbia.edu/kermit/ckubwr.html#x9 + 577. http://www.columbia.edu/kermit/ckubwr.html#x7 + 578. http://www.columbia.edu/kermit/ckubwr.html#top + 579. http://www.columbia.edu/kermit/ckubwr.html#contents + 580. http://www.columbia.edu/kermit/ckubwr.html#x10 + 581. http://www.columbia.edu/kermit/ckubwr.html#x8 + 582. http://www.columbia.edu/kermit/ck60manual.html + 583. http://dickey.his.com/xterm/xterm.html + 584. http://www.columbia.edu/kermit/ckubwr.html#top + 585. http://www.columbia.edu/kermit/ckubwr.html#contents + 586. http://www.columbia.edu/kermit/ckubwr.html#x11 + 587. http://www.columbia.edu/kermit/ckubwr.html#x9 + 588. http://www.columbia.edu/kermit/ckubwr.html#top + 589. http://www.columbia.edu/kermit/ckubwr.html#contents + 590. http://www.columbia.edu/kermit/ckubwr.html#x12 + 591. http://www.columbia.edu/kermit/ckubwr.html#x10 + 592. http://www.columbia.edu/kermit/ckubwr.html#x11.1 + 593. http://www.columbia.edu/kermit/ckubwr.html#x11.2 + 594. http://www.columbia.edu/kermit/ckubwr.html#top + 595. http://www.columbia.edu/kermit/ckubwr.html#contents + 596. http://www.columbia.edu/kermit/ckubwr.html#x11 + 597. http://www.columbia.edu/kermit/ckubwr.html#x11.2 + 598. http://www.columbia.edu/kermit/ck60manual.html + 599. http://www.columbia.edu/kermit/ckubwr.html#top + 600. http://www.columbia.edu/kermit/ckubwr.html#contents + 601. http://www.columbia.edu/kermit/ckubwr.html#x11 + 602. http://www.columbia.edu/kermit/ckubwr.html#x11.1 + 603. http://www.columbia.edu/kermit/ck60manual.html + 604. http://www.columbia.edu/kermit/ckubwr.html#top + 605. http://www.columbia.edu/kermit/ckubwr.html#contents + 606. http://www.columbia.edu/kermit/ckubwr.html#x13 + 607. http://www.columbia.edu/kermit/ckubwr.html#x11 + 608. http://www.columbia.edu/kermit/security.html + 609. http://www.columbia.edu/kermit/ckubwr.html#top + 610. http://www.columbia.edu/kermit/ckubwr.html#contents + 611. http://www.columbia.edu/kermit/ckubwr.html#x14 + 612. http://www.columbia.edu/kermit/ckubwr.html#x12 + 613. http://www.columbia.edu/kermit/ckubwr.html#top + 614. http://www.columbia.edu/kermit/ckubwr.html#contents + 615. http://www.columbia.edu/kermit/ckubwr.html#x15 + 616. http://www.columbia.edu/kermit/ckubwr.html#x14 + 617. mailto:support@stallion.oz.au + 618. http://www.stallion.com/ + 619. http://www.columbia.edu/kermit/ckubwr.html#top + 620. http://www.columbia.edu/kermit/ckubwr.html#contents + 621. http://www.columbia.edu/kermit/ckermit.html + 622. http://www.columbia.edu/kermit/ck80.html + 623. http://www.columbia.edu/kermit/index.html + 624. http://www.columbia.edu/kermit/index.html + 625. http://www.columbia.edu/ + 626. mailto:kermit@columbia.edu diff --git a/ckucmd.c b/ckucmd.c index 3ea4807..274dc2d 100644 --- a/ckucmd.c +++ b/ckucmd.c @@ -190,7 +190,13 @@ modules would have to be changed... #endif /* CK_ANSIC */ #endif /* OSF13 */ +#ifndef HPUXPRE65 #include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ #ifdef OS2 #ifndef NT diff --git a/ckucon.c b/ckucon.c index 776682d..50ceb7e 100644 --- a/ckucon.c +++ b/ckucon.c @@ -1,13 +1,13 @@ #include "ckcsym.h" -char *connv = "CONNECT Command for UNIX:fork(), 9.0.116, 1 Mar 2010"; +char *connv = "CONNECT Command for UNIX:fork(), 9.0.117, 14 Jul 2011"; /* C K U C O N -- Terminal connection to remote system, for UNIX */ /* Author: Frank da Cruz , Columbia University Academic Information Systems, New York City. - Copyright (C) 1985, 2010, + Copyright (C) 1985, 2011, Trustees of Columbia University in the City of New York. All rights reserved. See the C-Kermit COPYING.TXT file or the copyright text in the ckcmai.c module for disclaimer and permissions. @@ -43,7 +43,14 @@ _PROTOTYP( static VOID concld, (void) ); #endif /* NEXT */ #include /* Signals */ -#include /* Error numbers */ + +#ifndef HPUXPRE65 +#include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ #ifdef ZILOG /* Longjumps */ #include diff --git a/ckufio.c b/ckufio.c index d860757..b5bfaae 100644 --- a/ckufio.c +++ b/ckufio.c @@ -3,12 +3,12 @@ #define CK_NONBLOCK /* See zoutdump() */ #ifdef aegis -char *ckzv = "Aegis File support, 9.0.215, 13 Jun 2011"; +char *ckzv = "Aegis File support, 9.0.216, 20 Aug 2011"; #else #ifdef Plan9 -char *ckzv = "Plan 9 File support, 9.0.215, 13 Jun 2011"; +char *ckzv = "Plan 9 File support, 9.0.216, 20 Aug 2011"; #else -char *ckzv = "UNIX File support, 9.0.215, 13 Jun 2011"; +char *ckzv = "UNIX File support, 9.0.216, 20 Aug 2011"; #endif /* Plan9 */ #endif /* aegis */ /* @@ -69,7 +69,14 @@ _PROTOTYP( int parser, ( int ) ); #endif /* OSF13 */ #endif /* COMMENT */ -#include +#ifndef HPUXPRE65 +#include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ + #include #ifdef MINIX2 @@ -1062,6 +1069,7 @@ logwtmp __P ((__const char *__ut_line, __const char *__ut_name, #endif /* IRIX60 */ #endif /* SOLARIS */ #endif /* HAVEUTMPX */ + #ifdef HAVEUTMPX #include #else @@ -1150,7 +1158,11 @@ logwtmp(line, name, host) char *line, *name, *host; } if (!fstat(wtmpfd, &buf)) { ckstrncpy(ut.ut_line, line, sizeof(ut.ut_line)); +#ifdef FREEBSD9 + ckstrncpy(ut.ut_user, name, sizeof(ut.ut_user)); +#else ckstrncpy(ut.ut_name, name, sizeof(ut.ut_name)); +#endif /* FREEBSD9 */ #ifdef HAVEUTHOST /* Not portable */ ckstrncpy(ut.ut_host, host, sizeof(ut.ut_host)); diff --git a/ckuins.txt b/ckuins.txt index 6176dad..08cfedb 100644 --- a/ckuins.txt +++ b/ckuins.txt @@ -13,8 +13,8 @@ C-Kermit 9.0 Installation Instructions and Options for Unix The Kermit Project Columbia University - As of C-Kermit version: 9.0.300, 30 June 2011 - This file last updated: Tue Jun 28 08:28:08 2011 (New York City + As of C-Kermit version: 9.0.302, 20 August 2011 + This file last updated: Sun Aug 21 12:08:29 2011 (New York City time) IF YOU ARE READING A PLAIN-TEXT version of this document, it is a @@ -157,12 +157,12 @@ OVERVIEW Thus, a well-crafted installation procedure should present the options and allow the installer to choose the method, if any, for regulating - accesss to the dialout devices: + access to the dialout devices: a. Check the permissions of the lockfile directory and the dialout - devices. If they do not allow group or world R/W accesss, then: + devices. If they do not allow group or world R/W access, then: b. "Your UUCP lockfile directory and/or dialout devices require - privilege to accesss. You must either change their permissions or + privilege to access. You must either change their permissions or install Kermit with privileges." c. "If you wish to install Kermit with privileges, it will be given the same owner, group, and permissions as the cu program so it can @@ -196,7 +196,7 @@ OVERVIEW Hundreds of prebuilt C-Kermit binaries are available on the CDROM in the BINARY tree [NOTE: The C-Kermit CDROM is still for version 7.0], and at our ftp site in the [72]kermit/bin area (with names starting - with "ck"), also accesssible on the [73]C-Kermit website. To install a + with "ck"), also accessible on the [73]C-Kermit website. To install a prebuilt binary: a. Rename the binary to "wermit". @@ -355,7 +355,7 @@ ln -s kermit telnet (Also see the [110]Configurations Options document, [111]Section 8). Lots of new features have been added in versions 7.0 and 8.0 that - require accesss to new symbols, APIs, libraries, etc, and this will no + require access to new symbols, APIs, libraries, etc, and this will no doubt cause problems in compiling, linking, or execution on platforms where 6.0 and earlier built without incident. This section contains what we know as of the date of this file. @@ -1172,6 +1172,10 @@ touch ckcpro.c make particular connections, execute complicated scripts, whatever you want. + And in C-Kermit 9.0 the initialization has indeed been "retired" by + renaming it to okermit.ini, and replaced by a stub ckermit.ini that + doesn't do anything but print a message. Ditto for ckermod.ini. + 5.2. Text Files These are entirely optional. Many of them are to be found at the Kermit @@ -1202,38 +1206,43 @@ touch ckcpro.c the Kermit website as: [183]http://www.columbia.edu/kermit/ckermit80.html - [184]ckcbwr.txt + [184]ckermit90.txt + Supplement to [185]Using C-Kermit for version 9.0. Available on + the Kermit website as: + [186]http://www.columbia.edu/kermit/ckermit90.html + + [187]ckcbwr.txt The general C-Kermit hints and tips ("beware") file. Available on the Kermit website as: - [185]http://www.columbia.edu/kermit/ckcbwr.html + [188]http://www.columbia.edu/kermit/ckcbwr.html - [186]ckubwr.txt + [189]ckubwr.txt The Unix-specific C-Kermit hints and tips file. Available on the Kermit website as: - [187]http://www.columbia.edu/kermit/ckubwr.html + [190]http://www.columbia.edu/kermit/ckubwr.html - [188]ckuins.txt + [191]ckuins.txt Unix C-Kermit Installation Instructions (this file). Available on the Kermit website as: - [189]http://www.columbia.edu/kermit/ckuins.html + [192]http://www.columbia.edu/kermit/ckuins.html - [190]ckccfg.txt + [193]ckccfg.txt C-Kermit compile-time configuration options. Available on the Kermit website as: - [191]http://www.columbia.edu/kermit/ckccfg.html + [194]http://www.columbia.edu/kermit/ckccfg.html - [192]ckcplm.txt + [195]ckcplm.txt The C-Kermit program logic manual. Available on the Kermit website as: - [193]http://www.columbia.edu/kermit/ckcplm.html + [196]http://www.columbia.edu/kermit/ckcplm.html - [194]ca_certs.pem + [197]ca_certs.pem Certificate Authority certificates for secure connections (see - [195]Section 16). + [198]Section 16). 5.3. Installing the Kermit Files - There is an "install" target in the [196]makefile that you can use if + There is an "install" target in the [199]makefile that you can use if you wish. However, since every site has its own layout and requirements, it is often better to install the Kermit files by hand. You don't have to use the makefile install target to install C-Kermit. @@ -1247,7 +1256,7 @@ touch ckcpro.c available. In most cases, you need to be root to install C-Kermit, if only to gain - write accesss to directories in which the binary and manual page are to + write access to directories in which the binary and manual page are to be copied. The C-Kermit binary should be installed in a directory that is in the users' PATH, but that is not likely to be overwritten when you install a new version of the operating system. A good candidate @@ -1264,11 +1273,11 @@ chmod 755 /usr/local/bin/kermit make install IMPORTANT: IF C-KERMIT IS TO BE USED FOR DIALING OUT, you must also do - something to give it accesss to the dialout devices and lockfile + something to give it access to the dialout devices and lockfile directories. The 'install' target does not attempt to set Kermit's owner, group, and permissions to allow dialing out. This requires privileges, open eyes, and human decision-making. Please read - [197]Sections 10 and [198]11 below, make the necessary decisions, and + [200]Sections 10 and [201]11 below, make the necessary decisions, and then implement them by hand as described in those sections. You should also install the man page, which is called ckuker.nr, in the @@ -1276,7 +1285,7 @@ make install appropriately, e.g. to kermit.1. This is also taken care of by "make install". - Optionally, the text files listed in the [199]previous section can be + Optionally, the text files listed in the [202]previous section can be placed in a publicly readable directory. Suggested directory names are: /usr/local/doc/kermit/ @@ -1306,10 +1315,10 @@ K_INFO_DIR give it the information it needs by setting the variables described below. You can use this target if: - * You downloaded the [200]complete C-Kermit archive and built + * You downloaded the [203]complete C-Kermit archive and built C-Kermit from source; or: - * You downloaded an [201]individual C-Kermit binary and the - [202]C-Kermit text-file archive, and your computer has a "make" + * You downloaded an [204]individual C-Kermit binary and the + [205]C-Kermit text-file archive, and your computer has a "make" command. Here are the parameters you need to know: @@ -1430,7 +1439,7 @@ CERTDIR = 6. INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES - [ [203]Top ] [ [204]Contents ] [ [205]Next ] [ [206]Previous ] + [ [206]Top ] [ [207]Contents ] [ [208]Next ] [ [209]Previous ] This section is obsolete. We don't distribute C-Kermit on diskettes any more because (a)there is no demand, and (b) it no longer fits. @@ -1490,7 +1499,7 @@ done 7. CHECKING THE RESULTS - [ [207]Top ] [ [208]Contents ] [ [209]Next ] [ [210]Previous ] + [ [210]Top ] [ [211]Contents ] [ [212]Next ] [ [213]Previous ] First some quick checks for problems that can be easily corrected by recompiling with different options: @@ -1531,14 +1540,14 @@ done a. Start C-Kermit (usually by typing "./wermit" in the directory where you ran the makefile). Do you see the C-Kermit> prompt? If not, C-Kermit incorrectly deduced that it was running in the background. - The test is in conbgt() in [211]ckutio.c. If you can fix it for + The test is in conbgt() in [214]ckutio.c. If you can fix it for your system, please send in the fix (Hint: read about "PID_T" below). Otherwise, you can force C-Kermit to foreground mode by starting it with the -z command line option, as in "kermit -z", or giving the interactive command SET BACKGROUND OFF. b. When you type characters at the C-Kermit prompt, do they echo immediately? If not, something is wrong with concb() and probably - the other terminal mode settings routines in [212]ckutio.c. Be sure + the other terminal mode settings routines in [215]ckutio.c. Be sure you have used the most appropriate make entry. c. At the C-Kermit> prompt, type "send ./?". C-Kermit should list all the files in the current directory. If not, it was built for the @@ -1547,7 +1556,7 @@ done d. CD to a directory that contains a variety of files, symlinks, and subdirectories and give a DIRECTORY command at the C-Kermit> prompt. Do the permissions, size, and date appear correct? If not - see [213]Section 4.0. + see [216]Section 4.0. e. Assuming your platform supports long file names, create a file with a long name in your current directory, e.g.: @@ -1562,22 +1571,22 @@ $ touch thisisafilewithaveryveryveryveryveryveryveryverylooooooooongname f. Make sure that Kermit has the maximum path length right. Just type SHOW FILE and see what it says about this. If it is too short, there could be some problems at runtime. To correct, look in - [214]ckcdeb.h to see how the symbol CKMAXPATH is set and make any + [217]ckcdeb.h to see how the symbol CKMAXPATH is set and make any needed adjustments. g. Send a file to your new Kermit program from a different Kermit program that is known to work. Is the date/timestamp of the new file identical to the original? If not, adjustments are needed in - zstrdt() in [215]ckufio.c. + zstrdt() in [218]ckufio.c. h. Go to another computer (Computer B) from which you can send files to C-Kermit. Connect Computer B to the computer (A) where you are testing C-Kermit. Then: i. Send a file from B to A. Make sure it transferred OK and was - created with the the right name. + created with the right name. j. Send a file from B to A, specifying an "as-name" that is very, very long (longer than the maximum name length on computer A). Check to make sure that the file was received OK and that its name was truncated to Computer A's maximum length. If not, check the - MAXNAMLEN definition in [216]ckufio.c. + MAXNAMLEN definition in [219]ckufio.c. k. Tell C-Kermit on Computer A to "set receive pathnames relative" and then send it a file from Computer B specifying an as-name that contains several directory segments: @@ -1606,16 +1615,16 @@ send foo dir1/dir2/dir3/foo became totally frozen, then you are probably running C-Kermit on a Unix version that supports job control, but under a shell that doesn't. If that's not the case, look in the congm() and psuspend() - routines in [217]ckutio.c and see if you can figure out what's + routines in [220]ckutio.c and see if you can figure out what's wrong. If you can't, rebuild with -DNOJC. o. Give a SET LINE command for a dialout device, e.g. "set line - /dev/tty00". If you got some kind of permission or accesss denied - message, go read [218]Section 10 and then come back here. + /dev/tty00". If you got some kind of permission or access denied + message, go read [221]Section 10 and then come back here. p. After giving a successful SET LINE command, type "show comm" to see the communication parameters. Do they make sense? q. Type "set speed ?" and observe the list of available speeds. Is it - what you expected? If not, see [219]Section 2) of the - [220]Configurations Options document. + what you expected? If not, see [222]Section 2) of the + [223]Configurations Options document. r. Give a SET SPEED command to change the device's speed. Did it work? (Type "show comm" again to check.) s. Try dialing out: SET MODEM TYPE , SET LINE , SET SPEED , DIAL . If @@ -1632,16 +1641,16 @@ send foo dir1/dir2/dir3/foo w. If your version was built with fullscreen file transfer display support, check that it works during local-mode file transfer. Also, check C-Kermit's operation afterwards: is the echoing funny? etc - etc. If there are problems, see [221]Section 4. + etc. If there are problems, see [224]Section 4. x. If your version was built with script programming language support, TAKE the ckedemo.ksc file to give it a workout. y. Does C-Kermit interlock correctly with UUCP-family programs (cu, - tip, uucp, etc)? If not, read the section [222]DIALING OUT AND + tip, uucp, etc)? If not, read the section [225]DIALING OUT AND COORDINATING WITH UUCP below. z. Modem signals... Give a SET LINE command to a serial device and then type the SHOW MODEM command. If it says "Modem signals unavailable in this version of Kermit", then you might want to look - at the ttgmdm() routine in [223]ckutio.c and add the needed code -- + at the ttgmdm() routine in [226]ckutio.c and add the needed code -- if indeed your version of Unix provides a way to get modem signals (some don't; e.g. modem signals are a foreign concept to POSIX, requiring politically incorrect workarounds). @@ -1652,7 +1661,7 @@ send foo dir1/dir2/dir3/foo To test, SET LINE , SET MODEM NONE, and HANGUP. The DTR light should go out momentarily. If it doesn't, see if you can add the needed code for your system to the tthang() routine in - [224]ckutio.c. + [227]ckutio.c. ac. If your version of Kermit has the SET FLOW RTS/CTS command, check to see if it works: give Kermit this command, set your modem for RTS/CTS, transfer some files (using big packet and window sizes) @@ -1660,29 +1669,29 @@ send foo dir1/dir2/dir3/foo off (and Kermit does not get packet errors), then it works. If your version of Kermit does not have this command, but your version of Unix does support hardware flow control, take a look at the - tthflow() command in [225]ckutio.c and see if you can add the - needed code (see the section on [226]HARDWARE FLOW CONTROL below). - (And please [227]send back any added code, so that others can + tthflow() command in [228]ckutio.c and see if you can add the + needed code (see the section on [229]HARDWARE FLOW CONTROL below). + (And please [230]send back any added code, so that others can benefit from it and it can be carried forward into future releases.) ad. If C-Kermit starts normally and issues its prompt, echoing is normal, etc, but then after returning from a CONNECT session, the prompt no longer appears, try rebuilding with -DCKCONINTB4CB. ae. (8.0.206 or later) Type some commands at the C-Kermit prompt. Can - you use the Up-arrow and Down-arrow keys on your keyboard to - accesss Kermit's command history? If not, and you're a programmer, - take a look at the USE_ARROWKEYS sections of ckucmd.c. + you use the Up-arrow and Down-arrow keys on your keyboard to access + Kermit's command history? If not, and you're a programmer, take a + look at the USE_ARROWKEYS sections of ckucmd.c. 8. REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE - [ [228]Top ] [ [229]Contents ] [ [230]Next ] [ [231]Previous ] + [ [231]Top ] [ [232]Contents ] [ [233]Next ] [ [234]Previous ] - Also see: [232]C-Kermit Configuration Options + Also see: [235]C-Kermit Configuration Options a. Many of C-Kermit's options and features can be deselected at compile time. The greatest savings at the least sacrifice in functionality is to disable the logging of debug information by - defining NODEBUG during compilation. See the [233]Configurations + defining NODEBUG during compilation. See the [236]Configurations Options document for further information. b. Use shared libraries rather than static linking. This is the default on many Unix systems anyway. However, executables built for @@ -1702,22 +1711,22 @@ send foo dir1/dir2/dir3/foo 9. UNIX VERSIONS - [ [234]Top ] [ [235]Contents ] [ [236]Next ] [ [237]Previous ] + [ [237]Top ] [ [238]Contents ] [ [239]Next ] [ [240]Previous ] SECTION CONTENTS -9.1 [238]Standards - 9.1.1. [239]POSIX - 9.1.2. [240]ANSI C - 9.1.3. [241]Other Standards -9.2. [242]Library Issues -9.3. [243]Unix File System Peculiarities -9.4. [244]Hardware Flow Control -9.5. [245]Terminal Speeds -9.6. [246]Millisecond Sleeps -9.7. [247]Nondestructive Input Buffer Peeking -9.8. [248]Other System-Dependent Features -9.9. [249]Terminal Interruption +9.1 [241]Standards + 9.1.1. [242]POSIX + 9.1.2. [243]ANSI C + 9.1.3. [244]Other Standards +9.2. [245]Library Issues +9.3. [246]Unix File System Peculiarities +9.4. [247]Hardware Flow Control +9.5. [248]Terminal Speeds +9.6. [249]Millisecond Sleeps +9.7. [250]Nondestructive Input Buffer Peeking +9.8. [251]Other System-Dependent Features +9.9. [252]Terminal Interruption There are several major varieties of Unix: Bell Laboratories Seventh Edition, AT&T System V, Berkeley Standard Distribution (BSD), and @@ -1772,7 +1781,7 @@ send foo dir1/dir2/dir3/foo APIs to get at serial speeds higher than 38400, but then doing so removes hardware flow control -- just when we need it most! In cases like this, dirty tricks are the only recourse (search for SCO_OSR504 in - [250]ckutio.c for examples). + [253]ckutio.c for examples). For reasons like this, Unix implementations tend to be neither pure AT&T nor pure BSD nor pure POSIX, but a mixture of two or more of @@ -1789,13 +1798,13 @@ send foo dir1/dir2/dir3/foo 9.1. Standards - [ [251]Top ] [ [252]Section Contents ] [ [253]Contents ] [ [254]Next ] + [ [254]Top ] [ [255]Section Contents ] [ [256]Contents ] [ [257]Next ] SUBSECTION CONTENTS -9.1.1. [255]POSIX -9.1.2. [256]ANSI C -9.1.3. [257]Other Standards +9.1.1. [258]POSIX +9.1.2. [259]ANSI C +9.1.3. [260]Other Standards In edits 166-167 (1988-89), C-Kermit was heavily modified to try to keep abreast of new standards while still remaining compatible with old @@ -1833,7 +1842,7 @@ send foo dir1/dir2/dir3/foo have some degree of POSIX compliance, but still use BSD or AT&T specific features. - The dilimma is this: it is often necessary to define _POSIX_SOURCE to + The dilemma is this: it is often necessary to define _POSIX_SOURCE to get at new or modern features, such as high serial speeds and the APIs to deal with them. But defining _POSIX_SOURCE also hides other APIs that Kermit needs, for example the ones dealing with modem signals @@ -1918,8 +1927,8 @@ make posix "KFLAGS=-DHDBUUCP" 9.1.2. ANSI C - [ [258]Top ] [ [259]Contents ] [ [260]Section Contents ] [ - [261]Subsection Contents ] [ [262]Next ] [ [263]Previous ] + [ [261]Top ] [ [262]Contents ] [ [263]Section Contents ] [ + [264]Subsection Contents ] [ [265]Next ] [ [266]Previous ] The major difference between ANSI C and earlier C compilers is function prototyping. ANSI C allows function arguments to be checked for type @@ -1952,14 +1961,14 @@ make posix "KFLAGS=-DHDBUUCP" 9.1.3. Other Standards - [ [264]Top ] [ [265]Contents ] [ [266]Section Contents ] [ - [267]Subsection Contents ] [ [268]Next ] [ [269]Previous ] + [ [267]Top ] [ [268]Contents ] [ [269]Section Contents ] [ + [270]Subsection Contents ] [ [271]Next ] [ [272]Previous ] As the years go by, standards with-which-all-must-comply continue to pile up: AES, XPG2, XPG3, XPG4, FIPS 151-2, successive generations of POSIX, OSF/1, X/Open, Spec 1170, UNIX95, Open Group UNIX98, ISO/IEC 9945 parts 1-4, ISO 9899, 88Open, OS 99, Single Unix Specification - (SUS, [270]IEEE 1003.1-2001, not to mention "mature standards" like V7, + (SUS, [273]IEEE 1003.1-2001, not to mention "mature standards" like V7, 4.2/4.3BSD, System V R3 and R4 (SVID2 and SVID3), 4.4BSD (the basis for BSDI, OpenBSD, NetBSD, FreeBSD, Mac OS X etc), /usr/group, plus assorted seismic pronouncements of the neverending series of ephemeral @@ -1969,13 +1978,13 @@ make posix "KFLAGS=-DHDBUUCP" None of these standards simplifies life for portable applications like C-Kermit -- each one is simply one more environment to support (or circumvent, as in many cases these standards do more harm than good by - denying accesss to facilities we need, e.g. as noted in above in - [271]9.1.1). + denying access to facilities we need, e.g. as noted in above in + [274]9.1.1). 9.2. Library Issues - [ [272]Top ] [ [273]Contents ] [ [274]Section Contents ] [ - [275]Subsection Contents ] [ [276]Next ] [ [277]Previous ] + [ [275]Top ] [ [276]Contents ] [ [277]Section Contents ] [ + [278]Subsection Contents ] [ [279]Next ] [ [280]Previous ] On most modern platforms, applications are -- and often must be -- dynamically linked. This has numerous advantages (smaller executables, @@ -2001,8 +2010,8 @@ make posix "KFLAGS=-DHDBUUCP" 9.3. Unix File System Peculiarities - [ [278]Top ] [ [279]Contents ] [ [280]Section Contents ] [ [281]Next ] - [ [282]Previous ] + [ [281]Top ] [ [282]Contents ] [ [283]Section Contents ] [ [284]Next ] + [ [285]Previous ] Normally, including a BSD, System-V, POSIX, or DIRENT flag in the make entry selects the right file system code. But some versions of Unix are @@ -2048,7 +2057,7 @@ make posix "KFLAGS=-DHDBUUCP" to your makefile target. Another problem child is . Most Unix C-Kermit versions need - to #include this file from within [283]ckufio.c and [284]ckutio.c, but + to #include this file from within [286]ckufio.c and [287]ckutio.c, but some not only do not need to include it, but MUST not include it because (a) it doesn't exist, or (b) it has already been included by some other header file and it doesn't protect itself against multiple @@ -2100,12 +2109,12 @@ make posix "KFLAGS=-DHDBUUCP" attribute packet, if any. If you find that the dates are set incorrectly, you might need to build Kermit with the -DSYSUTIMEH flag, to tell it to include . If that doesn't help, look at the - code in zstrdt() in [285]ckufio.c. + code in zstrdt() in [288]ckufio.c. 9.4. Hardware Flow Control - [ [286]Top ] [ [287]Contents ] [ [288]Section Contents ] [ [289]Next ] - [ [290]Previous ] + [ [289]Top ] [ [290]Contents ] [ [291]Section Contents ] [ [292]Next ] + [ [293]Previous ] Hardware flow control is a problematic concept in many popular Unix implementations. Often it is lacking altogether, and when available, @@ -2116,7 +2125,7 @@ make posix "KFLAGS=-DHDBUUCP" b. RTS/CTS flow control support MIGHT be available for System V R3 and later if /usr/include/termiox.h exists (its successful operation also depends on the device driver, and the device itself, not to - mention the [291]cable, etc, actually supporting it). If your + mention the [294]cable, etc, actually supporting it). If your SVR3-or-later Unix system does have this file, add: -DTERMIOX @@ -2141,14 +2150,14 @@ make posix "KFLAGS=-DHDBUUCP" device name must be used. (NeXTSTEP: /dev/cufa instead of /dev/cua; IRIX: /dev/ttyf00) - See the routine tthflow() in [292]ckutio.c for details. If you find + See the routine tthflow() in [295]ckutio.c for details. If you find that your system offers hardware flow control selection under program control, you can add this capability to C-Kermit as follows: a. See if it agrees with one of the methods already used in tthflow(). if not, add new code, appropriately #ifdef'd. b. Add -DCK_RTSCTS to the compiler CFLAGS in your makefile target or - define this symbol within the appropriate #ifdefs in [293]ckcdeb.h. + define this symbol within the appropriate #ifdefs in [296]ckcdeb.h. To illustrate the difficulties with RTS/CTS, here is a tale from Jamie Watson , who added the RTS/CTS code for the RS/6000, @@ -2170,22 +2179,22 @@ make posix "KFLAGS=-DHDBUUCP" 9.5. Terminal Speeds - [ [294]Top ] [ [295]Contents ] [ [296]Section Contents ] [ [297]Next ] - [ [298]Previous ] + [ [297]Top ] [ [298]Contents ] [ [299]Section Contents ] [ [300]Next ] + [ [301]Previous ] The allowable speeds for the SET SPEED command are defined in - [299]ckcdeb.h. If your system supports speeds that are not listed in + [302]ckcdeb.h. If your system supports speeds that are not listed in "set speed ?", you can add definitions for them to ckcdeb.h. Then if the speed you are adding is one that was never used before in Kermit, such as 921600, you'll also need to add the appropriate - keywords to spdtab[] in [300]ckuus3.c, and the corresponding case to - ttsspd() in [301]ckutio.c. + keywords to spdtab[] in [303]ckuus3.c, and the corresponding case to + ttsspd() in [304]ckutio.c. 9.6. Millisecond Sleeps - [ [302]Top ] [ [303]Contents ] [ [304]Section Contents ] [ [305]Next ] - [ [306]Previous ] + [ [305]Top ] [ [306]Contents ] [ [307]Section Contents ] [ [308]Next ] + [ [309]Previous ] There is no standard for millisecond sleeps, but at least five different functions have appeared in various Unix versions that can be @@ -2214,8 +2223,8 @@ make posix "KFLAGS=-DHDBUUCP" 9.7. Nondestructive Input Buffer Peeking - [ [307]Top ] [ [308]Contents ] [ [309]Section Contents ] [ [310]Next ] - [ [311]Previous ] + [ [310]Top ] [ [311]Contents ] [ [312]Section Contents ] [ [313]Next ] + [ [314]Previous ] Some AT&T Unix versions have no way to check if input is waiting on a tty device, but this is a very important feature for Kermit. Without @@ -2255,8 +2264,8 @@ make posix "KFLAGS=-DHDBUUCP" 9.8. Other System-Dependent Features - [ [312]Top ] [ [313]Contents ] [ [314]Section Contents ] [ [315]Next ] - [ [316]Previous ] + [ [315]Top ] [ [316]Contents ] [ [317]Section Contents ] [ [318]Next ] + [ [319]Previous ] Systems with might have the symbol IEXTEN defined. This is used to turn "extended features" in the tty device driver on and off, @@ -2264,7 +2273,7 @@ make posix "KFLAGS=-DHDBUUCP" characters, etc. In most Unix implementations, it should be turned off during Kermit - operation, so if [317]ckutio.c finds this symbol, it uses it. This is + operation, so if [320]ckutio.c finds this symbol, it uses it. This is necessary, at least, on BSDI. On some systems, however, IEXTEN is either misdefined or misimplemented. The symptom is that CR, when typed to the command processor, is echoed as LF, rather than CRLF. This @@ -2278,7 +2287,7 @@ make posix "KFLAGS=-DHDBUUCP" In edits 177 and earlier, workstation users noticed a "slow screen writing" phenomenon during interactive command parsing. This was traced - to a setbuf() call in [318]ckutio.c that made console (stdout) writes + to a setbuf() call in [321]ckutio.c that made console (stdout) writes unbuffered. This setbuf() call has been there forever, and could not be removed without some risk. Kermit's operation was tested on the NeXT in edit 178 with the setbuf() call removed, and the slow-writing symptom @@ -2356,7 +2365,7 @@ make posix "KFLAGS=-DHDBUUCP" -DRENAME C-Kermit predefines the RENAME for several Unix versions in - [319]ckcdeb.h (SVR4, SUNOS41, BSD44, AIXRS, etc). You can tell if + [322]ckcdeb.h (SVR4, SUNOS41, BSD44, AIXRS, etc). You can tell if rename() is being used if the SHOW FEATURES command includes RENAME in the compiler options list. If the predefined RENAME symbol causes trouble, then add NORENAME to your CFLAGS. Trouble includes: @@ -2372,7 +2381,7 @@ make posix "KFLAGS=-DHDBUUCP" Some Unix systems (Olivetti X/OS, Amdahl UTS/V, ICL SVR3, etc) define the S_ISREG and S_ISDIR macros incorrectly. This is compensated for - automatically in [320]ckufio.c. Other systems might have this same + automatically in [323]ckufio.c. Other systems might have this same problem. If you get a compile-time error message regarding S_ISREG and/or S_ISDIR, add the following to your CFLAGS: @@ -2390,8 +2399,8 @@ make posix "KFLAGS=-DHDBUUCP" 9.9. Terminal Interruption - [ [321]Top ] [ [322]Contents ] [ [323]Section Contents ] [ [324]Next ] - [ [325]Previous ] + [ [324]Top ] [ [325]Contents ] [ [326]Section Contents ] [ [327]Next ] + [ [328]Previous ] When C-Kermit enters interactive command mode, it sets a Control-C (terminal keyboard interrupt = SIGINT) trap to allow it to return to @@ -2445,7 +2454,7 @@ make posix "KFLAGS=-DHDBUUCP" 10. DIALING OUT AND COORDINATING WITH UUCP - [ [326]Top ] [ [327]Contents ] [ [328]Next ] [ [329]Previous ] + [ [329]Top ] [ [330]Contents ] [ [331]Next ] [ [332]Previous ] The short version (general): @@ -2459,12 +2468,12 @@ make posix "KFLAGS=-DHDBUUCP" Since Red Hat 7.2, about 2002, Linux does not leave the lockfile handling to each application, but instead provides an external application, /usr/sbin/lockdev, that all applications should invoke - when they need to accesss a serial port; lockdev locks and unlocks + when they need to access a serial port; lockdev locks and unlocks the port without requiring the application to have privileges, since the privileges on the lockfile directory are assigned to lockdev. C-Kermit 8.0.211 and later support this method. But C-Kermit still needs to be able to open the port itself, and therefore if the - port's permissions do not allow read/write accesss to the general + port's permissions do not allow read/write access to the general public, the general rule must still be followed: in the most common case, it must be SETGID to the group uucp (explained below). If a pre-8.0.211 version of C-Kermit is to be installed for use with @@ -2483,14 +2492,14 @@ make posix "KFLAGS=-DHDBUUCP" Peripheral Devices => Terminals and Modems => Add Modem). Unlike most other multiuser, multitasking operating systems, Unix - allows multiple users to accesss the same serial device at the same + allows multiple users to access the same serial device at the same time, even though there is no earthly reason why two users should do this. When they do, user A will read some of the incoming characters, and user B will read the others. In all likelihood, neither user will see them all. Furthermore, User B can hang up User A's call, and so one. - Rather than change Unix to enforce exclusive accesss to serial devices + Rather than change Unix to enforce exclusive access to serial devices such as ttys, when it might still have been possible, Unix developers opted for a "lock file" mechanism. Any process that wants to open a tty device should first check to see if a file of a certain name exists, @@ -2536,7 +2545,7 @@ make posix "KFLAGS=-DHDBUUCP" * PIDs recycle. If the lockfile was created by PID 1234, which later crashed without removing the lockfile, and then a new process 1234 exists a the time the lockfile is checked, the lockfile will be - improperly taken as valid, and accesss to the device denied + improperly taken as valid, and access to the device denied unnecessarily. Several techniques address the problem of multiple names for the same @@ -2594,7 +2603,7 @@ make posix "KFLAGS=-DHDBUUCP" lockfile itself is called, and what its contents should be. In most cases, C-Kermit preprocessor flags create the appropriate configuration at compile time if the appropriate makefile target was used (see - [330]ckutio.c). The following CFLAGS options can be used to override + [333]ckutio.c). The following CFLAGS options can be used to override the built-in configuration: -DLCKDIR @@ -2679,16 +2688,16 @@ CFLAGS= -DBSD4 -DLOCK_DIR=\\\"/usr/local/locks\\\" -DNODEBUG means that you have SET CARRIER ON xx, where xx is the number of seconds to wait for carrier, and carrier did not appear within xx seconds. Solution: SET CARRIER AUTO or OFF. - b. "Sorry, accesss to lock denied." Kermit has been configured to use + b. "Sorry, access to lock denied." Kermit has been configured to use lockfiles, but (a)the lockfile directory is write-protected against - you, or (b) it does not exist. The "accesss to lock denied" message + you, or (b) it does not exist. The "access to lock denied" message will tell you the reason. If the directory does not exist, check to make sure Kermit is using the right name. Just because version n of your Unix used a certain lockfile directory is no guarantee that version n.1 does not use a different one. Workaround: ask the system administrator to install a symbolic link from the old name to the new name. Other solutions: (see below) - c. "Sorry, accesss to tty device denied." The tty device that you + c. "Sorry, access to tty device denied." The tty device that you specified in your SET LINE command is read/write protected against you. Solution: (see below) d. "Sorry, device is in use." The tty device you have specified is @@ -2726,7 +2735,7 @@ su% chmod 666 /dev/ttyXX telephone calls are not controlled -- anybody on your system can make them, without having to belong to any particular group, and this could run up your phone bill. - b. Use groups to regulate accesss. Normally the lockfile directory and + b. Use groups to regulate access. Normally the lockfile directory and and the dialout devices will have the same group (such as uucp). If so, then put everybody who's allowed to dial out into that group, and make sure that the lockfile directory and the tty devices have @@ -2739,7 +2748,7 @@ su% chmod 660 /dev/ttyXX the appropriate group (e.g. edit the /etc/group file). c. Have the superuser change Kermit to run setuid and/or setgid to the owner and/or group of the lockfile directory and the tty devices if - necessary), typically uucp (see [331]next section), but NOT root. + necessary), typically uucp (see [334]next section), but NOT root. Example: su% chown uucp kermit - or - chgrp uucp kermit @@ -2753,7 +2762,7 @@ su% chmod o+rwx /usr/spool/uucp su% chown uucp /dev/ttyXX ; chmod 600 /dev/ttyXX In some cases, the owner and group must be distinct; the key point - is that read/write accesss is required to both the UUCP lockfile + is that read/write access is required to both the UUCP lockfile directory and the tty itself. If you make C-Kermit setuid or setgid to root, it refuses to run: @@ -2765,9 +2774,9 @@ Fatal: C-Kermit setuid to root! crw-r----- 1 uucp uucp 5, 67 Feb 11 06:23 /dev/cua3 drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock - requires suid uucp to get read/write accesss on /dev/cua3 and sgid to - get read/write accesss on /var/lock (since you can't set Kermit's uid - or gid to root). + requires suid uucp to get read/write access on /dev/cua3 and sgid to + get read/write access on /var/lock (since you can't set Kermit's uid or + gid to root). The reason Kermit can't be setuid or setgid to root has to do with the fact that some Unix OS's can't switch user or group IDs in that @@ -2775,11 +2784,11 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock setgid to root means that Unix C-Kermit can't be used to make rlogin connections by non-root users. (The rlogin port is privileged, which is why the regular rlogin command is setuid root -- which is safe - because the rlogin program never has to create or accesss files like + because the rlogin program never has to create or access files like Kermit does.) For the lockfile mechanism to achieve its desired purpose -- prevention - of accesss to the same tty device by more than one process at a time -- + of access to the same tty device by more than one process at a time -- ALL programs on a given computer that open, read or write, and close tty devices must use the SAME lockfile conventions. Unfortunately, this is often not the case. Here is a typical example of how this can go @@ -2798,7 +2807,7 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock a. If there may be more than one person running Kermit at the same time, competing for the same tty device, then create a special lockfile directory just for Kermit, for example, /usr/spool/kermit, - and make sure you have read/write accesss to it. Then add the + and make sure you have read/write access to it. Then add the following to your makefile target CFLAGS, as shown earlier: -DLOCK_DIR=\\\"/usr/spool/kermit\\\" @@ -2810,7 +2819,7 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock 11. RUNNING UNIX C-KERMIT SETUID OR SETGID - [ [332]Top ] [ [333]Contents ] [ [334]Next ] [ [335]Previous ] + [ [335]Top ] [ [336]Contents ] [ [337]Next ] [ [338]Previous ] Even if you don't intend to run C-Kermit setuid, somebody else might come along and chown and chmod it after it has been built. You should @@ -2835,27 +2844,27 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock IMPORTANT NOTE: Most Unix system documentation will not give you the required information. To determine whether your Unix system supplies - the the saved-original-effective-user/group-id feature, use the - ckuuid.c program. Read and follow the instructions in the comments - at the beginning. + the saved-original-effective-user/group-id feature, use the ckuuid.c + program. Read and follow the instructions in the comments at the + beginning. C-Kermit for 4.4BSD-based systems automatically use sete[ug]id(). See - [336]ckutio.c. + [339]ckutio.c. If you have a version of Unix that is not BSD-based, but which supplies the setreuid() and setregid() functions, and these are the only way to switch between real and effective uid, add -DSETREUID to your makefile target. - WARNING: There are two calls to accesss() in [337]ckufio.c, by which + WARNING: There are two calls to access() in [340]ckufio.c, by which Kermit checks to see if it can create an output file. These calls will not work correctly when (a)you have installed C-Kermit setuid or setgid on a BSD-based Unix system, and (b) the saved-original-effective-uid/gid feature is not present, and (c) the - accesss() function always checks what it believes to be the real ID + access() function always checks what it believes to be the real ID rather than the effective ID. This is the case, for example, in Olivetti X/OS and in NeXTSTEP. In such cases, you can force correct - operation of accesss() calls by defining the symbol SW_ACC_ID at + operation of access() calls by defining the symbol SW_ACC_ID at compile time in CFLAGS. If you have a version of Unix that does not allow a process to switch @@ -2871,8 +2880,8 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock MORAL: Are you thoroughly sickened and/or frightened by all that you have just read? You should be. What is the real answer? Simple. Serial devices -- such as ttys and magnetic tapes -- in Unix should be opened - with exclusive accesss only, enforced by the Unix kernel. Shared - accesss has no conceivable purpose, legitimate or otherwise, except by + with exclusive access only, enforced by the Unix kernel. Shared access + has no conceivable purpose, legitimate or otherwise, except by privileged system programs such as getty. The original design dates from the late 1960s, when Unix was developed for laboratory use under a philosophy of trust by people within shouting distance of each other -- @@ -2881,14 +2890,14 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock emergence of Unix from the laboratory into the commercial market, we have seen every vestige of openness -- but this one -- stripped away. I'd like to see some influential Unix maker take the bold step of - making the simple kernel change required to enforce exclusive accesss - to serial devices. (Well, perhaps not so simple when bidirectionality - must also be a goal -- but then other OS's like VMS solved this problem + making the simple kernel change required to enforce exclusive access to + serial devices. (Well, perhaps not so simple when bidirectionality must + also be a goal -- but then other OS's like VMS solved this problem decades ago.) 12. CONFIGURING UNIX WORKSTATIONS - [ [338]Top ] [ [339]Contents ] [ [340]Next ] [ [341]Previous ] + [ [341]Top ] [ [342]Contents ] [ [343]Next ] [ [344]Previous ] On desktop workstations that are used by only the user at the console keyboard, C-Kermit is always used in local mode. But as delivered, @@ -2912,17 +2921,17 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock 13. BIZARRE BEHAVIOR AT RUNTIME - [ [342]Top ] [ [343]Contents ] [ [344]Next ] [ [345]Previous ] + [ [345]Top ] [ [346]Contents ] [ [347]Next ] [ [348]Previous ] See the "beware file", - [346]ckubwr.txt, for hints about runtime misbehavior. This section + [349]ckubwr.txt, for hints about runtime misbehavior. This section lists some runtime problems that can be cured by rebuilding C-Kermit. The program starts, but there is no prompt, and certain operations don't work (you see error messages like "Kermit command error in background execution"). This is because Kermit thinks it is running in - the background. See conbgt() in [347]ckutio.c. Try rebuilding Kermit + the background. See conbgt() in [350]ckutio.c. Try rebuilding Kermit with: -DPID_T=pid_t @@ -2949,7 +2958,7 @@ drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock 14. CRASHES AND CORE DUMPS - [ [348]Top ] [ [349]Contents ] [ [350]Next ] [ [351]Previous ] + [ [351]Top ] [ [352]Contents ] [ [353]Next ] [ [354]Previous ] If C-Kermit consistently dumps core at the beginning of a file transfer, look in SHOW FEATURES for CKREALPATH. If found, rebuild with @@ -3010,7 +3019,7 @@ continue 15. SYSLOGGING - [ [352]Top ] [ [353]Contents ] [ [354]Next ] [ [355]Previous ] + [ [355]Top ] [ [356]Contents ] [ [357]Next ] [ [358]Previous ] "Syslogging" means recording selected information in the system log via the Unix syslog() facility, which is available in most Unix versions. @@ -3019,7 +3028,7 @@ continue --syslog:n on the command-line, where n is a number greater than 0 to indicate the - level of syslogging. See [356]Section 4.2 of the [357]IKSD + level of syslogging. See [359]Section 4.2 of the [360]IKSD Administrator's Guide for details. Obviously you can't depend on users to include --syslog:3 (or whatever) @@ -3037,18 +3046,18 @@ make linux KFLAGS=-DSYSLOGLEVEL=2 out from your system, and to where, e.g. for security auditing. Level 2 and 3 records are equivalent to those in the connection log; - see the [358]C-Kermit 7.0 Supplement) for a detailed description of the + see the [361]C-Kermit 7.0 Supplement) for a detailed description of the connection log. 16. BUILDING SECURE VERSIONS OF C-KERMIT 8.0 - [ [359]Top ] [ [360]Contents ] [ [361]Next ] [ [362]Previous ] + [ [362]Top ] [ [363]Contents ] [ [364]Next ] [ [365]Previous ] C-Kermit 7.0 and later may be built with Kerberos(TM) and/or SRP(TM) (Secure Remote Password) and/or SSL/TLS security for strong authentication and encryption of Internet connections. These security methods require external libraries that, in their binary forms, are - restricted from export by USA law. See the [363]Kermit Security + restricted from export by USA law. See the [366]Kermit Security Reference) for details. C-Kermit binaries themselves are likewise restricted; the C-Kermit binaries that are available for public download on the Internet are not allowed to contain the security @@ -3057,7 +3066,7 @@ make linux KFLAGS=-DSYSLOGLEVEL=2 Sample makefile entries are provided for Linux and many other operating systems. A list of secure makefile entries is included in the Makefile. Complete instructions on building C-Kermit 8.0 with MIT Kerberos; - Secure Remote Password; and/or OpenSSL can be found in the [364]Kermit + Secure Remote Password; and/or OpenSSL can be found in the [367]Kermit Security Reference. SSL/TLS and Kerberos builds are increasingly problematic with the @@ -3142,7 +3151,7 @@ make netbsd+krb5+ssl \ toolsets.) Perhaps certain targets could be converted to use them, especially Linux because there are so many variations among distributions and versions. Anybody who wants to make, say, an - Autonf-based Linux target, be my guest, but bear in mind that one + Autoconf-based Linux target, be my guest, but bear in mind that one Linux target is supposed to work for all versions and distributions of Linux on all platforms. Well, one target for Linux by itself, another for Linux with OpenSSL, another for Linux with Kerberos 5, @@ -3156,14 +3165,14 @@ make netbsd+krb5+ssl \ 17. INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM - [ [365]Top ] [ [366]Contents ] [ [367]Previous ] + [ [368]Top ] [ [369]Contents ] [ [370]Previous ] This requires C-Kermit 8.0.206 or later and an SSH v2 server. If you list C-Kermit as a Subsystem in the SSH v2 server configuration file (as, for example, SFTP is listed), users can make SSH connections direct to a Kermit server as explained here: -[368]http://www.columbia.edu/kermit/skermit.html +[371]http://www.columbia.edu/kermit/skermit.html The name and location of the SSH server configuration file depends on your platform, which SSH product(s) you have, etc. C-Kermit itself must @@ -3191,8 +3200,8 @@ Subsystem kermit /usr/local/bin/kermit-sshsub C-Kermit would have no way of knowing that it should enter Server mode if it were not called by a special name. - [ [369]Top ] [ [370]Contents ] [ [371]C-Kermit Home ] [ [372]C-Kermit - 9.0 Overview ] [ [373]Kermit Home ] + [ [372]Top ] [ [373]Contents ] [ [374]C-Kermit Home ] [ [375]C-Kermit + 9.0 Overview ] [ [376]Kermit Home ] __________________________________________________________________ @@ -3384,193 +3393,196 @@ References 181. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit80.txt 182. http://www.columbia.edu/kermit/ck60manual.html 183. http://www.columbia.edu/kermit/ckermit80.html - 184. ftp://kermit.columbia.edu/kermit/c-kermit/ckcbwr.txt - 185. http://www.columbia.edu/kermit/ckcbwr.html - 186. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt - 187. http://www.columbia.edu/kermit/ckubwr.html - 188. ftp://kermit.columbia.edu/kermit/c-kermit/ckuins.txt - 189. http://www.columbia.edu/kermit/ckuins.html - 190. ftp://kermit.columbia.edu/kermit/c-kermit/ckccfg.txt - 191. http://www.columbia.edu/kermit/ckccfg.html - 192. ftp://kermit.columbia.edu/kermit/c-kermit/ckcplm.txt - 193. http://www.columbia.edu/kermit/ckcplm.html - 194. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem - 195. http://www.columbia.edu/kermit/ckuins.html#x16" - 196. ftp://kermit.columbia.edu/kermit/c-kermit/makefile - 197. http://www.columbia.edu/kermit/ckuins.html#x? - 198. http://www.columbia.edu/kermit/ckuins.html#x11 - 199. http://www.columbia.edu/kermit/ckuins.html#x5.2 - 200. http://www.columbia.edu/kermit/ckermit.html#download - 201. http://www.columbia.edu/kermit/ck80binaries.html - 202. http://www.columbia.edu/kermit/ckermit.html#download - 203. http://www.columbia.edu/kermit/ckuins.html#top - 204. http://www.columbia.edu/kermit/ckuins.html#contents - 205. http://www.columbia.edu/kermit/ckuins.html#x7 - 206. http://www.columbia.edu/kermit/ckuins.html#x5 - 207. http://www.columbia.edu/kermit/ckuins.html#top - 208. http://www.columbia.edu/kermit/ckuins.html#contents - 209. http://www.columbia.edu/kermit/ckuins.html#x8 - 210. http://www.columbia.edu/kermit/ckuins.html#x6 - 211. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 212. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 213. http://www.columbia.edu/kermit/ckuins.html#x4.0 - 214. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h - 215. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c - 216. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c - 217. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 218. http://www.columbia.edu/kermit/ckuins.html#x10 - 219. http://www.columbia.edu/kermit/ckccfg.html#x2 - 220. http://www.columbia.edu/kermit/ckccfg.html - 221. http://www.columbia.edu/kermit/ckuins.html#x4 - 222. http://www.columbia.edu/kermit/ckuins.html#x10 - 223. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 224. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 225. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 226. http://www.columbia.edu/kermit/ckuins.html#x9.4 - 227. mailto:kermit-support@columbia.edu - 228. http://www.columbia.edu/kermit/ckuins.html#top - 229. http://www.columbia.edu/kermit/ckuins.html#contents - 230. http://www.columbia.edu/kermit/ckuins.html#x9 - 231. http://www.columbia.edu/kermit/ckuins.html#x7 - 232. http://www.columbia.edu/kermit/ckccfg.html - 233. http://www.columbia.edu/kermit/ckccfg.html - 234. http://www.columbia.edu/kermit/ckuins.html#top - 235. http://www.columbia.edu/kermit/ckuins.html#contents - 236. http://www.columbia.edu/kermit/ckuins.html#x10 - 237. http://www.columbia.edu/kermit/ckuins.html#x8 - 238. http://www.columbia.edu/kermit/ckuins.html#x9.1 - 239. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 - 240. http://www.columbia.edu/kermit/ckuins.html#x9.1.2 - 241. http://www.columbia.edu/kermit/ckuins.html#x9.1.3 - 242. http://www.columbia.edu/kermit/ckuins.html#x9.2 - 243. http://www.columbia.edu/kermit/ckuins.html#x9.3 - 244. http://www.columbia.edu/kermit/ckuins.html#x9.4 - 245. http://www.columbia.edu/kermit/ckuins.html#x9.5 - 246. http://www.columbia.edu/kermit/ckuins.html#x9.6 - 247. http://www.columbia.edu/kermit/ckuins.html#x9.7 - 248. http://www.columbia.edu/kermit/ckuins.html#x9.8 - 249. http://www.columbia.edu/kermit/ckuins.html#x9.9 - 250. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 251. http://www.columbia.edu/kermit/ckuins.html#top - 252. http://www.columbia.edu/kermit/ckuins.html#x9 - 253. http://www.columbia.edu/kermit/ckuins.html#contents - 254. http://www.columbia.edu/kermit/ckuins.html#x9.2 - 255. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 - 256. http://www.columbia.edu/kermit/ckuins.html#x9.1.2 - 257. http://www.columbia.edu/kermit/ckuins.html#x9.1.3 - 258. http://www.columbia.edu/kermit/ckuins.html#top - 259. http://www.columbia.edu/kermit/ckuins.html#contents - 260. http://www.columbia.edu/kermit/ckuins.html#x9 - 261. http://www.columbia.edu/kermit/ckuins.html#x9.1 - 262. http://www.columbia.edu/kermit/ckuins.html#x9.1.3 - 263. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 - 264. http://www.columbia.edu/kermit/ckuins.html#top - 265. http://www.columbia.edu/kermit/ckuins.html#contents - 266. http://www.columbia.edu/kermit/ckuins.html#x9 - 267. http://www.columbia.edu/kermit/ckuins.html#x9.1 - 268. http://www.columbia.edu/kermit/ckuins.html#x9.2 - 269. http://www.columbia.edu/kermit/ckuins.html#x9.1.2 - 270. http://www.opengroup.org/onlinepubs/007904975/ - 271. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 - 272. http://www.columbia.edu/kermit/ckuins.html#top - 273. http://www.columbia.edu/kermit/ckuins.html#contents - 274. http://www.columbia.edu/kermit/ckuins.html#x9 - 275. http://www.columbia.edu/kermit/ckuins.html#x9.1 - 276. http://www.columbia.edu/kermit/ckuins.html#x9.3 - 277. http://www.columbia.edu/kermit/ckuins.html#x9.1 - 278. http://www.columbia.edu/kermit/ckuins.html#top - 279. http://www.columbia.edu/kermit/ckuins.html#contents - 280. http://www.columbia.edu/kermit/ckuins.html#x9 - 281. http://www.columbia.edu/kermit/ckuins.html#x9.4 - 282. http://www.columbia.edu/kermit/ckuins.html#x9.2 - 283. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c - 284. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 285. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c - 286. http://www.columbia.edu/kermit/ckuins.html#top - 287. http://www.columbia.edu/kermit/ckuins.html#contents - 288. http://www.columbia.edu/kermit/ckuins.html#x9 - 289. http://www.columbia.edu/kermit/ckuins.html#x9.5 - 290. http://www.columbia.edu/kermit/ckuins.html#x9.3 - 291. http://www.columbia.edu/kermit/cable.html - 292. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 293. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h - 294. http://www.columbia.edu/kermit/ckuins.html#top - 295. http://www.columbia.edu/kermit/ckuins.html#contents - 296. http://www.columbia.edu/kermit/ckuins.html#x9 - 297. http://www.columbia.edu/kermit/ckuins.html#x9.6 - 298. http://www.columbia.edu/kermit/ckuins.html#x9.4 - 299. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h - 300. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c - 301. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 302. http://www.columbia.edu/kermit/ckuins.html#top - 303. http://www.columbia.edu/kermit/ckuins.html#contents - 304. http://www.columbia.edu/kermit/ckuins.html#x9 - 305. http://www.columbia.edu/kermit/ckuins.html#x9.7 - 306. http://www.columbia.edu/kermit/ckuins.html#x9.5 - 307. http://www.columbia.edu/kermit/ckuins.html#top - 308. http://www.columbia.edu/kermit/ckuins.html#contents - 309. http://www.columbia.edu/kermit/ckuins.html#x9 - 310. http://www.columbia.edu/kermit/ckuins.html#x9.8 - 311. http://www.columbia.edu/kermit/ckuins.html#x9.6 - 312. http://www.columbia.edu/kermit/ckuins.html#top - 313. http://www.columbia.edu/kermit/ckuins.html#contents - 314. http://www.columbia.edu/kermit/ckuins.html#x9 - 315. http://www.columbia.edu/kermit/ckuins.html#x9.9 - 316. http://www.columbia.edu/kermit/ckuins.html#x9.7 - 317. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 318. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 319. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h - 320. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c - 321. http://www.columbia.edu/kermit/ckuins.html#top - 322. http://www.columbia.edu/kermit/ckuins.html#contents - 323. http://www.columbia.edu/kermit/ckuins.html#x9 - 324. http://www.columbia.edu/kermit/ckuins.html#x10 - 325. http://www.columbia.edu/kermit/ckuins.html#x9.8 - 326. http://www.columbia.edu/kermit/ckuins.html#top - 327. http://www.columbia.edu/kermit/ckuins.html#contents - 328. http://www.columbia.edu/kermit/ckuins.html#x11 - 329. http://www.columbia.edu/kermit/ckuins.html#x9 - 330. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 184. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit90.txt + 185. http://www.columbia.edu/kermit/ck60manual.html + 186. http://www.columbia.edu/kermit/ckermit90.html + 187. ftp://kermit.columbia.edu/kermit/c-kermit/ckcbwr.txt + 188. http://www.columbia.edu/kermit/ckcbwr.html + 189. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt + 190. http://www.columbia.edu/kermit/ckubwr.html + 191. ftp://kermit.columbia.edu/kermit/c-kermit/ckuins.txt + 192. http://www.columbia.edu/kermit/ckuins.html + 193. ftp://kermit.columbia.edu/kermit/c-kermit/ckccfg.txt + 194. http://www.columbia.edu/kermit/ckccfg.html + 195. ftp://kermit.columbia.edu/kermit/c-kermit/ckcplm.txt + 196. http://www.columbia.edu/kermit/ckcplm.html + 197. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem + 198. http://www.columbia.edu/kermit/ckuins.html#x16" + 199. ftp://kermit.columbia.edu/kermit/c-kermit/makefile + 200. http://www.columbia.edu/kermit/ckuins.html#x? + 201. http://www.columbia.edu/kermit/ckuins.html#x11 + 202. http://www.columbia.edu/kermit/ckuins.html#x5.2 + 203. http://www.columbia.edu/kermit/ckermit.html#download + 204. http://www.columbia.edu/kermit/ckbinaries.html + 205. http://www.columbia.edu/kermit/ckermit.html#download + 206. http://www.columbia.edu/kermit/ckuins.html#top + 207. http://www.columbia.edu/kermit/ckuins.html#contents + 208. http://www.columbia.edu/kermit/ckuins.html#x7 + 209. http://www.columbia.edu/kermit/ckuins.html#x5 + 210. http://www.columbia.edu/kermit/ckuins.html#top + 211. http://www.columbia.edu/kermit/ckuins.html#contents + 212. http://www.columbia.edu/kermit/ckuins.html#x8 + 213. http://www.columbia.edu/kermit/ckuins.html#x6 + 214. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 215. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 216. http://www.columbia.edu/kermit/ckuins.html#x4.0 + 217. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h + 218. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c + 219. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c + 220. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 221. http://www.columbia.edu/kermit/ckuins.html#x10 + 222. http://www.columbia.edu/kermit/ckccfg.html#x2 + 223. http://www.columbia.edu/kermit/ckccfg.html + 224. http://www.columbia.edu/kermit/ckuins.html#x4 + 225. http://www.columbia.edu/kermit/ckuins.html#x10 + 226. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 227. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 228. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 229. http://www.columbia.edu/kermit/ckuins.html#x9.4 + 230. mailto:kermit-support@columbia.edu + 231. http://www.columbia.edu/kermit/ckuins.html#top + 232. http://www.columbia.edu/kermit/ckuins.html#contents + 233. http://www.columbia.edu/kermit/ckuins.html#x9 + 234. http://www.columbia.edu/kermit/ckuins.html#x7 + 235. http://www.columbia.edu/kermit/ckccfg.html + 236. http://www.columbia.edu/kermit/ckccfg.html + 237. http://www.columbia.edu/kermit/ckuins.html#top + 238. http://www.columbia.edu/kermit/ckuins.html#contents + 239. http://www.columbia.edu/kermit/ckuins.html#x10 + 240. http://www.columbia.edu/kermit/ckuins.html#x8 + 241. http://www.columbia.edu/kermit/ckuins.html#x9.1 + 242. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 + 243. http://www.columbia.edu/kermit/ckuins.html#x9.1.2 + 244. http://www.columbia.edu/kermit/ckuins.html#x9.1.3 + 245. http://www.columbia.edu/kermit/ckuins.html#x9.2 + 246. http://www.columbia.edu/kermit/ckuins.html#x9.3 + 247. http://www.columbia.edu/kermit/ckuins.html#x9.4 + 248. http://www.columbia.edu/kermit/ckuins.html#x9.5 + 249. http://www.columbia.edu/kermit/ckuins.html#x9.6 + 250. http://www.columbia.edu/kermit/ckuins.html#x9.7 + 251. http://www.columbia.edu/kermit/ckuins.html#x9.8 + 252. http://www.columbia.edu/kermit/ckuins.html#x9.9 + 253. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 254. http://www.columbia.edu/kermit/ckuins.html#top + 255. http://www.columbia.edu/kermit/ckuins.html#x9 + 256. http://www.columbia.edu/kermit/ckuins.html#contents + 257. http://www.columbia.edu/kermit/ckuins.html#x9.2 + 258. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 + 259. http://www.columbia.edu/kermit/ckuins.html#x9.1.2 + 260. http://www.columbia.edu/kermit/ckuins.html#x9.1.3 + 261. http://www.columbia.edu/kermit/ckuins.html#top + 262. http://www.columbia.edu/kermit/ckuins.html#contents + 263. http://www.columbia.edu/kermit/ckuins.html#x9 + 264. http://www.columbia.edu/kermit/ckuins.html#x9.1 + 265. http://www.columbia.edu/kermit/ckuins.html#x9.1.3 + 266. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 + 267. http://www.columbia.edu/kermit/ckuins.html#top + 268. http://www.columbia.edu/kermit/ckuins.html#contents + 269. http://www.columbia.edu/kermit/ckuins.html#x9 + 270. http://www.columbia.edu/kermit/ckuins.html#x9.1 + 271. http://www.columbia.edu/kermit/ckuins.html#x9.2 + 272. http://www.columbia.edu/kermit/ckuins.html#x9.1.2 + 273. http://www.opengroup.org/onlinepubs/007904975/ + 274. http://www.columbia.edu/kermit/ckuins.html#x9.1.1 + 275. http://www.columbia.edu/kermit/ckuins.html#top + 276. http://www.columbia.edu/kermit/ckuins.html#contents + 277. http://www.columbia.edu/kermit/ckuins.html#x9 + 278. http://www.columbia.edu/kermit/ckuins.html#x9.1 + 279. http://www.columbia.edu/kermit/ckuins.html#x9.3 + 280. http://www.columbia.edu/kermit/ckuins.html#x9.1 + 281. http://www.columbia.edu/kermit/ckuins.html#top + 282. http://www.columbia.edu/kermit/ckuins.html#contents + 283. http://www.columbia.edu/kermit/ckuins.html#x9 + 284. http://www.columbia.edu/kermit/ckuins.html#x9.4 + 285. http://www.columbia.edu/kermit/ckuins.html#x9.2 + 286. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c + 287. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 288. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c + 289. http://www.columbia.edu/kermit/ckuins.html#top + 290. http://www.columbia.edu/kermit/ckuins.html#contents + 291. http://www.columbia.edu/kermit/ckuins.html#x9 + 292. http://www.columbia.edu/kermit/ckuins.html#x9.5 + 293. http://www.columbia.edu/kermit/ckuins.html#x9.3 + 294. http://www.columbia.edu/kermit/cable.html + 295. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 296. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h + 297. http://www.columbia.edu/kermit/ckuins.html#top + 298. http://www.columbia.edu/kermit/ckuins.html#contents + 299. http://www.columbia.edu/kermit/ckuins.html#x9 + 300. http://www.columbia.edu/kermit/ckuins.html#x9.6 + 301. http://www.columbia.edu/kermit/ckuins.html#x9.4 + 302. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h + 303. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c + 304. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 305. http://www.columbia.edu/kermit/ckuins.html#top + 306. http://www.columbia.edu/kermit/ckuins.html#contents + 307. http://www.columbia.edu/kermit/ckuins.html#x9 + 308. http://www.columbia.edu/kermit/ckuins.html#x9.7 + 309. http://www.columbia.edu/kermit/ckuins.html#x9.5 + 310. http://www.columbia.edu/kermit/ckuins.html#top + 311. http://www.columbia.edu/kermit/ckuins.html#contents + 312. http://www.columbia.edu/kermit/ckuins.html#x9 + 313. http://www.columbia.edu/kermit/ckuins.html#x9.8 + 314. http://www.columbia.edu/kermit/ckuins.html#x9.6 + 315. http://www.columbia.edu/kermit/ckuins.html#top + 316. http://www.columbia.edu/kermit/ckuins.html#contents + 317. http://www.columbia.edu/kermit/ckuins.html#x9 + 318. http://www.columbia.edu/kermit/ckuins.html#x9.9 + 319. http://www.columbia.edu/kermit/ckuins.html#x9.7 + 320. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 321. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 322. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h + 323. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c + 324. http://www.columbia.edu/kermit/ckuins.html#top + 325. http://www.columbia.edu/kermit/ckuins.html#contents + 326. http://www.columbia.edu/kermit/ckuins.html#x9 + 327. http://www.columbia.edu/kermit/ckuins.html#x10 + 328. http://www.columbia.edu/kermit/ckuins.html#x9.8 + 329. http://www.columbia.edu/kermit/ckuins.html#top + 330. http://www.columbia.edu/kermit/ckuins.html#contents 331. http://www.columbia.edu/kermit/ckuins.html#x11 - 332. http://www.columbia.edu/kermit/ckuins.html#top - 333. http://www.columbia.edu/kermit/ckuins.html#contents - 334. http://www.columbia.edu/kermit/ckuins.html#x12 - 335. http://www.columbia.edu/kermit/ckuins.html#x10 - 336. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 337. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c - 338. http://www.columbia.edu/kermit/ckuins.html#top - 339. http://www.columbia.edu/kermit/ckuins.html#contents - 340. http://www.columbia.edu/kermit/ckuins.html#x13 - 341. http://www.columbia.edu/kermit/ckuins.html#x11 - 342. http://www.columbia.edu/kermit/ckuins.html#top - 343. http://www.columbia.edu/kermit/ckuins.html#contents - 344. http://www.columbia.edu/kermit/ckuins.html#x14 - 345. http://www.columbia.edu/kermit/ckuins.html#x12 - 346. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt - 347. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c - 348. http://www.columbia.edu/kermit/ckuins.html#top - 349. http://www.columbia.edu/kermit/ckuins.html#contents - 350. http://www.columbia.edu/kermit/ckuins.html#x15 - 351. http://www.columbia.edu/kermit/ckuins.html#x13 - 352. http://www.columbia.edu/kermit/ckuins.html#top - 353. http://www.columbia.edu/kermit/ckuins.html#contents - 354. http://www.columbia.edu/kermit/ckuins.html#x16 - 355. http://www.columbia.edu/kermit/ckuins.html#x14 - 356. http://www.columbia.edu/kermit/uiksd.html#x4.2 - 357. http://www.columbia.edu/kermit/uiksd.html - 358. http://www.columbia.edu/kermit/ckermit2.html - 359. http://www.columbia.edu/kermit/ckuins.html#top - 360. http://www.columbia.edu/kermit/ckuins.html#contents - 361. http://www.columbia.edu/kermit/ckuins.html#x17 - 362. http://www.columbia.edu/kermit/ckuins.html#x15 - 363. http://www.columbia.edu/kermit/security.html - 364. http://www.columbia.edu/kermit/security80.html - 365. http://www.columbia.edu/kermit/ckuins.html#top - 366. http://www.columbia.edu/kermit/ckuins.html#contents - 367. http://www.columbia.edu/kermit/ckuins.html#x16 - 368. http://www.columbia.edu/kermit/skermit.html - 369. http://www.columbia.edu/kermit/ckuins.html#top - 370. http://www.columbia.edu/kermit/ckuins.html#contents - 371. http://www.columbia.edu/kermit/ckermit.html - 372. http://www.columbia.edu/kermit/ck90updates.html - 373. http://www.columbia.edu/kermit/index.html + 332. http://www.columbia.edu/kermit/ckuins.html#x9 + 333. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 334. http://www.columbia.edu/kermit/ckuins.html#x11 + 335. http://www.columbia.edu/kermit/ckuins.html#top + 336. http://www.columbia.edu/kermit/ckuins.html#contents + 337. http://www.columbia.edu/kermit/ckuins.html#x12 + 338. http://www.columbia.edu/kermit/ckuins.html#x10 + 339. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 340. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c + 341. http://www.columbia.edu/kermit/ckuins.html#top + 342. http://www.columbia.edu/kermit/ckuins.html#contents + 343. http://www.columbia.edu/kermit/ckuins.html#x13 + 344. http://www.columbia.edu/kermit/ckuins.html#x11 + 345. http://www.columbia.edu/kermit/ckuins.html#top + 346. http://www.columbia.edu/kermit/ckuins.html#contents + 347. http://www.columbia.edu/kermit/ckuins.html#x14 + 348. http://www.columbia.edu/kermit/ckuins.html#x12 + 349. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt + 350. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c + 351. http://www.columbia.edu/kermit/ckuins.html#top + 352. http://www.columbia.edu/kermit/ckuins.html#contents + 353. http://www.columbia.edu/kermit/ckuins.html#x15 + 354. http://www.columbia.edu/kermit/ckuins.html#x13 + 355. http://www.columbia.edu/kermit/ckuins.html#top + 356. http://www.columbia.edu/kermit/ckuins.html#contents + 357. http://www.columbia.edu/kermit/ckuins.html#x16 + 358. http://www.columbia.edu/kermit/ckuins.html#x14 + 359. http://www.columbia.edu/kermit/uiksd.html#x4.2 + 360. http://www.columbia.edu/kermit/uiksd.html + 361. http://www.columbia.edu/kermit/ckermit2.html + 362. http://www.columbia.edu/kermit/ckuins.html#top + 363. http://www.columbia.edu/kermit/ckuins.html#contents + 364. http://www.columbia.edu/kermit/ckuins.html#x17 + 365. http://www.columbia.edu/kermit/ckuins.html#x15 + 366. http://www.columbia.edu/kermit/security.html + 367. http://www.columbia.edu/kermit/security80.html + 368. http://www.columbia.edu/kermit/ckuins.html#top + 369. http://www.columbia.edu/kermit/ckuins.html#contents + 370. http://www.columbia.edu/kermit/ckuins.html#x16 + 371. http://www.columbia.edu/kermit/skermit.html + 372. http://www.columbia.edu/kermit/ckuins.html#top + 373. http://www.columbia.edu/kermit/ckuins.html#contents + 374. http://www.columbia.edu/kermit/ckermit.html + 375. http://www.columbia.edu/kermit/ck90updates.html + 376. http://www.columbia.edu/kermit/index.html diff --git a/ckuker.nr b/ckuker.nr index f85a3d6..03b30e7 100644 --- a/ckuker.nr +++ b/ckuker.nr @@ -1,4 +1,4 @@ -.\" @(#) kermit.1 9.0.301 2011/07/11 Columbia University +.\" @(#) kermit.1 9.0.302 2011/08/20 Columbia University .TH KERMIT 1 "JULY 2011" "User Manuals" .na .SH NAME diff --git a/ckutio.c b/ckutio.c index 6551e77..05564de 100644 --- a/ckutio.c +++ b/ckutio.c @@ -1,12 +1,12 @@ #define CKUTIO_C #ifdef aegis -char *ckxv = "Aegis Communications support, 9.0.324, 20 June 2011"; +char *ckxv = "Aegis Communications support, 9.0.326, 20 August 2011"; #else #ifdef Plan9 -char *ckxv = "Plan 9 Communications support, 9.0.324, 20 June 2011"; +char *ckxv = "Plan 9 Communications support, 9.0.326, 20 August 2011"; #else -char *ckxv = "UNIX Communications support, 9.0.324, 20 June 2011"; +char *ckxv = "UNIX Communications support, 9.0.326, 20 August 2011"; #endif /* Plan9 */ #endif /* aegis */ @@ -50,7 +50,13 @@ extern int duplex; #endif /* CK_ANSIC */ #endif /* OSF13 */ -#include /* System error numbers */ +#ifndef HPUXPRE65 +#include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ #ifdef __386BSD__ #define ENOTCONN 57 @@ -4970,6 +4976,9 @@ ttlock(ttdev) char *ttdev; { int x, n; int islink = 0; +#ifdef __FreeBSD__ + char *devname; +#endif /* __FreeBSD__ */ #ifdef NOUUCP debug(F100,"ttlock NOUUCP","",0); @@ -4981,8 +4990,17 @@ ttlock(ttdev) char *ttdev; { #ifdef USETTYLOCK haslock = 0; /* Not locked yet. */ *flfnam = '\0'; /* Lockfile name is empty. */ +#ifdef __FreeBSD__ + if ((devname = xxlast(ttdev,'/')) != NULL) +#ifdef FREEBSD8 + ckstrncat(lockname,devname+1,DEVNAMLEN-ckstrncpy(lockname,"pts",4)); +#else + ckstrncpy(lockname,devname+1,DEVNAMLEN); +#endif /* FREEBSD8 */ +#else if (!strncmp(ttdev,"/dev/",5) && ttdev[5]) ckstrncpy(lockname,ttdev+5,DEVNAMLEN); +#endif /* __FreeBSD__ */ else ckstrncpy(lockname,ttdev,DEVNAMLEN); /* diff --git a/ckututor.txt b/ckututor.txt index b54942d..ef2aebe 100644 --- a/ckututor.txt +++ b/ckututor.txt @@ -480,9 +480,9 @@ Command Files, Macros, and Scripts One way to have the macro definition in effect is to type the definition at the Kermit prompt. Another way is to store the definition - in a file and TAKE the file. If you want the the definition to be in - effect automatically every time you start Kermit, put the definition in - your initialization or customization file (explained [78]below). + in a file and TAKE the file. If you want the definition to be in effect + automatically every time you start Kermit, put the definition in your + initialization or customization file (explained [78]below). Here's a somewhat more ambitious example: @@ -1011,7 +1011,7 @@ MAKING CONNECTIONS to its prompt automatically when you log out from the remote computer or the connection is otherwise lost. - You can also dial from a modem that is accesssible by Telnet, + You can also dial from a modem that is accessible by Telnet, e.g. to a reverse terminal server. In this case the command sequence is: @@ -1359,7 +1359,7 @@ KERMIT CLIENT/SERVER CONNECTIONS There are dozens -- maybe hundreds -- of other commands, described in the built-in help, on the website, and/or in the published or online - manuals. But even if you don't have accesss to documentation, you can + manuals. But even if you don't have access to documentation, you can "set locus remote" and then use pretty much the same commands you would use with any FTP client. diff --git a/ckuus5.c b/ckuus5.c index d542de3..c4c8782 100644 --- a/ckuus5.c +++ b/ckuus5.c @@ -10770,6 +10770,15 @@ initoptlist() { #ifdef __FreeBSD__ makestr(&(optlist[noptlist++]),"__FreeBSD__"); #endif /* __FreeBSD__ */ +#ifdef FREEBSD4 + makestr(&(optlist[noptlist++]),"FREEBSD4"); +#endif /* FREEBSD4 */ +#ifdef FREEBSD8 + makestr(&(optlist[noptlist++]),"FREEBSD8"); +#endif /* FREEBSD8 */ +#ifdef FREEBSD9 + makestr(&(optlist[noptlist++]),"FREEBSD9"); +#endif /* FREEBSD9 */ #ifdef __linux__ makestr(&(optlist[noptlist++]),"__linux__"); #endif /* __linux__ */ diff --git a/makefile b/makefile index ddd0cd4..9efe262 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,8 @@ # makefile / Makefile / ckuker.mak / CKUKER.MAK # -# Mon Jul 11 09:24:25 2011 -BUILDID=20110711 -CKVER= "9.0.301" +# Sun Aug 21 10:33:08 2011 +BUILDID=20110821 +CKVER= "9.0.302" # # -- Makefile to build C-Kermit for UNIX and UNIX-like platforms -- # @@ -22,13 +22,16 @@ CKVER= "9.0.301" # Note: Author is no longer at Columbia University or at the 115th Street # address effective 1 July 2011. The email address should still work, # as well as the website and FTP addresses, for the foreseeable future. +# For new developments, also check: +# +# http://www.columbia.edu/~fdc/kermit/ # # Contributions from many others. Special thanks to Jeff Altman for the # secure-build targets, Peter Eichhorn, assyst GmbH, for the consolidated # HP-UX targets and the "uninstall" target, to Robert Lipe for the updated # and consolidated SCO UNIX / ODT / OSR5 targets, to Ric Anderson for the # IRIX 6.x targets, to Seth Theriault for major improvements to the -# Mac OS X targets. +# Mac OS X targets, and to Alexey Dokuchaev for FreeBSD 9.0. # # C-Kermit is written and produced by hand without any automated procedures # such as autoconf / automake / configure, although some of the targets below @@ -53,10 +56,10 @@ CKVER= "9.0.301" # separated by whitespace. Some versions of "make" understand these as # directives. Uppercase letters remove the danger, e.g. "# If you have..." # -# WARNING: This is a huge makefile. Although -# this is less likely since the turn of the century, some "make" programs -# might run out of memory. If this happens to you, edit away the parts that -# do not apply to your platform and try again. +# WARNING: This is a huge makefile. Although this is less likely since the +# turn of the century, some "make" programs might run out of memory. If this +# happens to you, edit away the parts that do not apply to your platform and +# try again. # # WARNING 2: In many cases this file invokes itself recursively, sometimes # several levels deep (as in the Linux targets); i.e. some targets are used @@ -132,6 +135,10 @@ CKVER= "9.0.301" # + "make netbsd+ssl", NetBSD with OpenSSL 0.9.7 or later. # + "make netbsd+krb5", NetBSD with Kerberos 5. # + "make netbsd+krb5+ssl", NetBSD with Kerberos 5 and OpenSSL 0.9.7 or later. +# ? "make freebsd1" for FreeBSD 1.x +# ? "make freebsd2" for FreeBSD 2.x +# + "make freebsd3" for FreeBSD 3.x +# ? "make freebsd4" for FreeBSD 4.0 # + "make freebsd", FreeBSD 4.1 or later. # + "make freebsd+ssl", FreeBSD 5.0 or later with OpenSSL 0.9.7 or later. # + "make openbsd", OpenBSD 2.3 or later. @@ -1705,6 +1712,7 @@ freebsd2c: #FreeBSD 3.x with ncurses and uu_lock() #(Note: uu_lock() goes back to 2.2.2, but not necessarily 2.0) +#OK 2011/08/20 FreeBSD 3.3 freebsd3: @echo 'Making C-Kermit $(CKVER) for FreeBSD 3.x with ncurses...' $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \ @@ -1734,27 +1742,61 @@ freebsd40: #FreeBSD 4.1 and above #Like FreeBSD 4.0 but without the NONOSETBUF hack and with CK_NEWTERM. -#OK 2011/06/15 FreeBSD 3.3, 4,4, 4.7, and 8.2 -freebsd freebsd41 freebsd72: +#NOTE: This target definitely does not work for FreeBSD 3.3 in 9.0.302. +#and it has not been tested on 4 or 5. +#OK 2011/06/xx FreeBSD 3.3, 4,4, 4.7, and 8.2 +#OK 2011/08/21 FreeBSD 3.3, 4.4, 6.4, 9.0 +freebsd freebsd41 freebsd72 freebsd5 freebsd6 freebsd7 freebsd8 freebsd9: @echo 'Making C-Kermit $(CKVER) for FreeBSD 4.1 or later...' + @if test `uname -r | cut -d . -f 1` -ge 8; then \ + HAVE_FBSD8='-DFREEBSD8'; \ + else HAVE_FBSD8=''; fi; \ + if test `uname -r | cut -d . -f 1` -ge 9; then \ + HAVE_FBSD9='-DFREEBSD9'; \ + else HAVE_FBSD9=''; fi; \ + if test -f /usr/include/utmpx.h ; \ + then HAVE_UTMPX='-DHAVEUTMPX' ; \ + else HAVE_UTMPX='' ; fi; \ $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \ "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \ - -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT \ - -DHERALD=\"\\\" `uname` `uname -r`\\\"\" \ - -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) -O -pipe" \ + -DFREEBSD4 $$HAVE_FBSD8 $$HAVE_FBSD9 -DUSE_UU_LOCK -DFNFLOAT \ + $$HAVE_UTMPX -DHERALD=\"\\\" `uname -rs`\\\"\" \ + -funsigned-char -DTPUTSARGTYPE=int -DUSE_STRERROR $(KFLAGS) \ + -O2 -pipe"\ "LIBS= -lncurses -lcrypt -lutil -lm $(LIBS)" -#FreeBSD 5.0 or later with OpenSSL 0.9.7 or later. +#FreeBSD 5.0 or later with OpenSSL. #OK 2011/06/15 FreeBSD 4.7 and 8.2 +#OK 2011/08/20 FreeBSD 9.0-CURRENT freebsd+ssl freebsd+openssl freebsd50+openssl: - @echo 'Making C-Kermit $(CKVER) for FreeBSD 5.0, ncurses, openssl' - $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \ - "CFLAGS= -DBSD44 -DCK_NCURSES -DCK_NEWTERM -DTCPSOCKET -DNOCOTFMC \ - -DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB \ - -DFREEBSD4 -DUSE_UU_LOCK -DFNFLOAT -funsigned-char -DTPUTSARGTYPE=int \ - -DFREEBSD41 -DFREEBSD42 -DFREEBSD43 -DFREEBSD44 -DFREEBSD45 \ - -DFREEBSD46 -DFREEBSD50 -DUSE_STRERROR $(KFLAGS) -O -pipe" \ - "LIBS= -lncurses -lcrypt -lssl -lcrypto -lutil -lm $(SSLLIB) $(LIBS)" + @echo 'Making C-Kermit $(CKVER) for FreeBSD with Kerberos 5...' + @case `openssl version` in \ + *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \ + *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \ + *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \ + *) OPENSSLOPTION="" ;; \ + esac; \ + HAVE_DES=''; \ + DES_LIB=''; \ + if ls /usr/lib/libdes* > /dev/null 2> /dev/null || \ + ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \ + DES_LIB='-ldes'; \ + HAVE_DES='-DCK_DES -DLIBDES'; \ + echo "HAVE DES"; \ + else echo "NO DES"; \ + fi; \ + $(MAKE) freebsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \ + KFLAGS="-DCK_AUTHENTICATION -DCK_SSL $(SSLINC) -DZLIB $$OPENSSLOPTION \ + $$HAVE_DES $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \ + "LIBS= -lncurses -lcrypt -lssl -lcrypto -lutil -lm \ + $(SSLLIB) $$DES_LIB $(LIBS)"; \ + if [ ! -f ./wermit ] || [ ./ckcmai.o -nt ./wermit ] ; then \ + echo ""; \ + echo "If build failed try:"; \ + echo ""; \ + echo " make clean ; make $${KTARGET:-$(@)} KFLAGS=-UCK_DES"; \ + echo ""; \ + fi #NetBSD 1.4.1 or later with vanity banner automated with uname #and automatic inclusion of large file support if it is available. @@ -1763,6 +1805,7 @@ freebsd+ssl freebsd+openssl freebsd50+openssl: #disabled on ckcfn2.c ("KFLAGS=-O0") (Letter O Digit Zero). #(This could be automated by testing `uname -m` for "sun3".) #OK: 2011/06/15 on NetBSD 1.5.2 and 5.1. +#OK: 2011/08/21 on 5.1. netbsd netbsd2 netbsd15 netbsd16 old-netbsd: @echo Making C-Kermit $(CKVER) for NetBSD with curses... $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \ @@ -1775,6 +1818,7 @@ netbsd netbsd2 netbsd15 netbsd16 old-netbsd: #NetBSD 1.4.1 or later with OpenSSL #OK: 2011/06/15 on NetBSD 5.1 (but not 1.5.2 with OpenSSL 0.9.5a) +#OK: 2011/08/21 on 5.1. netbsd+ssl netbsd+openssl: @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL SSLLIB=$(SSLLIB)' @case `openssl version` in \ @@ -1792,7 +1836,7 @@ netbsd+ssl netbsd+openssl: echo "HAVE DES"; \ else echo "NO DES"; \ fi; \ - $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \ + $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \ "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \ -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \ $(KFLAGS)" "LNKFLAGS = $(LNKFLAGS)" \ @@ -1802,9 +1846,9 @@ netbsd+ssl netbsd+openssl: #NetBSD with MIT Kerberos 5: # OK 2011/06/15 (once K5INC and K5LIB were set right). # NOT OK for Heimdal - Heimdal Kerberos support in C-Kermit needs work. +# OK: 2011/08/21 on 5.1. netbsd+krb5: @echo 'Making C-Kermit $(CKVER) for NetBSD with Kerberos 5...' - @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...' @case `openssl version` in \ *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \ *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \ @@ -1820,7 +1864,7 @@ netbsd+krb5: echo "HAVE DES"; \ else echo "NO DES"; \ fi; \ - $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \ + $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \ "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_KERBEROS -DKRB5 \ -DCK_CAST $$HAVE_DES -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \ $(KFLAGS)" \ @@ -1828,7 +1872,7 @@ netbsd+krb5: -lcrypto -lgssapi -lkrb5 -lm -lutil $(LIBS)" # NetBSD - With Kerberos 5 and SSL and Zlib. -# OK 2011/06/15 +# OK: 2011/08/21 on 5.1 with MIT Kerberos. netbsd+krb5+ssl netbsd+krb5+openssl+zlib: @echo 'Making C-Kermit $(CKVER) for NetBSD+OpenSSL+Kerberos5...' @case `openssl version` in \ @@ -1846,7 +1890,7 @@ netbsd+krb5+ssl netbsd+krb5+openssl+zlib: echo "HAVE DES"; \ else echo "NO DES"; \ fi; \ - $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = gcc" "CC2 = gcc" \ + $(MAKE) netbsd KTARGET=$${KTARGET:-$(@)} "CC = $(CC)" "CC2 = $(CC2)" \ "KFLAGS= -DCK_AUTHENTICATION -DCK_ENCRYPTION -DCK_CAST $$HAVE_DES \ -DCK_KERBEROS -DKRB5 -DNOFTP_GSSAPI $(K5INC) $(K5INC)/krb5 \ -DCK_SSL -DCK_PAM -DZLIB -DNO_DCL_INET_ATON $$OPENSSLOPTION \ @@ -1907,6 +1951,8 @@ openbsdold: # -DUSE_UU_LOCK and -lutil added for uu_lock() # -DNDSYSERRLIST changed to -DUSE_STRERROR #If this gives you trouble use the previous entry. +#NOTE: The openbsd and openbsd+ssl should be reworked to be like the +#corresponding FreeBSD and NetBSD targets. The mirbsd targets should openbsd: @echo Making C-Kermit $(CKVER) for OpenBSD 2.3 or later... $(MAKE) CC=$(CC) CC2=$(CC2) xermit KTARGET=$${KTARGET:-$(@)} \ @@ -3803,12 +3849,30 @@ solaris9g+krb5+krb4: -lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \ -ldes $(LIBS)" -#Solaris 9 with gcc + Kerberos 5. -#Columbia Only - libdes has a version number in its name. -#In the general case, change -ldes425 to -des. -#If you have Kerberos 1.4 or later and and krb5_init_ets can't be found -#at link time, add -DNO_KRB5_INIT_ETS. -cu-solaris9g+krb5: +#Solaris 9, 10, or 11 with gcc... +#Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier. +#This target is chained to be the secure solaris9g+xxx targets below. +solaris9g solaris10g solaris11g: + @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc' + @case `uname -r` in \ + 5.9) SOLARISVERSION="-DSOLARIS9" ;; \ + 5.10) SOLARISVERSION="-DSOLARIS10" ;; \ + 5.11) SOLARISVERSION="-DSOLARIS11" ;; \ + *) SOLARISVERSION="-DSOLARIS" ;; \ + esac ; \ + $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \ + KTARGET=$${KTARGET:-$(@)} \ + "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \ + -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \ + -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \ + -DPUSH_LDTERM -DPUSH_TTCOMPAT \ + -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \ + -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \ + "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)" + +#Solaris 9, 10, or 11 with gcc + Kerberos 5 + OpenSSL. +#OK C-Kermit 9.0.301. +solaris9g+krb5+ssl solaris10g+krb5+ssl solaris11g+krb5+ssl: @case `openssl version` in \ *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \ *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \ @@ -3833,49 +3897,13 @@ cu-solaris9g+krb5: $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \ "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \ -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \ - -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DCK_ENCRYPTION -DCK_CAST \ - $$OPENSSLOPTION $$HAVE_DES $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \ - "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv -lcrypto \ + -DCK_AUTHENTICATION -DCK_SSL -DZLIB -DCK_KERBEROS -DKRB5 \ + -DCK_ENCRYPTION -DCK_CAST $$OPENSSLOPTION \ + $$HAVE_DES $(SSLINC) $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \ + "LIBS= $(SSLLIB) $(K5LIB) -lz -lssl -ltermlib -lsocket -lnsl -lm \ + -lresolv -lcrypto \ $$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)" -#Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow + Long files -#Columbia Only, mainly because of the -R clause. -# (I tried adding -DCK_SRP and -lsrp but got a lot of symbol referencing -# errors at link time.) -cu-solaris9g+krb5+krb4+openssl+shadow+pam+zlib: - $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \ - "CFLAGS = -O -Usun -DSVR4 -DSOLARIS -DSTERMIOX -DSELECT -DFNFLOAT \ - -DSOLARIS9 -D_FILE_OFFSET_BITS=64 -DBIGBUFOK \ - -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \ - -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \ - -DCK_ENCRYPTION -DCK_SSL -DCK_DES -DCK_CAST -DNO_KRB5_INIT_ETS \ - -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES -DOPENSSL_097 -DCK_FORWARD_X \ - $(K5INC) $(K5INC)/krb5 $(SSLINC) $(KFLAGS)" \ - "LIBS= $(K5LIB) $(SSLLIB) -R/opt/local/lib -ltermlib -lsocket -lnsl \ - -lm -lresolv -lkrb4 -lssl -lcrypto -lgssapi_krb5 -lkrb5 \ - -lcom_err -lk5crypto -lpam -ldes425 -lz $(LIBS)" - -#Solaris 9, 10, or 11 with gcc... -#Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier. -#This target is chained to be the secure solaris9g+xxx targets below. -solaris9g solaris10g solaris11g: - @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc' - @case `uname -r` in \ - 5.9) SOLARISVERSION="-DSOLARIS9" ;; \ - 5.10) SOLARISVERSION="-DSOLARIS10" ;; \ - 5.11) SOLARISVERSION="-DSOLARIS11" ;; \ - *) SOLARISVERSION="-DSOLARIS" ;; \ - esac ; \ - $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \ - KTARGET=$${KTARGET:-$(@)} \ - "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \ - -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \ - -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \ - -DPUSH_LDTERM -DPUSH_TTCOMPAT \ - -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \ - -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \ - "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)" - #Solaris 9, 10, or 11 with gcc, 64 bit build. #Peeking inside FILE struct not allowed in 64-bit world. #DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run. @@ -3901,7 +3929,7 @@ solaris9g64 solaris10g64 solaris11g64: #Solaris 9, 10, or 11 with SunPro CC #Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier. #This target is chained to by the secure targets below. -#OK: 2011/06/15 +#OK C-Kermit 9.0 solaris9 solaris10 solaris11: @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC' @case `uname -r` in \ @@ -3929,7 +3957,7 @@ solaris9 solaris10 solaris11: # Don't use 'make -e' because that inhibits passing of KFLAGS to # the base (solaris9) target. # -#OK: 2011/06/14 +#OK C-Kermit 9.0 solaris9+ssl solaris10+ssl solaris11+ssl \ solaris9+openssl solaris10+openssl solaris11+openssl: @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc' @@ -3957,7 +3985,7 @@ solaris9+openssl solaris10+openssl solaris11+openssl: # chains to the solaris{9,10,11}g target but for some reason it doesn't work if # you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target. # -#OK: 2020/06/15 +#OK: 2011/06/14 solaris9g+ssl solaris10g+ssl solaris11g+ssl \ solaris9g+openssl solaris10g+openssl solaris11g+openssl: @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc' @@ -5342,7 +5370,7 @@ hpux0500: "CFLAGS = -DHPUX -DHPUX5 -DHPUXPRE65 -DNOREDIRECT -DDCLGETCWD \ -DNOGETUSERSHELL -DNOGFTIMER -DNOSYSLOG -DNOTOMACROS -DNOLSTAT \ -DNOSYMLINK -DNOINITGROUPS -DNOUNICODE -DNOLEARN -DNOLONGLONG \ - $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = " + -DVOID=int -DCKVOID=int $(KFLAGS)" "LIBS = $(LIBS)" "LNKFLAGS = " #HP-9000 500 HP-UX 5.21 with Wollongong WIN/TCP 1.2 TCP/IP. #Requires /usr/wins/usr/include and /usr/lib/libnet.a from Wollongong. @@ -5352,9 +5380,9 @@ hpux0500: hpux0500wintcp: @MESSAGE1="with WIN/TCP but without any extra compiler optimization" \ $(MAKE) hpux0500 KTARGET=$${KTARGET:-$(@)} \ - "KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV -DNOMHHOST \ - -DNOHADDRLIST -DNOLONGLONG -I/usr/wins/usr/include $(KFLAGS)" \ - "LIBS = /usr/lib/libnet.a" + "KFLAGS = -DTCPSOCKET -DHPUX5WINTCP -DINADDRX -DNO_DNS_SRV \ + -DNOMHHOST -DVOID=int -DCKVOID=int -DNOHADDRLIST -DNOLONGLONG \ + -I/usr/wins/usr/include $(KFLAGS)" "LIBS = /usr/lib/libnet.a" #HP-UX 6.5, short filenames, no network and no curses support. #ckcpro, ckuusr, ckuus3 and others are broken out because they make the @@ -6170,9 +6198,11 @@ linux+krb5: K5CRYPTO=''; \ if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \ K5CRYPTO='-lk5crypto'; \ + else if ls /usr/lib/libk5crypto* > /dev/null 2> /dev/null; then \ + K5CRYPTO='-lk5crypto'; \ else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \ K5CRYPTO='-lk5crypto'; \ - fi; fi; \ + fi; fi; fi; \ COM_ERR=''; \ if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \ COM_ERR='-lcom_err'; \ @@ -6275,9 +6305,11 @@ linux+krb5+ssl linux+krb5+openssl: K5CRYPTO=''; \ if ls /lib/libk5crypto* > /dev/null 2> /dev/null; then \ K5CRYPTO='-lk5crypto'; \ + else if ls /usr/lib/libk5crypto* > /dev/null 2> /dev/null; then \ + K5CRYPTO='-lk5crypto'; \ else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \ K5CRYPTO='-lk5crypto'; \ - fi; fi; \ + fi; fi; fi; \ COM_ERR=''; \ if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \ COM_ERR='-lcom_err'; \