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