startup

  This program should be called by inetd when a tcp connection is attempted
  from port 592 (i.e:  A line like: "592   tcp   /usr/etc/startup" should
  be added to /etc/servers).  It in turn starts up sxtrek.  If you don't
  have access to /etc/servers but would like to start up a daemon anyway,
  then compile startd.c after defining STARTPROG properly within startd.c.
  Then run startd (it acts like inetd would).

  This version of the startup code does not change the userid.  However, it 
  probably should, since otherwise the code would be running as login=root 
  (since that is how inetd runs).  So, you might want to add some lines to 
  xtrekII.sock.c to do the right thing.

  Basically, access.c checks some files which should specify which machines 
  are allowed to play.  Any illegal machines are denyed access.  

  The file "/usr/games/lib/xtrek/.access" might looks like this:

default		y
bard		/usr/games/lib/xtrek/.no_bard

  And the file /usr/games/lib/xtrek/.no_bard has a message in it saying
  why access is turned off.  The socket version, though, doesn't send it.

Installation:

    set PROG and LOGFILE correctly in xtrekII.sock.c, and set ACCESS_FILE
    correctly in access.c.  If you don't want to restrict access, then
    make up a file name which doesn't exist (or change line 183 to return 
    1).  If you don't want to log anything, then set LOGFILE to /dev/null.
    Note:  It is important for xtrekII.sock.c to call host_access(), because
    host_access() figures out the calling machine's name, which is used
    in the game to better identify a player.

    To install this with startd, you must:

      - set STARTPROG in startd to the correct file name.  
      - run startd (with an optional port number, the default is 2592) to 
	  start it.  Now, you can connect to the game with 
	  "netrek -p [port number] -h [hostname]".
    
    To install this with inetd, you must:

      - add a line like:
	  592	tcp	/usr/etc/startup
        to /etc/servers.
      - Adjust the filenames in xtrekII.sock.c and access.c to point to
	  the right places.
      - Add a line near the end of xtrekII.sock.c to setuid() to an appropriate
	  user (optional).

Bugs:

    Depending on your OS, you may get defunct processes laying around.
    If you do, then you need to copy the reaper() function from daemonII.c,
    as well as the signal(SIGCHLD, reaper) call.  Put them somewhere in 
    startd.c (reaper() should go in the beginning somewhere, and the 
    signal() call should go near the beginning of main()).
