home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-26 | 34.9 KB | 1,285 lines |
- Newsgroups: comp.sources.unix
- From: panos@cs.colorado.edu (Panos Tsirigotis)
- Subject: v26i245: xinetd-2.1.1 - inetd replacement with access control and logging, Part01/31
- Sender: unix-sources-moderator@gw.home.vix.com
- Approved: vixie@gw.home.vix.com
-
- Submitted-By: panos@cs.colorado.edu (Panos Tsirigotis)
- Posting-Number: Volume 26, Issue 245
- Archive-Name: xinetd-2.1.1/part01
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 31)."
- # Contents: README libs libs/include libs/lib libs/man libs/src
- # libs/src/misc libs/src/misc/README libs/src/misc/ftwx.h
- # libs/src/misc/misc.h libs/src/pq libs/src/pq/hpqimpl.h
- # libs/src/pq/pq.c libs/src/pq/pq.h libs/src/pset
- # libs/src/pset/ops.c libs/src/sio libs/src/sio/suite
- # libs/src/sio/suite/buftest.c libs/src/sio/suite/example.c
- # libs/src/sio/suite/testlib libs/src/sio/suite/tietest.c
- # libs/src/str libs/src/str/CHANGELOG libs/src/str/ss_bmh.h
- # libs/src/str/ss_kmp.h libs/src/str/ss_rk.h libs/src/str/ss_sbm.h
- # libs/src/str/ss_so.h libs/src/timer libs/src/xlog
- # libs/src/xlog/CHANGELOG libs/src/xlog/slog.h xinetd
- # xinetd/BUG-REPORTS xinetd/addr.h xinetd/builtin.h xinetd/conf.h
- # xinetd/flags.h xinetd/mask.h xinetd/parse.h xinetd/sconst.h
- # Wrapped by panos@mystique on Mon Jun 21 14:51:19 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(2895 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X
- X======================================================================
- XATTENTION: vi users set your tabstop to 3 to make this file (and all
- X other files) look nice on your screen
- X======================================================================
- X
- XQ. What is xinetd ?
- XA. xinetd is a replacement for inetd, the internet services daemon.
- X
- X
- XQ: I am not a system administrator; what do I care about an inetd replacement ?
- XA: xinetd is not just an inetd replacement. Anybody can use it to start servers
- X that don't require privileged ports because xinetd does not require that the
- X services in its configuration file be listed in /etc/services.
- X
- X
- XQ. Is it compatible with inetd ?
- XA. No, its configuration file has a different format than inetd's one
- X and it understands different signals. However the signal-to-action
- X assignment can be changed and a program has been included to convert
- X inetd.conf to xinetd.conf.
- X
- X
- XQ. Why should I use it ?
- XA. Because it is a lot better (IMHO) than inetd. Here are the reasons:
- X
- X 1) It can do access control on all services based on:
- X a. address of remote host
- X b. time of access
- X
- X 2) Access control works on all services, whether multi-threaded or
- X single-threaded and for both the TCP and UDP protocols.
- X All UDP packets can be checked as well as all TCP connections.
- X
- X 3) It provides hard reconfiguration:
- X a. kills servers for services that are no longer in the
- X configuration file
- X b. kills servers that no longer meet the access control criteria
- X
- X 4) It can prevent denial-of-access attacks by
- X a. placing limits on the number of servers for each service
- X (avoids process table overflows)
- X b. placing an upper bound on the number of processes it will fork
- X c. placing limits on the size of log files it creates
- X
- X 5) Extensive logging abilities:
- X a. for every server started it can log:
- X i) the time when the server was started
- X ii) the remote host address
- X iii) who was the remote user (if the other end runs a
- X RFC-931/RFC-1413 server)
- X iv) how long the server was running
- X (i, ii and iii can be logged for failed attempts too).
- X b. for some services, if the access control fails, it can
- X log information about the attempted access (for example,
- X it can log the user name and command for the rsh service)
- X
- X 6) No limit on number of server arguments
- X
- XQ. Where can I find the latest-and-greatest version ?
- XA. It should be available via anonymous FTP from mystique.cs.colorado.edu
- X in the directory "pub/xinetd".
- X
- XQ. Whom should I thank/blame for this program ?
- XA. Any comments about xinetd should be sent to panos@cs.colorado.edu
- X
- END_OF_FILE
- if test 2895 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test ! -d 'libs' ; then
- echo shar: Creating directory \"'libs'\"
- mkdir 'libs'
- fi
- if test ! -d 'libs/include' ; then
- echo shar: Creating directory \"'libs/include'\"
- mkdir 'libs/include'
- fi
- if test ! -d 'libs/lib' ; then
- echo shar: Creating directory \"'libs/lib'\"
- mkdir 'libs/lib'
- fi
- if test ! -d 'libs/man' ; then
- echo shar: Creating directory \"'libs/man'\"
- mkdir 'libs/man'
- fi
- if test ! -d 'libs/src' ; then
- echo shar: Creating directory \"'libs/src'\"
- mkdir 'libs/src'
- fi
- if test ! -d 'libs/src/misc' ; then
- echo shar: Creating directory \"'libs/src/misc'\"
- mkdir 'libs/src/misc'
- fi
- if test -f 'libs/src/misc/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/README'\"
- else
- echo shar: Extracting \"'libs/src/misc/README'\" \(439 characters\)
- sed "s/^X//" >'libs/src/misc/README' <<'END_OF_FILE'
- X
- X
- XThis library is made of 3 parts:
- X ftwx, misc, env
- X
- Xenv is a collection of environment processing functions.
- Xmisc is a collection of miscellaneous functions.
- Xftwx is a replacement for the standard ftw(3) function.
- X
- XWhen installing this library you may need to define the following
- Xflags in the Makefile:
- X OLD_DIR if your system does not have the file /usr/include/dirent.h
- X __FTWX_NO_FTW if your system does not have the ftw(3) function
- X
- END_OF_FILE
- if test 439 -ne `wc -c <'libs/src/misc/README'`; then
- echo shar: \"'libs/src/misc/README'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/README'
- fi
- if test -f 'libs/src/misc/ftwx.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/ftwx.h'\"
- else
- echo shar: Extracting \"'libs/src/misc/ftwx.h'\" \(702 characters\)
- sed "s/^X//" >'libs/src/misc/ftwx.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X#ifndef __FTWX_H
- X#define __FTWX_H
- X
- X/*
- X * $Id: ftwx.h,v 2.1 1992/10/01 00:41:02 panos Exp $
- X */
- X
- X#ifndef __FTWX_NO_FTW
- X#include <ftw.h>
- X#else
- X#define FTW_F 0
- X#define FTW_D 1
- X#define FTW_DNR 2
- X#define FTW_NS 3
- X#endif
- X
- X
- X/*
- X * Flags
- X */
- X#define FTWX_ALL -1
- X#define FTWX_FOLLOW 0x1
- X
- X
- X#ifdef __ARGS
- X#undef _ARGS
- X#endif
- X
- X#ifdef PROTOTYPES
- X# define __ARGS( s ) s
- X#else
- X# define __ARGS( s ) ()
- X#endif
- X
- Xint ftwx __ARGS( ( char *path, int (*func)(), int depth, int flags ) ) ;
- X
- X#endif /* __FTWX_H */
- X
- END_OF_FILE
- if test 702 -ne `wc -c <'libs/src/misc/ftwx.h'`; then
- echo shar: \"'libs/src/misc/ftwx.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/ftwx.h'
- fi
- if test -f 'libs/src/misc/misc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/misc.h'\"
- else
- echo shar: Extracting \"'libs/src/misc/misc.h'\" \(806 characters\)
- sed "s/^X//" >'libs/src/misc/misc.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X#ifndef __MISC_H
- X#define __MISC_H
- X
- X
- X/*
- X * $Id: misc.h,v 2.1 1992/10/01 00:41:34 panos Exp $
- X */
- X
- X/*
- X * Align to a power of 2
- X */
- X#define align2( num, al ) (((num)+(al)-1) & ~((al)-1))
- X
- X#ifdef __ARGS
- X#undef __ARGS
- X#endif
- X
- X#ifdef PROTOTYPES
- X# define __ARGS( s ) s
- X#else
- X# define __ARGS( s ) ()
- X#endif
- X
- X
- Xchar *make_string __ARGS( ( unsigned count, ... ) ) ;
- Xchar *make_pathname __ARGS( ( unsigned count, ... ) ) ;
- X
- Xchar **argv_copy_and_clear __ARGS( ( char **argv, int start, int count ) ) ;
- Xchar *dirname __ARGS( ( char *pathname ) ) ;
- Xchar *basename __ARGS( ( char *pathname ) ) ;
- X
- X#endif /* __MISC_H */
- X
- END_OF_FILE
- if test 806 -ne `wc -c <'libs/src/misc/misc.h'`; then
- echo shar: \"'libs/src/misc/misc.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/misc.h'
- fi
- if test ! -d 'libs/src/pq' ; then
- echo shar: Creating directory \"'libs/src/pq'\"
- mkdir 'libs/src/pq'
- fi
- if test -f 'libs/src/pq/hpqimpl.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/hpqimpl.h'\"
- else
- echo shar: Extracting \"'libs/src/pq/hpqimpl.h'\" \(785 characters\)
- sed "s/^X//" >'libs/src/pq/hpqimpl.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X/*
- X * $Id: hpqimpl.h,v 1.1 1992/11/23 16:25:25 panos Exp $
- X */
- X
- X#include "hpq.h"
- X
- Xtypedef struct __hpq_header header_s ;
- X
- X#define HHP( p ) ((header_s *)p)
- X
- X#define HANDLE_ERROR( flags, retval, errp, errval, msg ) \
- X if ( flags & PQ_RETURN_ERROR ) \
- X { \
- X *errp = errval ; \
- X return( retval ) ; \
- X } \
- X else \
- X { \
- X char *s = msg ; \
- X \
- X (void) write( 2, s, strlen( s ) ) ; \
- X abort() ; \
- X _exit( 1 ) ; \
- X /* NOTREACHED */ \
- X }
- X
- X
- END_OF_FILE
- if test 785 -ne `wc -c <'libs/src/pq/hpqimpl.h'`; then
- echo shar: \"'libs/src/pq/hpqimpl.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/hpqimpl.h'
- fi
- if test -f 'libs/src/pq/pq.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/pq.c'\"
- else
- echo shar: Extracting \"'libs/src/pq/pq.c'\" \(289 characters\)
- sed "s/^X//" >'libs/src/pq/pq.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: pq.c,v 1.1 1992/11/23 16:25:25 panos Exp $" ;
- Xstatic char version[] = VERSION ;
- X
- Xint pq_errno ;
- X
- END_OF_FILE
- if test 289 -ne `wc -c <'libs/src/pq/pq.c'`; then
- echo shar: \"'libs/src/pq/pq.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/pq.c'
- fi
- if test -f 'libs/src/pq/pq.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/pq.h'\"
- else
- echo shar: Extracting \"'libs/src/pq/pq.h'\" \(686 characters\)
- sed "s/^X//" >'libs/src/pq/pq.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef __PQ_H
- X#define __PQ_H
- X
- X/*
- X * $Id: pq.h,v 1.4 1993/04/01 02:14:52 panos Exp $
- X */
- X
- X/*
- X * Return values
- X */
- X#define PQ_OK 0
- X#define PQ_ERR (-1)
- X
- Xextern int pq_errno ;
- X
- X/*
- X * pq_errno values
- X */
- X#define PQ_ENOERROR 0
- X#define PQ_ENOFUNC 1
- X#define PQ_ENOMEM 2
- X#define PQ_ENULLOBJECT 3
- X#define PQ_ENOTFOUND 4
- X#define PQ_ENOTSUPPORTED 5
- X
- X/*
- X * flag values
- X */
- X#define PQ_NOFLAGS 0x0
- X#define PQ_RETURN_ERROR 0x1
- X
- Xtypedef void *pq_h ;
- Xtypedef void *pq_obj ;
- X
- X#include "hpq.h"
- X
- X#endif /* __PQ_H */
- X
- END_OF_FILE
- if test 686 -ne `wc -c <'libs/src/pq/pq.h'`; then
- echo shar: \"'libs/src/pq/pq.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/pq.h'
- fi
- if test ! -d 'libs/src/pset' ; then
- echo shar: Creating directory \"'libs/src/pset'\"
- mkdir 'libs/src/pset'
- fi
- if test -f 'libs/src/pset/ops.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pset/ops.c'\"
- else
- echo shar: Extracting \"'libs/src/pset/ops.c'\" \(968 characters\)
- sed "s/^X//" >'libs/src/pset/ops.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: ops.c,v 3.1 1993/03/13 23:21:53 panos Exp $" ;
- X
- X#include "pset.h"
- X
- X#define PRIVATE static
- X#define POINTER __pset_pointer
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X
- X/*
- X * Remove all NULL pointers from a pset
- X */
- Xvoid pset_compact( pset )
- X register pset_h pset ;
- X{
- X register unsigned u ;
- X
- X for ( u = 0 ; u < pset_count( pset ) ; )
- X if ( pset_pointer( pset, u ) != NULL )
- X u++ ;
- X else
- X pset_remove_index( pset, u ) ;
- X}
- X
- X
- X/*
- X * Apply a function to all pointers of a pset
- X */
- Xvoid pset_apply( pset, func, arg )
- X register pset_h pset ;
- X register void (*func)() ;
- X register void *arg ;
- X{
- X register unsigned u ;
- X
- X for ( u = 0 ; u < pset_count( pset ) ; u++ )
- X if ( arg )
- X (*func)( arg, pset_pointer( pset, u ) ) ;
- X else
- X (*func)( pset_pointer( pset, u ) ) ;
- X}
- X
- END_OF_FILE
- if test 968 -ne `wc -c <'libs/src/pset/ops.c'`; then
- echo shar: \"'libs/src/pset/ops.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pset/ops.c'
- fi
- if test ! -d 'libs/src/sio' ; then
- echo shar: Creating directory \"'libs/src/sio'\"
- mkdir 'libs/src/sio'
- fi
- if test ! -d 'libs/src/sio/suite' ; then
- echo shar: Creating directory \"'libs/src/sio/suite'\"
- mkdir 'libs/src/sio/suite'
- fi
- if test -f 'libs/src/sio/suite/buftest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/buftest.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/buftest.c'\" \(748 characters\)
- sed "s/^X//" >'libs/src/sio/suite/buftest.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: buftest.c,v 8.1 1993/03/13 01:23:09 panos Exp $" ;
- X
- X#include "sio.h"
- X
- Xmain()
- X{
- X int i ;
- X int sleep_interval = 3 ;
- X
- X if ( Sbuftype( 1, SIO_LINEBUF ) == SIO_ERR )
- X {
- X Sprint( 2, "Sbuftype failed\n" ) ;
- X exit( 1 ) ;
- X }
- X
- X for ( i = 0 ; i < 10 ; i++ )
- X {
- X Sprint( 1, "Line %d\n", i ) ;
- X if ( i == 5 )
- X {
- X Sprint( 1, "Now switching to full buffering\n" ) ;
- X sleep_interval = 2 ;
- X if ( Sbuftype( 1, SIO_FULLBUF ) == SIO_ERR )
- X {
- X Sprint( 2, "2nd Sbuftype failed\n" ) ;
- X exit( 1 ) ;
- X }
- X }
- X sleep( sleep_interval ) ;
- X }
- X exit( 0 ) ;
- X}
- X
- END_OF_FILE
- if test 748 -ne `wc -c <'libs/src/sio/suite/buftest.c'`; then
- echo shar: \"'libs/src/sio/suite/buftest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/buftest.c'
- fi
- if test -f 'libs/src/sio/suite/example.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/example.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/example.c'\" \(569 characters\)
- sed "s/^X//" >'libs/src/sio/suite/example.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: example.c,v 8.1 1993/03/13 01:21:48 panos Exp $" ;
- X
- X#include "sio.h"
- X
- Xmain( argc, argv )
- X int argc ;
- X char *argv[] ;
- X{
- X char *file = (argc > 1) ? argv[ 1 ] : "tee.file" ;
- X int fd = creat( file, 0644 ) ;
- X long length ;
- X char *s ;
- X
- X while ( s = Sfetch( 0, &length ) )
- X {
- X Swrite( 1, s, length ) ;
- X Swrite( fd, s, length ) ;
- X }
- X exit( 0 ) ;
- X}
- X
- END_OF_FILE
- if test 569 -ne `wc -c <'libs/src/sio/suite/example.c'`; then
- echo shar: \"'libs/src/sio/suite/example.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/example.c'
- fi
- if test -f 'libs/src/sio/suite/testlib' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/testlib'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/testlib'\" \(877 characters\)
- sed "s/^X//" >'libs/src/sio/suite/testlib' <<'END_OF_FILE'
- X#!/bin/sh
- X
- X# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X# All rights reserved. The file named COPYRIGHT specifies the terms
- X# and conditions for redistribution.
- X
- X
- X#
- X# $Id: testlib,v 8.1 1993/03/13 01:23:48 panos Exp $
- X#
- X
- X#
- X# Purpose:
- X# Invoke the tester script. This is necessary because the tester
- X# script requires functions and /bin/sh does not support functions
- X# on all OS's. This script decides what shell to use to execute
- X# tester. On Suns, it uses /bin/sh. On DECstations, it uses
- X# /usr/bin/ksh
- X# The decision is made by checking $ARCH
- X#
- X
- Xcase "$ARCH" in
- X "")
- X echo "ARCH not defined. Please define it."
- X exit 1
- X ;;
- X
- X sun4|sun3)
- X TESTSHELL=/bin/sh
- X LDFLAGS="-Bstatic -lm"
- X ;;
- X
- X dec-mips)
- X TESTSHELL=/usr/bin/ksh
- X LDFLAGS=
- X ;;
- X
- X *) echo "Unknown architecture: $ARCH"
- X exit 2
- X ;;
- Xesac
- X
- Xexport LDFLAGS
- Xexport TESTSHELL
- X$TESTSHELL tester $*
- X
- END_OF_FILE
- if test 877 -ne `wc -c <'libs/src/sio/suite/testlib'`; then
- echo shar: \"'libs/src/sio/suite/testlib'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/testlib'
- fi
- if test -f 'libs/src/sio/suite/tietest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/tietest.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/tietest.c'\" \(669 characters\)
- sed "s/^X//" >'libs/src/sio/suite/tietest.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: tietest.c,v 8.1 1993/03/13 01:24:07 panos Exp $" ;
- X
- X#include "sio.h"
- X#include <stdio.h>
- X
- Xmain()
- X{
- X char *s ;
- X
- X Stie( 0, 1 ) ;
- X Sprint( 1, "Enter 1st command --> " ) ;
- X s = Srdline( 0 ) ;
- X Sprint( 1, "Received command: %s\n", s ) ;
- X Sprint( 1, "Enter 2nd command --> " ) ;
- X s = Srdline( 0 ) ;
- X Sprint( 1, "Received command: %s\n", s ) ;
- X Suntie( 0 ) ;
- X Sprint( 1, "Enter 3rd command --> " ) ;
- X s = Srdline( 0 ) ;
- X Sprint( 1, "Received command: %s\n", s ) ;
- X exit( 0 ) ;
- X}
- END_OF_FILE
- if test 669 -ne `wc -c <'libs/src/sio/suite/tietest.c'`; then
- echo shar: \"'libs/src/sio/suite/tietest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/tietest.c'
- fi
- if test ! -d 'libs/src/str' ; then
- echo shar: Creating directory \"'libs/src/str'\"
- mkdir 'libs/src/str'
- fi
- if test -f 'libs/src/str/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/str/CHANGELOG'\" \(437 characters\)
- sed "s/^X//" >'libs/src/str/CHANGELOG' <<'END_OF_FILE'
- X
- X1.2.0:
- X First release (as part of xinetd 1.3)
- X
- X1.3.2:
- X Added the string matching functions
- X
- X1.3.3: (posted to alt.sources)
- X Changed the way the library is configured
- X
- X1.4.0:
- X Added the shift-or string matching algorithm
- X Implemented the automatic switching to the proper search algorithm
- X Added the STRS_NOSWITCH flag to disallow switching
- X Added the STRS_PATLEN flag
- X
- X1.4.1:
- X Moved definition of u_wide_int from ss_rk.h to ss_impl.h
- X
- END_OF_FILE
- if test 437 -ne `wc -c <'libs/src/str/CHANGELOG'`; then
- echo shar: \"'libs/src/str/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/CHANGELOG'
- fi
- if test -f 'libs/src/str/ss_bmh.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_bmh.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_bmh.h'\" \(366 characters\)
- sed "s/^X//" >'libs/src/str/ss_bmh.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_BMH_H
- X#define SS_BMH_H
- X
- X/*
- X * $Id: ss_bmh.h,v 3.1 1993/06/13 02:42:53 panos Exp $
- X */
- X
- Xtypedef unsigned shift_int ;
- X
- Xstruct bmh_header
- X{
- X shift_int *shift ;
- X} ;
- X
- X#endif /* SS_BMH_H */
- X
- END_OF_FILE
- if test 366 -ne `wc -c <'libs/src/str/ss_bmh.h'`; then
- echo shar: \"'libs/src/str/ss_bmh.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_bmh.h'
- fi
- if test -f 'libs/src/str/ss_kmp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_kmp.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_kmp.h'\" \(381 characters\)
- sed "s/^X//" >'libs/src/str/ss_kmp.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_KMP_H
- X#define SS_KMP_H
- X
- X/*
- X * $Id: ss_kmp.h,v 3.1 1993/06/13 02:44:52 panos Exp $
- X */
- X
- Xtypedef int next_int ; /* must be signed */
- X
- Xstruct kmp_header
- X{
- X next_int *next ;
- X} ;
- X
- X#endif /* SS_KMP_H */
- X
- END_OF_FILE
- if test 381 -ne `wc -c <'libs/src/str/ss_kmp.h'`; then
- echo shar: \"'libs/src/str/ss_kmp.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_kmp.h'
- fi
- if test -f 'libs/src/str/ss_rk.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_rk.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_rk.h'\" \(579 characters\)
- sed "s/^X//" >'libs/src/str/ss_rk.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_RK_H
- X#define SS_RK_H
- X
- X/*
- X * $Id: ss_rk.h,v 3.2 1993/06/16 00:06:34 panos Exp $
- X */
- X
- Xstruct rk_header
- X{
- X u_wide_int rk_digit1 ; /* in the appropriate radix */
- X u_wide_int rk_patval ;
- X} ;
- X
- X#if WIDE_INT_SIZE == 32
- X# define PRIME 16777213
- X#else
- X# if WIDE_INT_SIZE == 16
- X# define PRIME 251
- X# else
- X int WIDE_INT_SIZE_has_bad_value = or_is_undefined ;
- X# endif
- X#endif
- X
- X#endif /* SS_RK_H */
- X
- END_OF_FILE
- if test 579 -ne `wc -c <'libs/src/str/ss_rk.h'`; then
- echo shar: \"'libs/src/str/ss_rk.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_rk.h'
- fi
- if test -f 'libs/src/str/ss_sbm.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_sbm.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_sbm.h'\" \(393 characters\)
- sed "s/^X//" >'libs/src/str/ss_sbm.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X#ifndef SS_SBM_H
- X#define SS_SBM_H
- X
- X/*
- X * $Id: ss_sbm.h,v 3.1 1993/06/13 02:46:00 panos Exp $
- X */
- X
- Xtypedef int last_int ; /* must be signed */
- X
- Xstruct sbm_header
- X{
- X last_int *last_occurrence ;
- X} ;
- X
- X#endif /* SS_SBM_H */
- X
- END_OF_FILE
- if test 393 -ne `wc -c <'libs/src/str/ss_sbm.h'`; then
- echo shar: \"'libs/src/str/ss_sbm.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_sbm.h'
- fi
- if test -f 'libs/src/str/ss_so.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_so.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_so.h'\" \(353 characters\)
- sed "s/^X//" >'libs/src/str/ss_so.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_SO_H
- X#define SS_SO_H
- X
- X/*
- X * $Id: ss_so.h,v 3.1 1993/06/13 02:46:47 panos Exp $
- X */
- X
- Xstruct so_header
- X{
- X wide_int *mask ;
- X wide_int offset_mask ;
- X} ;
- X
- X#endif /* SS_SO_H */
- END_OF_FILE
- if test 353 -ne `wc -c <'libs/src/str/ss_so.h'`; then
- echo shar: \"'libs/src/str/ss_so.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_so.h'
- fi
- if test ! -d 'libs/src/timer' ; then
- echo shar: Creating directory \"'libs/src/timer'\"
- mkdir 'libs/src/timer'
- fi
- if test ! -d 'libs/src/xlog' ; then
- echo shar: Creating directory \"'libs/src/xlog'\"
- mkdir 'libs/src/xlog'
- fi
- if test -f 'libs/src/xlog/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/xlog/CHANGELOG'\" \(229 characters\)
- sed "s/^X//" >'libs/src/xlog/CHANGELOG' <<'END_OF_FILE'
- X
- X1.0.8:
- X First release
- X
- X1.0.9:
- X Fixed bug in the syslog xlogs.
- X
- X1.1.2:
- X * Timestamps are now always included
- X * If NO_SYSLOG is defined, syslog xlogs become unavailable (this was
- X available in 1.0.9 but it didn't work right).
- X
- END_OF_FILE
- if test 229 -ne `wc -c <'libs/src/xlog/CHANGELOG'`; then
- echo shar: \"'libs/src/xlog/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/CHANGELOG'
- fi
- if test -f 'libs/src/xlog/slog.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/slog.h'\"
- else
- echo shar: Extracting \"'libs/src/xlog/slog.h'\" \(616 characters\)
- sed "s/^X//" >'libs/src/xlog/slog.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X/*
- X * $Id: slog.h,v 2.1 1993/05/06 07:39:39 panos Exp $
- X */
- X
- X
- Xstruct syslog
- X{
- X int sl_facility ;
- X int sl_default_level ;
- X} ;
- X
- X
- Xstruct syslog_parms
- X{
- X int slp_n_xlogs ; /* # of xlogs using syslog */
- X int slp_logopts ; /* used at openlog */
- X int slp_facility ;
- X char *slp_ident ; /* used at openlog */
- X bool_int slp_ident_is_malloced ;
- X} ;
- X
- X#define SYSLOG( xp ) ((struct syslog *)xp->xl_data)
- X
- END_OF_FILE
- if test 616 -ne `wc -c <'libs/src/xlog/slog.h'`; then
- echo shar: \"'libs/src/xlog/slog.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/slog.h'
- fi
- if test ! -d 'xinetd' ; then
- echo shar: Creating directory \"'xinetd'\"
- mkdir 'xinetd'
- fi
- if test -f 'xinetd/BUG-REPORTS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/BUG-REPORTS'\"
- else
- echo shar: Extracting \"'xinetd/BUG-REPORTS'\" \(312 characters\)
- sed "s/^X//" >'xinetd/BUG-REPORTS' <<'END_OF_FILE'
- X
- XYou can report bugs in xinetd by sending mail to: panos@cs.colorado.edu
- X
- XIn your message please include:
- X 1. A description of the bug
- X 2. Any relevant log portions
- X 3. The version of xinetd and accompanying libraries. You can use the
- X following command to obtain this info:
- X strings xinetd | grep Version
- X
- END_OF_FILE
- if test 312 -ne `wc -c <'xinetd/BUG-REPORTS'`; then
- echo shar: \"'xinetd/BUG-REPORTS'\" unpacked with wrong size!
- fi
- # end of 'xinetd/BUG-REPORTS'
- fi
- if test -f 'xinetd/addr.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/addr.h'\"
- else
- echo shar: Extracting \"'xinetd/addr.h'\" \(460 characters\)
- sed "s/^X//" >'xinetd/addr.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef ADDR_H
- X#define ADDR_H
- X
- X/*
- X * $Id: addr.h,v 6.2 1993/06/06 00:06:02 panos Exp $
- X */
- X
- X#include "defs.h"
- X
- Xbool_int addrlist_match() ;
- Xvoid addrlist_dump() ;
- Xvoid addrlist_free() ;
- Xstatus_e addrlist_add() ;
- Xstatus_e addrlist_remove() ;
- Xstatus_e addrlist_copy() ;
- X
- X#endif /* ADDR_H */
- END_OF_FILE
- if test 460 -ne `wc -c <'xinetd/addr.h'`; then
- echo shar: \"'xinetd/addr.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/addr.h'
- fi
- if test -f 'xinetd/builtin.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/builtin.h'\"
- else
- echo shar: Extracting \"'xinetd/builtin.h'\" \(966 characters\)
- sed "s/^X//" >'xinetd/builtin.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef BUILTIN_H
- X#define BUILTIN_H
- X
- X/*
- X * $Id: builtin.h,v 6.1 1993/04/04 19:42:53 panos Exp $
- X */
- X
- X#include "defs.h"
- X
- X#define FORK YES
- X#define NO_FORK NO
- X
- Xstruct builtin
- X{
- X voidfunc b_handler ; /* builtin service handler */
- X boolean_e b_fork_server ; /* whether a server must be forked */
- X} ;
- X
- Xtypedef struct builtin builtin_s ;
- X
- X/*
- X * All builtins are invoked with a struct server argument
- X */
- X#define builtin_invoke( bp, serp ) (*(bp)->b_handler)( serp )
- X#define builtin_forks( bp ) ( (bp)->b_fork_server == YES )
- X
- X
- Xstruct builtin_service
- X{
- X char *bs_name ; /* for identification purposes */
- X int bs_socket_type ; /* for identification purposes */
- X builtin_s bs_handle ;
- X} ;
- X
- Xbuiltin_s *builtin_find() ;
- Xbuiltin_s *builtin_lookup() ;
- X
- X#endif /* BUILTIN_H */
- X
- END_OF_FILE
- if test 966 -ne `wc -c <'xinetd/builtin.h'`; then
- echo shar: \"'xinetd/builtin.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/builtin.h'
- fi
- if test -f 'xinetd/conf.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/conf.h'\"
- else
- echo shar: Extracting \"'xinetd/conf.h'\" \(708 characters\)
- sed "s/^X//" >'xinetd/conf.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef CONF_H
- X#define CONF_H
- X
- X/*
- X * $Id: conf.h,v 6.2 1993/05/19 00:46:05 panos Exp $
- X */
- X
- X#include "pset.h"
- X
- X#include "sconf.h"
- X
- Xstruct configuration
- X{
- X pset_h cnf_service_confs ;
- X struct service_config *cnf_defaults ;
- X} ;
- X
- X#define CNF_DEFAULTS( confp ) (confp)->cnf_defaults
- X#define CNF_SERVICE_CONFS( confp ) (confp)->cnf_service_confs
- X
- Xstatus_e cnf_get() ;
- Xstatus_e cnf_init() ;
- Xvoid cnf_free() ;
- Xvoid cnf_dump() ;
- Xstruct service_config *cnf_extract() ;
- Xunsigned cnf_start_services() ;
- X
- X#endif /* CONF_H */
- X
- END_OF_FILE
- if test 708 -ne `wc -c <'xinetd/conf.h'`; then
- echo shar: \"'xinetd/conf.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/conf.h'
- fi
- if test -f 'xinetd/flags.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/flags.h'\"
- else
- echo shar: Extracting \"'xinetd/flags.h'\" \(547 characters\)
- sed "s/^X//" >'xinetd/flags.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef FLAGS_H
- X#define FLAGS_H
- X
- X/*
- X * $Id: flags.h,v 6.2 1993/04/22 23:37:35 panos Exp $
- X */
- X
- X/*
- X * Flags
- X */
- X#define SOFT_RECONFIG_FLAG 1
- X#define HARD_RECONFIG_FLAG 2
- X#define TERMINATE_FLAG 3
- X#define DUMP_FLAG 4
- X#define RETRY_FLAG 5
- X#define CONSISTENCY_FLAG 6
- X#define CHILD_FLAG 7
- X#define QUIT_FLAG 8
- X#define PERIODIC_CHECK_FLAG 9
- X
- X#endif /* FLAGS_H */
- END_OF_FILE
- if test 547 -ne `wc -c <'xinetd/flags.h'`; then
- echo shar: \"'xinetd/flags.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/flags.h'
- fi
- if test -f 'xinetd/mask.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/mask.h'\"
- else
- echo shar: Extracting \"'xinetd/mask.h'\" \(986 characters\)
- sed "s/^X//" >'xinetd/mask.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef MASK_H
- X#define MASK_H
- X
- X/*
- X * $Id: mask.h,v 6.1 1993/04/04 19:46:50 panos Exp $
- X */
- X
- X/*
- X * Macros about masks
- X */
- X
- Xtypedef unsigned mask_t ;
- X
- X#define MASK_EMPTY 0
- X#define MASK_NULL ((mask_t *)0)
- X
- X#define MASK( v ) ( 1 << ( (v)-1 ) )
- X
- X#define M_CLEAR_ALL( mask ) (mask) = 0
- X#define M_ASSIGN( mask1, mask2 ) (mask1) = (mask2)
- X#define M_ARE_ALL_CLEAR( mask ) ( (mask) == 0 )
- X#define M_SET( mask, v ) (mask) |= MASK(v)
- X#define M_CLEAR( mask, v ) (mask) &= ~MASK(v)
- X#define M_IS_SET( mask, v ) ( (mask) & MASK(v) )
- X#define M_IS_CLEAR( mask, v ) ( ! M_IS_SET( mask, v ) )
- X
- X#define M_AND( mres, m1, m2 ) ( (mres) = (m1) & (m2) )
- X#define M_OR( mres, m1, m2 ) ( (mres) = (m1) | (m2) )
- X#define M_XOR( mres, m1, m2 ) ( (mres) = (m1) ^ (m2) )
- X
- X#endif /* MASK_H */
- END_OF_FILE
- if test 986 -ne `wc -c <'xinetd/mask.h'`; then
- echo shar: \"'xinetd/mask.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/mask.h'
- fi
- if test -f 'xinetd/parse.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/parse.h'\"
- else
- echo shar: Extracting \"'xinetd/parse.h'\" \(898 characters\)
- sed "s/^X//" >'xinetd/parse.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef PARSE_H
- X#define PARSE_H
- X
- X#include "defs.h"
- X
- X/*
- X * $Id: parse.h,v 6.2 1993/06/01 22:54:25 panos Exp $
- X */
- X
- Xtypedef enum { NO_ENTRY, BAD_ENTRY, SERVICE_ENTRY, DEFAULTS_ENTRY } entry_e ;
- X
- Xenum assign_op { SET_EQ, PLUS_EQ, MINUS_EQ } ;
- X
- Xstruct attribute
- X{
- X char *a_name ; /* name of attribute */
- X unsigned a_id ; /* attribute id */
- X int a_nvalues ; /* number of values */
- X status_e (*a_parser)() ; /* function that parses the attribute */
- X} ;
- X
- X
- X#define ENTRY_BEGIN '{'
- X#define ENTRY_END '}'
- X#define COMMENT_BEGIN '#'
- X#define KW_SERVICE "service"
- X#define KW_DEFAULTS "defaults"
- X
- Xextern int line_count ;
- X
- X#endif /* PARSE_H */
- X
- END_OF_FILE
- if test 898 -ne `wc -c <'xinetd/parse.h'`; then
- echo shar: \"'xinetd/parse.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/parse.h'
- fi
- if test -f 'xinetd/sconst.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/sconst.h'\"
- else
- echo shar: Extracting \"'xinetd/sconst.h'\" \(688 characters\)
- sed "s/^X//" >'xinetd/sconst.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SCONST_H
- X#define SCONST_H
- X
- X/*
- X * $Id: sconst.h,v 6.3 1993/04/22 23:42:22 panos Exp $
- X */
- X
- X/*
- X * Names of internal non-visible services
- X */
- X#define INTERCEPT_SERVICE_NAME "intercept"
- X#define LOG_SERVICE_NAME "logging"
- X#define SHUTDOWN_SERVICE_NAME "shutdown"
- X
- X
- X/*
- X * Log entry ids
- X */
- X#define START_ENTRY "START"
- X#define FAIL_ENTRY "FAIL"
- X#define EXIT_ENTRY "EXIT"
- X#define DATA_ENTRY "DATA"
- X#define USERID_ENTRY "USERID"
- X#define NOID_ENTRY "NOID"
- X
- X#endif /* SCONST_H */
- X
- END_OF_FILE
- if test 688 -ne `wc -c <'xinetd/sconst.h'`; then
- echo shar: \"'xinetd/sconst.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/sconst.h'
- fi
- echo shar: End of archive 1 \(of 31\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 31 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-