
1. Building

The best way to build kftgt/kftgtd is to do something like (assuming your
make program understands VPATH):

  # mkdir kftgt
  # cd kftgt
  # tar xvf kftgt.tar (should create src directory)
  # mkdir pmax_ul4 (for example)
  # cd pmax_ul4
  # ../src/configure
  # make
  # make install

You'll probably have to specify some options to configure. By default
things gets installed (and the kerberos stuff is looked for) using the
prefix /usr/leland. For example, /usr/leland/lib, /usr/leland/bin, etc.

To change the prefix use the --prefix option:

  # ../src/configure --prefix=/usr/local

If your kerberos libraries and includes aren't in /usr/local/include and
/usr/local/lib then you need to also specify --with-kerberos=path:

  # ../src/configure --prefix=/usr/local --with-kerberos=/usr/athena

Not sure how well those options work since I use the defaults and this
is the first time I've really messed around with GNU configure :-)

If configure croaks you can always look at Makefile.sample which was
generated on a Ultrix system. 

2. Installing

  kftgtd is started from inetd so you need to add an entry to inetd.conf:

kftgtd stream  tcp     nowait root      /usr/leland/etc/kftgtd kftgtd

  And an entry in /etc/services like:

kftgt           2109/tcp        kftgtd          # AFS kerb TGT forwarding svc.

 If you change the service port you should also change it in kftgt.h and
 rebuild kftgt. It uses the value in kftgt.h in case it can't find it in
 /etc/services.


3. Porting

  kftgt should compile cleanly on most systems. I've tested it on the 
  following platforms:

  DEC OSF/1 1.3
  DEC Ultrix 4.4
  SunOS 4.1.3
  Solaris 2.3
  AIX 3.2.3
  NeXTstep 3.2
  IRIX 5.2

  Besides the normal libraries (libkrb, libdes) you may also have to worry 
  about libsocket and libnsl on SysV machines, the return type for signal
  functions, and whether or not you have the unsetenv function. You also
  have to worry about the size of your "long" and "int" variables. The Cygnus
  Kerberos library uses KRB_INT32 and KRB_UINT32 and they are also defined
  in kftgt.h if not found elsewhere. You might also have to worry about
  the "my_" typedefs in marsh.c if you have a strange system.

4. Future work

  I didn't want to complicate things too much so I didn't worry much
  about multiple realms (we only have one) or being able to forward 
  a tgt that is different then the one you have. A simple wrapper could
  handle the second one (set KRBTKFILE to a temp variable, kinit, then 
  run kftgt, followed by kdestroy).

  Please send any comments or bugs to kerberos-help@leland.stanford.edu.

