home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / cku209txt.zip / ckuins.txt < prev    next >
Text File  |  2003-03-30  |  176KB  |  3,474 lines

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