home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-26 | 34.4 KB | 1,106 lines |
- Newsgroups: comp.sources.unix
- From: panos@cs.colorado.edu (Panos Tsirigotis)
- Subject: v26i246: xinetd-2.1.1 - inetd replacement with access control and logging, Part02/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 246
- Archive-Name: xinetd-2.1.1/part02
-
- #! /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 2 (of 31)."
- # Contents: libs/src/misc/COPYRIGHT libs/src/misc/env.h
- # libs/src/pq/COPYRIGHT libs/src/pset/COPYRIGHT
- # libs/src/sio/COPYRIGHT libs/src/sio/suite/fdtest.c
- # libs/src/sio/suite/sprint_test libs/src/str/COPYRIGHT
- # libs/src/str/ss_bf.c libs/src/str/strutil.3
- # libs/src/timer/COPYRIGHT libs/src/timer/defs.h
- # libs/src/xlog/COPYRIGHT libs/src/xlog/filelog.h
- # libs/src/xlog/util.c xinetd/COPYRIGHT xinetd/access.h xinetd/log.h
- # xinetd/options.h
- # Wrapped by panos@mystique on Mon Jun 21 14:51:20 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'libs/src/misc/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/misc/COPYRIGHT'\" \(1336 characters\)
- sed "s/^X//" >'libs/src/misc/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1992 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this copyright notice is also included in any
- Xredistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1336 -ne `wc -c <'libs/src/misc/COPYRIGHT'`; then
- echo shar: \"'libs/src/misc/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/COPYRIGHT'
- fi
- if test -f 'libs/src/misc/env.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/env.h'\"
- else
- echo shar: Extracting \"'libs/src/misc/env.h'\" \(1147 characters\)
- sed "s/^X//" >'libs/src/misc/env.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 __ENV_H
- X#define __ENV_H
- X
- X/*
- X * $Id: env.h,v 1.2 1992/10/31 03:09:33 panos Exp $
- X */
- X
- Xstruct __env
- X{
- X unsigned max_vars ;
- X unsigned n_vars ;
- X char **vars ;
- X} ;
- X
- Xtypedef struct __env *env_h ;
- X
- X#define ENV_NULL ((env_h)0)
- X
- X/*
- X * Return values
- X */
- X#define ENV_ERR (-1)
- X#define ENV_OK 0
- X
- X/*
- X * Error codes
- X */
- X#define ENV_ENOMEM 1
- X#define ENV_EBADVAR 2
- X#define ENV_EBADSTRING 3
- 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
- Xenv_h env_create __ARGS( ( env_h ) ) ;
- Xvoid env_destroy __ARGS( ( env_h ) ) ;
- Xenv_h env_make __ARGS( ( char **env_strings ) ) ;
- Xint env_addvar __ARGS( ( env_h, env_h from_env, char *var ) ) ;
- Xint env_addstr __ARGS( ( env_h, char *str ) ) ;
- Xint env_remvar __ARGS( ( env_h, char *var ) ) ;
- Xchar *env_lookup __ARGS( ( env_h, char *var ) ) ;
- X
- X#define env_getvars( env ) (env)->vars
- X
- Xextern int env_errno ;
- X
- X#endif /* __ENV_H */
- X
- END_OF_FILE
- if test 1147 -ne `wc -c <'libs/src/misc/env.h'`; then
- echo shar: \"'libs/src/misc/env.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/env.h'
- fi
- if test -f 'libs/src/pq/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/pq/COPYRIGHT'\" \(1336 characters\)
- sed "s/^X//" >'libs/src/pq/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1993 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this copyright notice is also included in any
- Xredistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1336 -ne `wc -c <'libs/src/pq/COPYRIGHT'`; then
- echo shar: \"'libs/src/pq/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/COPYRIGHT'
- fi
- if test -f 'libs/src/pset/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pset/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/pset/COPYRIGHT'\" \(1342 characters\)
- sed "s/^X//" >'libs/src/pset/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this copyright notice is also included in any
- Xredistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1342 -ne `wc -c <'libs/src/pset/COPYRIGHT'`; then
- echo shar: \"'libs/src/pset/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pset/COPYRIGHT'
- fi
- if test -f 'libs/src/sio/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/sio/COPYRIGHT'\" \(1332 characters\)
- sed "s/^X//" >'libs/src/sio/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that a) the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution, and b) this file is also included in any redistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e. <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1332 -ne `wc -c <'libs/src/sio/COPYRIGHT'`; then
- echo shar: \"'libs/src/sio/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/COPYRIGHT'
- fi
- if test -f 'libs/src/sio/suite/fdtest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/fdtest.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/fdtest.c'\" \(1150 characters\)
- sed "s/^X//" >'libs/src/sio/suite/fdtest.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
- X
- X#include <sys/time.h>
- X#include <sys/resource.h>
- X
- X#include "sio.h"
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- Xint main( argc, argv )
- X int argc ;
- X char *argv[] ;
- X{
- X#ifdef RLIMIT_NOFILE
- X struct rlimit rl ;
- X int fd ;
- X int duped_fd ;
- X char *s ;
- X
- X if ( getrlimit( RLIMIT_NOFILE, &rl ) == -1 )
- X {
- X perror( "getrlimit" ) ;
- X exit( 1 ) ;
- X }
- X if ( rl.rlim_cur != getdtablesize() )
- X {
- X printf( "rl.rlim_cur != getdtablesize()\n" ) ;
- X exit( 1 ) ;
- X }
- X if ( rl.rlim_cur == rl.rlim_max )
- X exit( 0 ) ;
- X
- X rl.rlim_cur++ ;
- X if ( setrlimit( RLIMIT_NOFILE, &rl ) == -1 )
- X {
- X perror( "setrlimit" ) ;
- X exit( 1 ) ;
- X }
- X if ( Smorefds() == SIO_ERR )
- X {
- X perror( "Smorefds" ) ;
- X exit( 1 ) ;
- X }
- X fd = open( "/etc/passwd", 0 ) ;
- X if ( fd == -1 )
- X {
- X perror( "open" ) ;
- X exit( 1 ) ;
- X }
- X duped_fd = getdtablesize()-1 ;
- X if ( dup2( fd, duped_fd ) == -1 )
- X {
- X perror( "dup2" ) ;
- X exit( 1 ) ;
- X }
- X s = Srdline( duped_fd ) ;
- X if ( s == NULL )
- X {
- X perror( "Srdline" ) ;
- X exit( 1 ) ;
- X }
- X#endif
- X exit( 0 ) ;
- X}
- END_OF_FILE
- if test 1150 -ne `wc -c <'libs/src/sio/suite/fdtest.c'`; then
- echo shar: \"'libs/src/sio/suite/fdtest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/fdtest.c'
- fi
- if test -f 'libs/src/sio/suite/sprint_test' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/sprint_test'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/sprint_test'\" \(1146 characters\)
- sed "s/^X//" >'libs/src/sio/suite/sprint_test' <<'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: sprint_test,v 8.1 1993/03/13 01:21:48 panos Exp $
- X#
- X
- Xcompare()
- X{
- X cmp -s PRINTF.DATA SPRINT.DATA
- X if [ $? -ne 0 ]
- X then
- X echo TEST $1 FAILED
- X echo Check files PRINTF.DATA and SPRINT.DATA for differences
- X exit 1
- X else
- X echo TEST $1 PASSED
- X rm -f PRINTF.DATA SPRINT.DATA
- X fi
- X}
- X
- Xformat_test()
- X{
- X Sprint $@ 1>PRINTF.DATA 2>SPRINT.DATA
- X compare "$*"
- X}
- X
- Xformat_test ALL
- X
- Xformat_test -W10 -F0 -c
- Xformat_test -W10 -F- -c
- X
- Xecho
- Xecho PRECISION TEST
- Xi=13
- Xwhile test $i -ne 0
- Xdo
- X format_test -P$i -F# -X
- X i=`expr $i - 1`
- Xdone
- Xecho END OF PRECISION TEST
- Xecho
- X
- Xformat_test -Vi -4 4 1 -o "-F#"
- X
- Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+ -f
- Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+ -e
- Xformat_test -Vf -1.0 2.0 0.3 -W30 -P13 -F+ -g
- X
- Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+- -f
- Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+- -e
- Xformat_test -Vf -1.0 2.0 0.3 -W30 -P13 -F+- -g
- X
- Xformat_test -W10 "-F " -x
- X
- Xformat_test -W40 -u -Vi 8 100 3 -F0
- X
- Xformat_test -b
- Xformat_test -b -P10
- END_OF_FILE
- if test 1146 -ne `wc -c <'libs/src/sio/suite/sprint_test'`; then
- echo shar: \"'libs/src/sio/suite/sprint_test'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/sprint_test'
- fi
- if test -f 'libs/src/str/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/str/COPYRIGHT'\" \(1329 characters\)
- sed "s/^X//" >'libs/src/str/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this file is also included in any redistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1329 -ne `wc -c <'libs/src/str/COPYRIGHT'`; then
- echo shar: \"'libs/src/str/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/COPYRIGHT'
- fi
- if test -f 'libs/src/str/ss_bf.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_bf.c'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_bf.c'\" \(1305 characters\)
- sed "s/^X//" >'libs/src/str/ss_bf.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" ;
- X
- X#include "ss_impl.h"
- X
- XPRIVATE int bf_setup() ;
- XPRIVATE char *bf_match() ;
- XPRIVATE void bf_done() ;
- X
- Xstruct ss_ops __strs_bfops = { bf_setup, bf_match, bf_done } ;
- X
- X
- XPRIVATE int bf_setup( hp )
- X header_s *hp ;
- X{
- X#ifdef lint
- X hp = hp ;
- X#endif
- X return( SS_OK ) ;
- X}
- X
- X
- XPRIVATE char *bf_match( hp, str, len )
- X header_s *hp ;
- X char *str ;
- X int len ;
- X{
- X register int pfc = SS_PATTERN( hp )[ 0 ] ; /* pattern first char */
- X register char *pos = str ;
- X register char *endpos = &str[ len - SS_PATLEN( hp ) + 1 ] ;
- X char *endpat = &SS_PATTERN( hp )[ SS_PATLEN( hp ) ] ;
- X
- X while ( pos < endpos )
- X {
- X register int strc = SS_MAP( hp, *pos ) ;
- X register char *pp ; /* pattern pointer */
- X register char *sp ; /* string pointer */
- X
- X pos++ ;
- X if ( strc != pfc )
- X continue ;
- X
- X for ( pp = &SS_PATTERN( hp )[ 1 ], sp = pos ;; sp++, pp++ )
- X {
- X if ( pp == endpat ) /* we are guaranteed a non-empty pattern */
- X return( pos-1 ) ;
- X if ( *pp != SS_MAP( hp, *sp ) )
- X break ;
- X }
- X }
- X return( CHAR_NULL ) ;
- X}
- X
- X
- XPRIVATE void bf_done( hp )
- X header_s *hp ;
- X{
- X#ifdef lint
- X hp = hp ;
- X#endif
- X}
- X
- END_OF_FILE
- if test 1305 -ne `wc -c <'libs/src/str/ss_bf.c'`; then
- echo shar: \"'libs/src/str/ss_bf.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_bf.c'
- fi
- if test -f 'libs/src/str/strutil.3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/strutil.3'\"
- else
- echo shar: Extracting \"'libs/src/str/strutil.3'\" \(1367 characters\)
- sed "s/^X//" >'libs/src/str/strutil.3' <<'END_OF_FILE'
- 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.\" $Id: strutil.3,v 3.1 1993/06/13 02:49:23 panos Exp $
- X.TH STRUTIL 3X "30 September 1992"
- X.SH NAME
- Xstr_find, str_casefind, str_fill, str_lower, str_upper -- string utility functions
- X.SH SYNOPSIS
- X.LP
- X.nf
- X.ft B
- X#include "str.h"
- X.LP
- X.ft B
- Xchar *str_find( s1, s2 )
- Xchar *s1, *s2 ;
- X.LP
- X.ft B
- Xchar *str_casefind( s1, s2 )
- Xchar *s1, *s2 ;
- X.LP
- X.ft B
- Xvoid str_fill( s, c )
- Xchar *s ;
- Xchar c ;
- X.LP
- X.ft B
- Xchar *str_lower( s )
- Xchar *s ;
- X.LP
- X.ft B
- Xchar *str_upper( s )
- Xchar *s ;
- X.SH DESCRIPTION
- X.B str_find()
- Xreturns a pointer to the first instance of string \fIs2\fR in string \fIs1\fR.
- XIf \fIs2\fR is the empty string a pointer to \fIs1\fR is returned.
- X.LP
- X.B str_casefind()
- Xperforms the same function as
- X.B str_find()
- Xexcept that it performs case insensitive character comparisons.
- X.LP
- X.B str_fill()
- Xfills the string \fIs\fR with the character \fIc\fR.
- X.LP
- X.B str_lower()
- Xand
- X.B str_upper()
- Xconvert their argument in place to a lower or upper case string respectively.
- X.SH "RETURN VALUES"
- X.LP
- X\fBstr_find()\fR
- Xand
- X.B str_casefind()
- Xreturn a pointer to the first occurrence of \fIs2\fR
- Xin \fIs1\fR or
- X.SM NULL
- Xif \fIs2\fR does not exist in \fIs1\fR.
- X.LP
- X\fBstr_lower()\fR and \fBstr_upper()\fR return \fIs\fR.
- END_OF_FILE
- if test 1367 -ne `wc -c <'libs/src/str/strutil.3'`; then
- echo shar: \"'libs/src/str/strutil.3'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/strutil.3'
- fi
- if test -f 'libs/src/timer/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/timer/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/timer/COPYRIGHT'\" \(1336 characters\)
- sed "s/^X//" >'libs/src/timer/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1993 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this copyright notice is also included in any
- Xredistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1336 -ne `wc -c <'libs/src/timer/COPYRIGHT'`; then
- echo shar: \"'libs/src/timer/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/timer/COPYRIGHT'
- fi
- if test -f 'libs/src/timer/defs.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/timer/defs.h'\"
- else
- echo shar: Extracting \"'libs/src/timer/defs.h'\" \(1264 characters\)
- sed "s/^X//" >'libs/src/timer/defs.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/*
- X * $Id: defs.h,v 3.1 1992/11/23 16:22:01 panos Exp $
- X */
- X
- X#define PRIVATE static
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X#ifndef FALSE
- X#define FALSE 0
- X#define TRUE 1
- X#endif
- X
- X#define TIMER_NULL ((timer_s *)0)
- X#define SIGVEC_NULL ((struct sigvec *)0)
- X#define SIGACTION_NULL ((struct sigaction *)0)
- X
- X#define HANDLE_ERROR( flags, retval, errp, errval, msg ) \
- X if ( flags & TIMER_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
- END_OF_FILE
- if test 1264 -ne `wc -c <'libs/src/timer/defs.h'`; then
- echo shar: \"'libs/src/timer/defs.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/timer/defs.h'
- fi
- if test -f 'libs/src/xlog/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/COPYRIGHT'\"
- else
- echo shar: Extracting \"'libs/src/xlog/COPYRIGHT'\" \(1342 characters\)
- sed "s/^X//" >'libs/src/xlog/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this copyright notice is also included in any
- Xredistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1342 -ne `wc -c <'libs/src/xlog/COPYRIGHT'`; then
- echo shar: \"'libs/src/xlog/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/COPYRIGHT'
- fi
- if test -f 'libs/src/xlog/filelog.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/filelog.h'\"
- else
- echo shar: Extracting \"'libs/src/xlog/filelog.h'\" \(1273 characters\)
- sed "s/^X//" >'libs/src/xlog/filelog.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: filelog.h,v 2.1 1993/05/06 07:39:39 panos Exp $
- X */
- X
- X/*
- X * The file can be either open or closed.
- X * When the file is closed, the state is always FL_CLOSED.
- X * When the file is open, the state is:
- X * FL_OPEN: if everything is ok
- X * FL_SIZE: if the hard limit was exceeded
- X * FL_ERROR: if an error occured
- X */
- Xtypedef enum { FL_CLOSED = 0, FL_OPEN, FL_SIZE, FL_ERROR } filelog_state_e ;
- X
- Xstruct filelog
- X{
- X int fl_fd ;
- X filelog_state_e fl_state ;
- X bool_int fl_close_on_exec ;
- X int fl_error ; /* error code when in FL_ERROR */
- X bool_int fl_size_control ; /* enabled or not */
- X bool_int fl_issued_warning ; /* when the soft limit was exceeded */
- X unsigned fl_size ; /* current size */
- X unsigned fl_soft_limit ;
- X unsigned fl_hard_limit ;
- X} ;
- X
- X#define FILELOG_ENABLE_SIZE_CONTROL( flp ) (flp)->fl_size_control = TRUE
- X#define FILELOG_DISABLE_SIZE_CONTROL( flp ) (flp)->fl_size_control = FALSE
- X#define FILELOG_SIZE_CONTROL( flp ) ( (flp)->fl_size_control )
- X
- X#define FILELOG( xp ) ((struct filelog *)xp->xl_data)
- X
- END_OF_FILE
- if test 1273 -ne `wc -c <'libs/src/xlog/filelog.h'`; then
- echo shar: \"'libs/src/xlog/filelog.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/filelog.h'
- fi
- if test -f 'libs/src/xlog/util.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/util.c'\"
- else
- echo shar: Extracting \"'libs/src/xlog/util.c'\" \(1198 characters\)
- sed "s/^X//" >'libs/src/xlog/util.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: util.c,v 2.1 1993/05/06 07:40:12 panos Exp $" ;
- X
- Xextern int sys_nerr;
- Xextern char *sys_errlist[];
- Xextern int errno;
- X
- Xchar *malloc() ;
- X
- X#define NUL '\0'
- X#define NULL 0
- X
- X
- X/*
- X * Search the given buffer for an occurrence of "%m"
- X */
- Xchar *__xlog_add_errno( buf, len )
- X char *buf ;
- X int len ;
- X{
- X register char *s ;
- X
- X for ( s = buf ; s < &buf[ len-1 ] ; s++ )
- X if ( *s == '%' && *(s+1) == 'm' )
- X return( s ) ;
- X return( NULL ) ;
- X}
- X
- X
- X
- Xchar *__xlog_explain_errno( buf, size )
- X char *buf ;
- X unsigned *size ;
- X{
- X register int len ;
- X char *strncpy() ;
- X
- X if ( errno < sys_nerr )
- X {
- X
- X (void) strncpy( buf, sys_errlist[ errno ], (int)*size ) ;
- X for ( len = 0 ; len < *size ; len++ )
- X if ( buf[ len ] == NUL )
- X break ;
- X *size = len ;
- X }
- X else
- X len = strx_nprint( buf, *size, "errno = %d", errno ) ;
- X return( buf ) ;
- X}
- X
- X
- Xchar *__xlog_new_string( s )
- X char *s ;
- X{
- X unsigned size = strlen( s ) + 1 ;
- X char *p = malloc( size ) ;
- X char *strcpy() ;
- X
- X return( ( p != NULL ) ? strcpy( p, s ) : p ) ;
- X}
- X
- X
- END_OF_FILE
- if test 1198 -ne `wc -c <'libs/src/xlog/util.c'`; then
- echo shar: \"'libs/src/xlog/util.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/util.c'
- fi
- if test -f 'xinetd/COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/COPYRIGHT'\"
- else
- echo shar: Extracting \"'xinetd/COPYRIGHT'\" \(1336 characters\)
- sed "s/^X//" >'xinetd/COPYRIGHT' <<'END_OF_FILE'
- XThis software is
- X
- X(c) Copyright 1992 by Panagiotis Tsirigotis
- X
- XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
- Xand distribute this software and its documentation for any purpose
- Xand without fee, provided that the above copyright notice extant in
- Xfiles in this distribution is not removed from files included in any
- Xredistribution and that this copyright notice is also included in any
- Xredistribution.
- X
- XModifications to this software may be distributed, either by distributing
- Xthe modified software or by distributing patches to the original software,
- Xunder the following additional terms:
- X
- X1. The version number will be modified as follows:
- X a. The first 3 components of the version number
- X (i.e <number>.<number>.<number>) will remain unchanged.
- X b. A new component will be appended to the version number to indicate
- X the modification level. The form of this component is up to the
- X author of the modifications.
- X
- X2. The author of the modifications will include his/her name by appending it
- X along with the new version number to this file and will be responsible for
- X any wrong behavior of the modified software.
- X
- XThe author makes no representations about the suitability of this
- Xsoftware for any purpose. It is provided "as is" without any express
- Xor implied warranty.
- X
- END_OF_FILE
- if test 1336 -ne `wc -c <'xinetd/COPYRIGHT'`; then
- echo shar: \"'xinetd/COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'xinetd/COPYRIGHT'
- fi
- if test -f 'xinetd/access.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/access.h'\"
- else
- echo shar: Extracting \"'xinetd/access.h'\" \(1264 characters\)
- sed "s/^X//" >'xinetd/access.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 ACCESS_H
- X#define ACCESS_H
- X
- X/*
- X * $Id: access.h,v 6.3 1993/06/13 01:41:38 panos Exp $
- X */
- X
- X#include "defs.h"
- X
- X/*
- X * These flags are used to form a mask for access_control.
- X * The mask determines which checks will be performed.
- X */
- X#define CF_ADDRESS 1
- X#define CF_TIME 2
- X#define CF_SERVICE_LIMIT 3
- X#define CF_PROCESS_LIMIT 4
- X
- Xtypedef enum
- X {
- X AC_OK, /* ok to start a server */
- X AC_FORK, /* tried to start a server but fork failed */
- X AC_ADDRESS, /* we do not accept requests from that address */
- X AC_TIME, /* we do not accept requests at this time */
- X AC_SERVICE_LIMIT, /* server limit would be exceeded for this */
- X /* service */
- X AC_PROCESS_LIMIT /* total process limit would be exceeded */
- X } access_e ;
- X
- Xextern struct name_value access_code_names[] ;
- X
- X#define access_explain( code ) nv_get_name( access_code_names, (int) (code) )
- X
- Xaccess_e access_control() ;
- X
- X#endif /* ACCESS_H */
- END_OF_FILE
- if test 1264 -ne `wc -c <'xinetd/access.h'`; then
- echo shar: \"'xinetd/access.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/access.h'
- fi
- if test -f 'xinetd/log.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/log.h'\"
- else
- echo shar: Extracting \"'xinetd/log.h'\" \(1164 characters\)
- sed "s/^X//" >'xinetd/log.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 LOG_H
- X#define LOG_H
- X
- X/*
- X * $Id: log.h,v 6.2 1993/05/19 00:41:55 panos Exp $
- X */
- X
- X/*
- X * Meaning of logtype flags:
- X *
- X * L_NONE: no logging
- X * L_FILE: log output goes to a file
- X * L_SYSLOG: log output goes to syslog(3)
- X * L_COMMON_FILE: log output goes to the file specified in defaults
- X */
- Xtypedef enum { L_NONE = 0, L_FILE, L_SYSLOG, L_COMMON_FILE } logtype_e ;
- X
- Xstruct filelog
- X{
- X char *fl_filename ; /* always malloc'ed */
- X unsigned fl_soft_limit ;
- X unsigned fl_hard_limit ;
- X} ;
- X
- X#define FILELOG_SIZE_CONTROL( flp ) ( flp->fl_soft_limit != 0 )
- X
- X
- Xstruct syslog
- X{
- X int sl_facility ;
- X int sl_level ;
- X} ;
- X
- Xstruct log
- X{
- X logtype_e l_type ;
- X struct filelog l_fl ;
- X struct syslog l_sl ;
- X} ;
- X
- X#define log_get_type( lp ) (lp)->l_type
- X#define log_set_type( lp, type ) (lp)->l_type = (type)
- X
- X#define log_filelog( lp ) (&(lp)->l_fl)
- X#define log_syslog( lp ) (&(lp)->l_sl)
- X
- Xstatus_e log_start() ;
- Xvoid log_end() ;
- X
- X#endif /* LOG_H */
- X
- END_OF_FILE
- if test 1164 -ne `wc -c <'xinetd/log.h'`; then
- echo shar: \"'xinetd/log.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/log.h'
- fi
- if test -f 'xinetd/options.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xinetd/options.h'\"
- else
- echo shar: Extracting \"'xinetd/options.h'\" \(1263 characters\)
- sed "s/^X//" >'xinetd/options.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
- Xextern int d_option ;
- Xextern int f_option ;
- Xextern char * f_option_arg_1 ;
- Xextern int filelog_option ;
- Xextern char * filelog_option_arg_1 ;
- Xextern int syslog_option ;
- Xextern char * syslog_option_arg_1 ;
- Xextern int reuse_option ;
- Xextern int limit_option ;
- Xextern unsigned limit_option_arg_1 ;
- Xextern int loop_option ;
- Xextern unsigned loop_option_arg_1 ;
- Xextern int pid_option ;
- Xextern int logprocs_option ;
- Xextern unsigned logprocs_option_arg_1 ;
- Xextern int shutdownprocs_option ;
- Xextern unsigned shutdownprocs_option_arg_1 ;
- Xextern int cc_option ;
- Xextern unsigned cc_option_arg_1 ;
- X
- X#define f_option_arg f_option_arg_1
- X#define filelog_option_arg filelog_option_arg_1
- X#define syslog_option_arg syslog_option_arg_1
- X#define limit_option_arg limit_option_arg_1
- X#define loop_option_arg loop_option_arg_1
- X#define logprocs_option_arg logprocs_option_arg_1
- X#define shutdownprocs_option_arg shutdownprocs_option_arg_1
- X#define cc_option_arg cc_option_arg_1
- X
- Xextern char *program_name ;
- X
- Xvoid usage() ;
- X
- END_OF_FILE
- if test 1263 -ne `wc -c <'xinetd/options.h'`; then
- echo shar: \"'xinetd/options.h'\" unpacked with wrong size!
- fi
- # end of 'xinetd/options.h'
- fi
- echo shar: End of archive 2 \(of 31\).
- cp /dev/null ark2isdone
- 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
-