home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / xinetd21 / part06 < prev    next >
Encoding:
Text File  |  1993-06-26  |  32.3 KB  |  1,286 lines

  1. Newsgroups: comp.sources.unix
  2. From: panos@cs.colorado.edu (Panos Tsirigotis)
  3. Subject: v26i250: xinetd-2.1.1 - inetd replacement with access control and logging, Part06/31
  4. Sender: unix-sources-moderator@gw.home.vix.com
  5. Approved: vixie@gw.home.vix.com
  6.  
  7. Submitted-By: panos@cs.colorado.edu (Panos Tsirigotis)
  8. Posting-Number: Volume 26, Issue 250
  9. Archive-Name: xinetd-2.1.1/part06
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line, then unpack
  13. # it by saving it into a file and typing "sh file".  To overwrite existing
  14. # files, type "sh file -c".  You can also feed this as standard input via
  15. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  16. # will see the following message at the end:
  17. #        "End of archive 6 (of 31)."
  18. # Contents:  INSTALL libs/src/misc/misc.c libs/src/pq/Makefile
  19. #   libs/src/pq/pq.3 libs/src/pset/Makefile xinetd/access.c
  20. #   xinetd/time.c xinetd/xinetd.log.man
  21. # Wrapped by panos@mystique on Mon Jun 21 14:51:21 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'INSTALL' -a "${1}" != "-c" ; then 
  24.   echo shar: Will not clobber existing file \"'INSTALL'\"
  25. else
  26. echo shar: Extracting \"'INSTALL'\" \(3290 characters\)
  27. sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
  28. X
  29. X1. Distribution
  30. X
  31. Xxinetd is distributed in shar archive kit form.  After all the archives
  32. Xare unpacked, you should end up with the following directory structure:
  33. X
  34. X    INSTALL
  35. X    README
  36. X    compile-src
  37. X    ./xinetd
  38. X    ./libs
  39. X    ./libs/include
  40. X    ./libs/man
  41. X    ./libs/lib
  42. X    ./libs/src/{sio,pset,misc,xlog,timer,pq}
  43. X
  44. X
  45. X----------------------------------------------------------------------
  46. X
  47. X2. Installing xinetd
  48. X
  49. XThe compile-src script will compile the libraries and xinetd.
  50. X"compile-src -help" will list all available options.
  51. XIt knows about some operating systems. When you invoke it, it will ask
  52. Xyou if your OS is among those it knows about. If so, all you need to do
  53. Xis type the OS name.  If you have a different OS, compile-src will try
  54. Xto configure xinetd appropriately.
  55. X
  56. XThe script will also ask you questions when it can't figure out
  57. Xsomething.  For every question that it asks, there is a command line
  58. Xoption, so in case you need to run the script more than once, you can
  59. Xuse the command line option to avoid having to answer the question
  60. Xmultiple times.
  61. X
  62. XIt is recommended that every time you make changes to xinetd or to the
  63. Xlibraries it uses, you cd to the top level directory (the one
  64. Xcontaining the directories "libs" and "xinetd") and run the script
  65. Xcompile-src. This script invokes "make" with arguments that override
  66. Xvariables defined in the Makefiles.
  67. X
  68. XWhen the compilation is over, the xinetd executable will be in the
  69. X"xinetd" directory. If you want to install it in one of the system
  70. Xdirectories, cd to the "xinetd" directory and type:
  71. X
  72. X    make install BINDIR=<install program here> MANDIR=<install man page here>
  73. X
  74. XFor example:
  75. X
  76. X    make install BINDIR=/usr/local/bin MANDIR=/usr/local/man/man1
  77. X
  78. XThe reason for putting the program in a directory like /usr/local/bin
  79. Xis that this is not a program that is only useful to superusers.
  80. X
  81. X
  82. X----------------------------------------------------------------------
  83. X
  84. X3. Customizing xinetd
  85. X
  86. XMost of the behavior of xinetd is determined by constants defined
  87. Xin the xinetd/config.h header file. Those constants are conditionally
  88. Xdefined and can be overriden by creating the file xinetd/customconf.h
  89. Xand invoking the compile-src script with the -custom option.
  90. X
  91. X
  92. X----------------------------------------------------------------------
  93. X
  94. X4. Epilogue
  95. X
  96. XHere are a few things worth mentioning:
  97. X
  98. X1. You can use the program "itox" in the "xinetd" directory to convert
  99. X    inetd.conf to a xinetd configuration file. The program works as a
  100. X    filter, i.e. 
  101. X            itox [-daemon_dir dir_name] < inetd.conf > xinetd.conf
  102. X    The -daemon_dir option is useful in case you are already using tcpd for 
  103. X    access control. It specifies the directory name where tcpd expects
  104. X    to find the daemon programs.
  105. X    The itox program will also be compiled by the compile-src script.
  106. X    
  107. X2. A sample xinetd configuration file is included: xinetd/sample.conf 
  108. X
  109. X3. I have been using xinetd on a Sun SparcStation running SunOS 4.1 and 
  110. X    I have compiled it (but not used it) on a DECstation running Ultrix 4.2.
  111. X
  112. X4. You may find the libraries useful in their own right. They all come
  113. X    with man pages that explain what the library functions do.
  114. X
  115. X5. You can send comments/bug-reports to panos@cs.colorado.edu
  116. X    The file BUG-REPORTS in the "xinetd" directory contains instructions 
  117. X    on what to include in a bug report.
  118. X
  119. END_OF_FILE
  120. if test 3290 -ne `wc -c <'INSTALL'`; then
  121.     echo shar: \"'INSTALL'\" unpacked with wrong size!
  122. fi
  123. # end of 'INSTALL'
  124. fi
  125. if test -f 'libs/src/misc/misc.c' -a "${1}" != "-c" ; then 
  126.   echo shar: Will not clobber existing file \"'libs/src/misc/misc.c'\"
  127. else
  128. echo shar: Extracting \"'libs/src/misc/misc.c'\" \(3395 characters\)
  129. sed "s/^X//" >'libs/src/misc/misc.c' <<'END_OF_FILE'
  130. X/*
  131. X * (c) Copyright 1992 by Panagiotis Tsirigotis
  132. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  133. X * and conditions for redistribution.
  134. X */
  135. X
  136. Xstatic char RCSid[] = "$Id: misc.c,v 2.1 1992/10/01 00:38:29 panos Exp $" ;
  137. Xstatic char misc_version[] = VERSION ;
  138. X
  139. X#include <varargs.h>
  140. X
  141. X/*
  142. X * MISCELLANEOUS FUNCTIONS
  143. X */
  144. X
  145. X#include "misc.h"
  146. X
  147. X#ifndef NULL
  148. X#define NULL        0
  149. X#endif
  150. X
  151. Xchar *strncpy() ;
  152. Xchar *strrchr() ;
  153. X
  154. X
  155. X/*
  156. X * Create a new argv array,
  157. X * copy the original to the new one,
  158. X * and clear the old one
  159. X */
  160. Xchar **argv_copy_and_clear( org_argv, start, count )
  161. X    char **org_argv ;                            /* original argv */
  162. X    int start ;                                    /* from where to start copy/clear */
  163. X    int count ;                                    /* how many entries to copy/clear */
  164. X{
  165. X    char **new_argv ;
  166. X    char *p ;
  167. X    int i ;
  168. X    int j ;
  169. X    char *malloc() ;
  170. X
  171. X    new_argv = (char **) malloc( count * sizeof( char * ) ) ;
  172. X    if ( new_argv == NULL )
  173. X        return( NULL ) ;
  174. X
  175. X    for ( i = 0 ; i < count ; i++ )
  176. X    {
  177. X        new_argv[ i ] = make_string( 1, org_argv[ start+i ] ) ;
  178. X        if ( new_argv[ i ] == NULL )
  179. X        {
  180. X            for ( j = i-1 ; j >= 0 ; j-- )
  181. X                free( new_argv[ j ] ) ;
  182. X            free( (char *) new_argv ) ;
  183. X            return( NULL ) ;
  184. X        }
  185. X        for ( p = org_argv[ start+i ] ; *p ; p++ )
  186. X            *p = ' ' ;
  187. X    }
  188. X    return( new_argv ) ;
  189. X}
  190. X
  191. X
  192. X/*
  193. X * We always return a pointer in pathname
  194. X */
  195. Xchar *basename( pathname )
  196. X    char *pathname ;
  197. X{
  198. X    char *s = strrchr( pathname, '/' ) ;
  199. X
  200. X    if ( s == NULL )
  201. X        return( pathname ) ;
  202. X    else
  203. X        return( s+1 ) ;
  204. X}
  205. X
  206. X
  207. X/*
  208. X * We always return a malloced string
  209. X *
  210. X * There are 2 special cases:
  211. X *
  212. X *        1) pathname == "/"
  213. X *                In this case we return "/"
  214. X *        2) pathname does not contain a '/'
  215. X *                In this case we return "."
  216. X */
  217. Xchar *dirname( pathname )
  218. X    char *pathname ;
  219. X{
  220. X    int len ;
  221. X    char *s = strrchr( pathname, '/' ) ;
  222. X    char *p ;
  223. X    char *malloc() ;
  224. X
  225. X    if ( s == NULL )
  226. X        return( make_string( 1, "." ) ) ;
  227. X    else
  228. X    {
  229. X        len = s - pathname ;
  230. X        if ( len == 0 )
  231. X            return( make_string( 1, "/" ) ) ;
  232. X    }
  233. X
  234. X    p = malloc( len+1 ) ;
  235. X    if ( p == NULL )
  236. X        return( NULL ) ;
  237. X    else
  238. X    {
  239. X        strncpy( p, pathname, len )[ len ] = '\0' ;
  240. X        return( p ) ;
  241. X    }
  242. X}
  243. X
  244. X
  245. Xchar *make_string( count, va_alist )
  246. X    register unsigned count ;
  247. X    va_dcl
  248. X{
  249. X    va_list ap ;
  250. X    register unsigned i ;
  251. X    register unsigned len = 0 ;
  252. X    register char *s, *p ;
  253. X    char *new_string ;
  254. X
  255. X    if ( count == 0 )
  256. X        return( NULL ) ;
  257. X
  258. X    va_start( ap ) ;
  259. X    for ( i = 0 ; i < count ; i++ )
  260. X    {
  261. X        s = va_arg( ap, char * ) ;
  262. X        if ( s == NULL )
  263. X            continue ;
  264. X        len += strlen( s ) ;
  265. X    }
  266. X    va_end( ap ) ;
  267. X
  268. X    new_string = malloc( len + 1 ) ;
  269. X    if ( new_string == NULL )
  270. X        return( NULL ) ;
  271. X
  272. X    p = new_string ;
  273. X    va_start( ap ) ;
  274. X    for ( i = 0 ; i < count ; i++ )
  275. X    {
  276. X        s = va_arg( ap, char * ) ;
  277. X        if ( s == NULL )
  278. X            continue ;
  279. X        while ( *p++ = *s++ ) ;
  280. X        p-- ;
  281. X    }
  282. X    va_end( ap ) ;
  283. X    return( new_string ) ;
  284. X}
  285. X
  286. X
  287. Xchar *make_pathname( count, va_alist )
  288. X    register unsigned count ;
  289. X    va_dcl
  290. X{
  291. X    va_list ap ;
  292. X    register unsigned i ;
  293. X    register unsigned len = 0 ;
  294. X    register char *s, *p ;
  295. X    char *pathname ;
  296. X
  297. X    if ( count == 0 )
  298. X        return( NULL ) ;
  299. X
  300. X    va_start( ap ) ;
  301. X    for ( i = 0 ; i < count ; i++ )
  302. X    {
  303. X        s = va_arg( ap, char * ) ;
  304. X        len += strlen( s ) ;
  305. X    }
  306. X    va_end( ap ) ;
  307. X
  308. X    pathname = malloc( len + count ) ;
  309. X    if ( pathname == NULL )
  310. X        return( NULL ) ;
  311. X    
  312. X    p = pathname ;
  313. X    va_start( ap ) ;
  314. X    for ( i = 0 ; i < count ; i++ )
  315. X    {
  316. X        s = va_arg( ap, char * ) ;
  317. X        while ( *p++ = *s++ ) ;
  318. X        *(p-1) = '/' ;            /* change '\0' to '/' */
  319. X    }
  320. X    *(p-1) = '\0' ;
  321. X    return( pathname ) ;
  322. X}
  323. X
  324. END_OF_FILE
  325. if test 3395 -ne `wc -c <'libs/src/misc/misc.c'`; then
  326.     echo shar: \"'libs/src/misc/misc.c'\" unpacked with wrong size!
  327. fi
  328. # end of 'libs/src/misc/misc.c'
  329. fi
  330. if test -f 'libs/src/pq/Makefile' -a "${1}" != "-c" ; then 
  331.   echo shar: Will not clobber existing file \"'libs/src/pq/Makefile'\"
  332. else
  333. echo shar: Extracting \"'libs/src/pq/Makefile'\" \(3498 characters\)
  334. sed "s/^X//" >'libs/src/pq/Makefile' <<'END_OF_FILE'
  335. X# (c) Copyright 1993 by Panagiotis Tsirigotis
  336. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  337. X# and conditions for redistribution.
  338. X
  339. X#
  340. X# $Id: Makefile,v 2.2 1993/05/06 07:50:44 panos Exp $
  341. X#
  342. X# Based on Library makefile template: *Revision: 1.15 *
  343. X#
  344. X
  345. X# 
  346. X# Available entries:
  347. X#         lib             --> creates the library
  348. X#        install        --> installs the library (archive, man page(s), header(s))
  349. X#        uninstall    --> uninstall the library
  350. X#        clean            --> removes all .o and .a files
  351. X#        spotless        --> clean + uninstall
  352. X#         lint            --> lints a file (usage: make lint MODULE=foo.c)
  353. X#        tags            --> creates a tags file (from the SOURCES and HEADERS)
  354. X#        checkout     --> checkout all files
  355. X#        dist            --> distribution support
  356. X#
  357. X
  358. XNAME                = pq
  359. XVERSION            = 1.0.2
  360. X
  361. XHEADERS            = hpq.h hpqimpl.h pq.h
  362. XSOURCES            = hpq.c pq.c
  363. XOBJECTS            = hpq.o pq.o
  364. X
  365. XMANFILES            = pq.3
  366. XINCLUDEFILES    = hpq.h pq.h
  367. X
  368. X# The following variables are used by the 'install' entry and
  369. X# should be customized:
  370. X#     LIBDIR:     where the library will be placed
  371. X#     INCUDEDIR:  where the include files will be placed
  372. X#     MANDIR:     where the man pages will be placed
  373. X#
  374. XLIBDIR            = $(HOME)/.links/libraries/$(ARCH)
  375. XMANDIR            = $(HOME)/.links/manpages/man3
  376. XINCLUDEDIR        = $(HOME)/.links/includes
  377. X
  378. XDEFS                =                # used for command line defined flags
  379. XDEBUG                = -g            # -g or -O
  380. XVERSION_DEF        = -DVERSION=\"HPQ\ Version\ $(VERSION)\"
  381. X
  382. XCPP_DEFS            = $(VERSION_DEF) $(DEFS)
  383. X
  384. X#
  385. X# The following variables shouldn't need to be changed
  386. X#
  387. XLINT_FLAGS        = -hbux
  388. XCPP_FLAGS        = $(CPP_DEFS)
  389. XCC_FLAGS            = $(DEBUG)
  390. XCFLAGS            = $(CPP_FLAGS) $(CC_FLAGS)
  391. X
  392. XINSTALL            = install -c
  393. XFMODE                = -m 640            # used by install
  394. XRANLIB            = ranlib
  395. X
  396. XPAGER                = less
  397. X
  398. X
  399. XLIBNAME            = lib$(NAME).a
  400. X
  401. Xlib: $(LIBNAME)
  402. X
  403. Xlibopt: clean
  404. X    make DEBUG=-O "DEFS=$(DEFS)" lib
  405. X    $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
  406. X
  407. X$(LIBNAME): $(OBJECTS)
  408. X    ar r $@ $?
  409. X    $(RANLIB) $@
  410. X
  411. Xlint:
  412. X    lint $(CPP_FLAGS) $(LINT_FLAGS) $(MODULE) 2>&1 | $(PAGER)
  413. X
  414. Xinstall: $(LIBNAME)
  415. X    @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
  416. X    then \
  417. X        $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
  418. X        echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
  419. X        for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
  420. X        echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
  421. X        for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
  422. X        echo Installed $(MANFILES) to $(MANDIR) ;\
  423. X    else \
  424. X        echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
  425. X    fi
  426. X
  427. Xuninstall:
  428. X    a=`pwd` ; cd $(INCLUDEDIR) ;\
  429. X    if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
  430. X    a=`pwd` ; cd $(LIBDIR) ;\
  431. X    if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
  432. X    a=`pwd` ; cd $(MANDIR) ;\
  433. X    if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
  434. X
  435. Xclean:
  436. X    rm -f $(OBJECTS) $(LIBNAME) core
  437. X
  438. Xspotless: clean uninstall
  439. X
  440. Xtags: $(SOURCES) $(HEADERS)
  441. X    ctags -w $(SOURCES) $(HEADERS)
  442. X
  443. Xcheckout:
  444. X    co $(SOURCES) $(HEADERS) $(MANFILES)
  445. X
  446. X#
  447. X# Distribution section
  448. X# This section contains the 2 targets for distribution support: dist, dirs
  449. X# "dist" checks out all files to be distributed
  450. X# "dirs" prints a list of directories to be included in the distribution.
  451. X# These directories should have a Makefile with a "dist" target
  452. X#
  453. XDISTRIBUTION_FILES    = $(HEADERS) $(SOURCES) $(MANFILES) COPYRIGHT
  454. XDIRS                        =
  455. X
  456. Xdist:
  457. X    -co -q $(DISTRIBUTION_FILES)
  458. X
  459. Xdirs:
  460. X    @echo $(DIRS)
  461. X
  462. X#
  463. X# PUT HERE THE RULES TO MAKE THE OBJECT FILES
  464. X#
  465. Xhpq.o: hpq.h hpqimpl.h pq.h
  466. X
  467. X#
  468. X# Simple test program
  469. X#
  470. Xpqtest: pqtest.c $(LIBNAME)
  471. X    cc $(DEBUG) -o $@ pqtest.c $(LIBNAME)
  472. X
  473. END_OF_FILE
  474. if test 3498 -ne `wc -c <'libs/src/pq/Makefile'`; then
  475.     echo shar: \"'libs/src/pq/Makefile'\" unpacked with wrong size!
  476. fi
  477. # end of 'libs/src/pq/Makefile'
  478. fi
  479. if test -f 'libs/src/pq/pq.3' -a "${1}" != "-c" ; then 
  480.   echo shar: Will not clobber existing file \"'libs/src/pq/pq.3'\"
  481. else
  482. echo shar: Extracting \"'libs/src/pq/pq.3'\" \(3310 characters\)
  483. sed "s/^X//" >'libs/src/pq/pq.3' <<'END_OF_FILE'
  484. X.\"(c) Copyright 1993 by Panagiotis Tsirigotis
  485. X.\"All rights reserved.  The file named COPYRIGHT specifies the terms 
  486. X.\"and conditions for redistribution.
  487. X.\"
  488. X.\" $Id: pq.3,v 1.4 1993/05/06 06:52:47 panos Exp $
  489. X.TH PQ 3PT "22 December 1991"
  490. X.SH NAME
  491. Xpq_create, pq_destroy, pq_head, pq_extract_head, pq_insert, pq_delete - functions that manage priority queues
  492. X.SH SYNOPSIS
  493. X.LP
  494. X.nf
  495. X.ft B
  496. X#include "pq.h"
  497. X.LP
  498. X.ft B
  499. Xpq_h pq_create( func, flags, errnop )
  500. Xint (*func)() ;
  501. Xint flags ;
  502. Xint *errnop ;
  503. X.LP
  504. X.ft B
  505. Xvoid pq_destroy( pq )
  506. Xpq_h pq ;
  507. X.LP
  508. X.ft B
  509. Xpq_obj pq_head( pq )
  510. Xpq_h pq ;
  511. X.LP
  512. X.ft B
  513. Xpq_obj pq_extract_head( pq )
  514. Xpq_h pq ;
  515. X.LP
  516. X.ft B
  517. Xint pq_insert( pq, object )
  518. Xpq_h pq ;
  519. Xpq_obj object ;
  520. X.LP
  521. X.ft B
  522. Xint pq_delete( pq, object )
  523. Xpq_h pq ;
  524. Xpq_obj object ;
  525. X.SH DESCRIPTION
  526. X.LP
  527. XThis library handles priority queues that contain objects. Objects are
  528. Xof type
  529. X.I pq_obj
  530. Xwhich is a pointer type.
  531. XThe object at the head of a priority queue is the 
  532. X.I best
  533. Xobject. The
  534. Xuser defines the ordering by providing a function that compares objects
  535. Xwhen the priority queue is created.
  536. X.LP
  537. X.B pq_create()
  538. Xcreates a priority queue and returns a handle to be used for operations
  539. Xon that queue. \fIfunc\fR is a pointer to a function that takes 2 objects
  540. Xas arguments and returns 1 if the first object is 
  541. X.I "better" 
  542. Xthan the
  543. Xsecond and 0 otherwise. The only possible value for the \fIflags\fR
  544. Xargument is \fBPQ_RETURN_ERROR\fR which if used will cause queue
  545. Xoperations applied on the specific priority queue to return an error
  546. Xstatus if they fail (the default is to terminate the program with
  547. Xan appropriate error message). The value \fBPQ_NOFLAGS\fR can be
  548. Xused to specify no flags.
  549. XThe \fIerrnop\fR argument is a pointer to an integer where an
  550. Xerror code will be stored if an operation fails
  551. X(and \fBPQ_RETURN_ERROR\fR is used). If no pointer is specified,
  552. Xerror codes are placed in the global variable \fIpq_error\fR.
  553. X.LP
  554. X.B pq_destroy()
  555. Xis used to destroy a priority queue.
  556. X.LP
  557. X.B pq_head()
  558. Xreturns the object at the head of the priority queue.
  559. X.LP
  560. X.B pq_extract_head()
  561. Xextracts and returns the object at the head of the priority queue.
  562. X.LP
  563. X.B pq_insert()
  564. Xinserts the given \fIobject\fR in the priority queue.
  565. X.LP
  566. X.B pq_delete()
  567. Xdeletes the given \fIobject\fR from the priority queue.
  568. X.SH "RETURN VALUES"
  569. X.LP
  570. XIn the following, values for \fIpq_errno\fR will be stored in the
  571. Xuser-specified variable if one was provided.
  572. X.LP
  573. X.B pq_create()
  574. Xreturns a priority queue handle if successful, or 
  575. X.SM NULL
  576. Xif it fails.
  577. XPossible \fIpq_errno\fR values:
  578. X.RS
  579. X.TP 20
  580. X.SB PQ_ENOFUNC
  581. XThe object comparison function is missing.
  582. X.TP
  583. X.SB PQ_ENOMEM
  584. XThe program ran out of memory.
  585. X.RE
  586. X.LP
  587. X.B pq_insert()
  588. Xreturns \fBPQ_OK\fR if successful and \fBPQ_ERR\fR if it fails.
  589. XPossible \fIpq_errno\fR values:
  590. X.RS
  591. X.TP 20
  592. X.SB PQ_ENULLOBJECT
  593. XThe object value is
  594. X.SM NULL.
  595. X.TP
  596. X.SB PQ_ENOMEM
  597. XThe program ran out of memory.
  598. X.RE
  599. X.LP
  600. X.B pq_head()
  601. Xreturns the object at the head of the queue or
  602. X.SM NULL
  603. Xif the queue is empty.
  604. X.LP
  605. X.B pq_extract_head()
  606. Xreturns the object at the head of the queue or
  607. X.SM NULL
  608. Xif the queue is empty.
  609. X.LP
  610. X.B pq_delete()
  611. Xreturns \fBPQ_OK\fR if successful and \fBPQ_ERR\fR if it fails.
  612. XPossible \fIpq_errno\fR values:
  613. X.RS
  614. X.TP 20
  615. X.SB PQ_ENULLOBJECT
  616. XThe object value is
  617. X.SM NULL.
  618. X.TP
  619. X.SB PQ_ENOTFOUND
  620. XThe object is not in the queue.
  621. X.RE
  622. END_OF_FILE
  623. if test 3310 -ne `wc -c <'libs/src/pq/pq.3'`; then
  624.     echo shar: \"'libs/src/pq/pq.3'\" unpacked with wrong size!
  625. fi
  626. # end of 'libs/src/pq/pq.3'
  627. fi
  628. if test -f 'libs/src/pset/Makefile' -a "${1}" != "-c" ; then 
  629.   echo shar: Will not clobber existing file \"'libs/src/pset/Makefile'\"
  630. else
  631. echo shar: Extracting \"'libs/src/pset/Makefile'\" \(3363 characters\)
  632. sed "s/^X//" >'libs/src/pset/Makefile' <<'END_OF_FILE'
  633. X# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  634. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  635. X# and conditions for redistribution.
  636. X
  637. X#
  638. X# $Id: Makefile,v 3.2 1993/03/13 23:22:29 panos Exp $
  639. X#
  640. X# Based on Library makefile template: *Revision: 1.15 *
  641. X#
  642. X
  643. X# 
  644. X# Available entries:
  645. X#         lib             --> creates the library
  646. X#        install        --> installs the library (archive, man page(s), header(s))
  647. X#        uninstall    --> uninstall the library
  648. X#        clean            --> removes all .o and .a files
  649. X#        spotless        --> clean + uninstall
  650. X#         lint            --> lints a file (usage: make lint MODULE=foo.c)
  651. X#        tags            --> creates a tags file (from the SOURCES and HEADERS)
  652. X#        checkout     --> checkout all files
  653. X#        dist            --> distribution support
  654. X#
  655. X
  656. XNAME                = pset
  657. XVERSION            = 1.2.0
  658. X
  659. XHEADERS            = pset.h
  660. XSOURCES            = pset.c ops.c
  661. XOBJECTS            = pset.o ops.o
  662. X
  663. XMANFILES            = pset.3 psi.3
  664. XINCLUDEFILES    = pset.h
  665. X
  666. X# The following variables are used by the 'install' entry and
  667. X# should be customized:
  668. X#     LIBDIR:     where the library will be placed
  669. X#     INCUDEDIR:  where the include files will be placed
  670. X#     MANDIR:     where the man pages will be placed
  671. X#
  672. XLIBDIR            = $(HOME)/.links/libraries/$(ARCH)
  673. XMANDIR            = $(HOME)/.links/manpages/man3
  674. XINCLUDEDIR        = $(HOME)/.links/includes
  675. X
  676. XDEFS                =                # used for command line defined flags
  677. XDEBUG                = -g                # -g or -O
  678. XVERSION_DEF        = -DVERSION=\"PSET\ Version\ $(VERSION)\"
  679. X
  680. XCPP_DEFS            = $(VERSION_DEF) $(DEFS)
  681. X
  682. X#
  683. X# The following variables shouldn't need to be changed
  684. X#
  685. XLINT_FLAGS        = -hbux
  686. XCPP_FLAGS        = $(CPP_DEFS)
  687. XCC_FLAGS            = $(DEBUG)
  688. XCFLAGS            = $(CPP_FLAGS) $(CC_FLAGS)
  689. X
  690. XINSTALL            = install -c
  691. XFMODE                = -m 640            # used by install
  692. XRANLIB            = ranlib
  693. X
  694. XPAGER                = less
  695. X
  696. X
  697. XLIBNAME            = lib$(NAME).a
  698. X
  699. Xlib: $(LIBNAME)
  700. X
  701. Xlibopt: clean
  702. X    make DEBUG=-O lib
  703. X    mv $(LIBNAME) $(LIBDIR)/optimized
  704. X
  705. X$(LIBNAME): $(OBJECTS)
  706. X    ar r $@ $?
  707. X    $(RANLIB) $@
  708. X
  709. Xlint:
  710. X    lint $(CPP_FLAGS) $(LINT_FLAGS) $(MODULE) 2>&1 | $(PAGER)
  711. X
  712. Xinstall: $(LIBNAME)
  713. X    @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
  714. X    then \
  715. X        $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
  716. X        echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
  717. X        for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
  718. X        echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
  719. X        for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
  720. X        echo Installed $(MANFILES) to $(MANDIR) ;\
  721. X    else \
  722. X        echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
  723. X    fi
  724. X
  725. Xuninstall:
  726. X    a=`pwd` ; cd $(INCLUDEDIR) ;\
  727. X    if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
  728. X    a=`pwd` ; cd $(LIBDIR) ;\
  729. X    if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
  730. X    a=`pwd` ; cd $(MANDIR) ;\
  731. X    if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
  732. X
  733. Xclean:
  734. X    rm -f $(OBJECTS) $(LIBNAME) core
  735. X
  736. Xspotless: clean uninstall
  737. X
  738. Xtags: $(SOURCES) $(HEADERS)
  739. X    ctags -w $(SOURCES) $(HEADERS)
  740. X
  741. Xcheckout:
  742. X    co $(SOURCES) $(HEADERS) $(MANFILES)
  743. X
  744. X#
  745. X# Distribution section
  746. X# This section contains the 2 targets for distribution support: dist, dirs
  747. X# "dist" checks out all files to be distributed
  748. X# "dirs" prints a list of directories to be included in the distribution.
  749. X# These directories should have a Makefile with a "dist" target
  750. X#
  751. XDISTRIBUTION_FILES    = $(SOURCES) $(HEADERS) $(MANFILES) COPYRIGHT
  752. XDIRS                        =
  753. X
  754. Xdist:
  755. X    -co -q $(DISTRIBUTION_FILES)
  756. X
  757. Xdirs:
  758. X    @echo $(DIRS)
  759. X
  760. X#
  761. X# PUT HERE THE RULES TO MAKE THE OBJECT FILES
  762. X#
  763. Xpset.o: pset.h
  764. X
  765. END_OF_FILE
  766. if test 3363 -ne `wc -c <'libs/src/pset/Makefile'`; then
  767.     echo shar: \"'libs/src/pset/Makefile'\" unpacked with wrong size!
  768. fi
  769. # end of 'libs/src/pset/Makefile'
  770. fi
  771. if test -f 'xinetd/access.c' -a "${1}" != "-c" ; then 
  772.   echo shar: Will not clobber existing file \"'xinetd/access.c'\"
  773. else
  774. echo shar: Extracting \"'xinetd/access.c'\" \(3524 characters\)
  775. sed "s/^X//" >'xinetd/access.c' <<'END_OF_FILE'
  776. X/*
  777. X * (c) Copyright 1992 by Panagiotis Tsirigotis
  778. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  779. X * and conditions for redistribution.
  780. X */
  781. X
  782. Xstatic char RCSid[] = "$Id: access.c,v 6.6 1993/06/15 23:25:57 panos Exp $" ;
  783. X
  784. X#include <syslog.h>
  785. X#include <time.h>
  786. X
  787. X#include "connection.h"
  788. X#include "service.h"
  789. X#include "state.h"
  790. X#include "addr.h"
  791. X#include "access.h"
  792. X
  793. Xchar *inet_ntoa() ;
  794. Xtime_t time() ;
  795. X
  796. Xvoid msg() ;
  797. X
  798. Xstruct name_value access_code_names[] =
  799. X    {
  800. X        { "address",                (int) AC_ADDRESS            },
  801. X        { "time",                    (int) AC_TIME                },
  802. X        { "fork",                    (int) AC_FORK                },
  803. X        { "service_limit",        (int) AC_SERVICE_LIMIT    },
  804. X        { "process_limit",        (int) AC_PROCESS_LIMIT    },
  805. X        { CHAR_NULL,                1                                },
  806. X        { "UNKNOWN",                0                                }
  807. X    } ;
  808. X
  809. X
  810. X/*
  811. X * Returns OK if the IP address in sinp is acceptable to the access control
  812. X * lists of the specified service.
  813. X */
  814. XPRIVATE status_e remote_address_check( sp, sinp )
  815. X    register struct service        *sp ;
  816. X    struct sockaddr_in            *sinp ;
  817. X{
  818. X    /*
  819. X     * of means only_from, na means no_access
  820. X     */
  821. X    unsigned long            of_match ;
  822. X    unsigned long            na_match ;
  823. X    register bool_int        of_matched ;
  824. X    register bool_int        na_matched ;
  825. X    struct in_addr            *addr ;
  826. X
  827. X    addr = &sinp->sin_addr ;
  828. X
  829. X    if ( sp->svc_no_access != NULL )
  830. X        na_matched = addrlist_match( sp->svc_no_access, addr, &na_match ) ;
  831. X    else
  832. X        na_matched = FALSE ;
  833. X
  834. X    if ( sp->svc_only_from != NULL )
  835. X        of_matched = addrlist_match( sp->svc_only_from, addr, &of_match ) ;
  836. X    else
  837. X        of_matched = FALSE ;
  838. X
  839. X    /*
  840. X     * Check if the specified address is in both lists
  841. X     */
  842. X    if ( na_matched && of_matched )
  843. X    {
  844. X        /*
  845. X         * The greater match wins.
  846. X         * If the matches are equal, this is an error in the service entry
  847. X         * and we cannot allow a server to start.
  848. X         * We do not disable the service entry (not our job).
  849. X         */
  850. X        if ( na_match == of_match )
  851. X            msg( LOG_ERR, "remote_address_check",
  852. X"Service=%s: only_from list and no_access list match equally the address %s",
  853. X                SVC_ID( sp ), inet_ntoa( sinp->sin_addr ) ) ;
  854. X        return( ( of_match > na_match ) ? OK : FAILED ) ;
  855. X    }
  856. X
  857. X    if ( sp->svc_no_access != NULL && na_matched )
  858. X        return( FAILED ) ;
  859. X    if ( sp->svc_only_from != NULL && ! of_matched )
  860. X        return( FAILED ) ;
  861. X
  862. X    /*
  863. X     * If no lists were specified, the default is to allow starting a server
  864. X     */
  865. X    return( OK ) ;
  866. X}
  867. X
  868. X
  869. X/*
  870. X * mp is the mask pointer, t is the check type
  871. X */
  872. X#define CHECK( mp, t )        ( ( (mp) == NULL ) || M_IS_SET( *(mp), t ) )
  873. X
  874. X/*
  875. X * Perform the access controls specified by check_mask.
  876. X * If check_mask is NULL, perform all access controls
  877. X */
  878. Xaccess_e access_control( sp, cp, check_mask )
  879. X    register struct service        *sp ;
  880. X    register connection_s        *cp ;
  881. X    register mask_t                *check_mask ;
  882. X{
  883. X    register struct service_config    *scp = SVC_CONF( sp ) ;
  884. X    struct sockaddr_in                    *sinp ;
  885. X
  886. X    if ( CHECK( check_mask, CF_ADDRESS ) && 
  887. X                ( sinp = conn_address( cp ) ) != SOCKADDRIN_NULL &&
  888. X                remote_address_check( sp, sinp ) == FAILED )
  889. X        return( AC_ADDRESS ) ;
  890. X
  891. X    if ( CHECK( check_mask, CF_TIME ) &&
  892. X            SC_ACCESS_TIMES( scp ) != NULL && 
  893. X                ! ti_current_time_check( SC_ACCESS_TIMES( scp ) ) )
  894. X        return( AC_TIME ) ;
  895. X    
  896. X    if ( CHECK( check_mask, CF_SERVICE_LIMIT ) &&
  897. X                                SVC_RUNNING_SERVERS( sp ) >= SC_INSTANCES( scp ) )
  898. X        return( AC_SERVICE_LIMIT ) ;
  899. X    
  900. X    if ( CHECK( check_mask, CF_PROCESS_LIMIT ) && ps.ros.process_limit )
  901. X    {
  902. X        unsigned processes_to_create = SC_IS_INTERCEPTED( scp ) ? 2 : 1 ;
  903. X
  904. X        if ( pset_count( SERVERS( ps ) ) + processes_to_create >
  905. X                                                                ps.ros.process_limit )
  906. X        return( AC_PROCESS_LIMIT ) ;
  907. X    }
  908. X    return( AC_OK ) ;
  909. X}
  910. X
  911. END_OF_FILE
  912. if test 3524 -ne `wc -c <'xinetd/access.c'`; then
  913.     echo shar: \"'xinetd/access.c'\" unpacked with wrong size!
  914. fi
  915. # end of 'xinetd/access.c'
  916. fi
  917. if test -f 'xinetd/time.c' -a "${1}" != "-c" ; then 
  918.   echo shar: Will not clobber existing file \"'xinetd/time.c'\"
  919. else
  920. echo shar: Extracting \"'xinetd/time.c'\" \(3472 characters\)
  921. sed "s/^X//" >'xinetd/time.c' <<'END_OF_FILE'
  922. X/*
  923. X * (c) Copyright 1992 by Panagiotis Tsirigotis
  924. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  925. X * and conditions for redistribution.
  926. X */
  927. X
  928. Xstatic char RCSid[] = "$Id: time.c,v 6.5 1993/06/06 00:08:34 panos Exp $" ;
  929. X
  930. X#include <syslog.h>
  931. X#include <ctype.h>
  932. X#include <time.h>
  933. X
  934. X#include "pset.h"
  935. X
  936. X#include "defs.h"
  937. X
  938. Xtime_t time() ;
  939. Xchar *malloc() ;
  940. Xint free() ;
  941. X
  942. Xvoid parsemsg() ;
  943. Xvoid out_of_memory() ;
  944. X
  945. X
  946. X#define IN_RANGE( val, low, high )     ( (low) <= (val) && (val) <= (high) )
  947. X
  948. Xstruct time_interval
  949. X{
  950. X    short min_start ;
  951. X    short min_end ;
  952. X} ;
  953. X
  954. X#define TIP( p )                  ( (struct time_interval *) (p) )
  955. X
  956. X#define NEW_TI()                    NEW( struct time_interval )
  957. X#define FREE_TI( tip )            FREE( tip )
  958. X
  959. X
  960. X/*
  961. X * Returns TRUE if the current time is within at least one of the intervals
  962. X */
  963. Xbool_int ti_current_time_check( intervals )
  964. X    pset_h intervals ;
  965. X{
  966. X    time_t                    current_time ;
  967. X    register unsigned     u ;
  968. X    register short            min_current ;
  969. X    struct tm                *tmp ;
  970. X
  971. X    (void) time( ¤t_time ) ;
  972. X    tmp = localtime( ¤t_time ) ;
  973. X    min_current = tmp->tm_hour * 60 + tmp->tm_min ;
  974. X
  975. X    for ( u = 0 ; u < pset_count( intervals ) ; u++ )
  976. X    {
  977. X        register struct time_interval *tip ;
  978. X        
  979. X        tip = TIP( pset_pointer( intervals, u ) ) ;
  980. X        if ( IN_RANGE( min_current, tip->min_start, tip->min_end ) )
  981. X            return( TRUE ) ;
  982. X    }
  983. X    return( FALSE ) ;
  984. X}
  985. X
  986. X
  987. XPRIVATE char *get_num( nump, min_val, max_val, s, stop_char )
  988. X   register int    *nump ;
  989. X   int                min_val ;
  990. X    int                max_val ;
  991. X   char                *s ;
  992. X   char                stop_char ;
  993. X{
  994. X   register char *p = s ;
  995. X   char *func = "get_num" ;
  996. X
  997. X   for ( *nump = 0 ; isdigit( *p ) ; p++ )
  998. X   {
  999. X      *nump *= 10 ;
  1000. X      *nump += *p - '0' ;
  1001. X   }
  1002. X
  1003. X   if ( *p != stop_char )
  1004. X   {
  1005. X      parsemsg( LOG_ERR, func, "incorrect time interval" ) ;
  1006. X      return( NULL );
  1007. X   }
  1008. X
  1009. X   if ( ! IN_RANGE( *nump, min_val, max_val ) )
  1010. X   {
  1011. X      parsemsg( LOG_ERR, func, "invalid time interval" ) ;
  1012. X      return( NULL ) ;
  1013. X   }
  1014. X   return( p+1 ) ;
  1015. X}
  1016. X
  1017. X
  1018. X
  1019. X/*
  1020. X * Each interval should have the form:
  1021. X *    hour:min-hour:min
  1022. X * Example: 2:30-4:15
  1023. X */
  1024. Xstatus_e ti_add( iset, interval_str )
  1025. X    pset_h iset ;
  1026. X    char *interval_str ;
  1027. X{
  1028. X    struct time_interval    *tip ;
  1029. X    int                        hours ;
  1030. X    int                        minutes ;
  1031. X    register char            *p ;
  1032. X    int                        min_start ;
  1033. X    int                        min_end ;
  1034. X    char                        *func = "add_interval" ;
  1035. X
  1036. X    if ( ( p = get_num( &hours, 0, 23, interval_str, ':' ) ) == NULL )
  1037. X        return( OK ) ;
  1038. X    if ( ( p = get_num( &minutes, 0, 59, p, '-' ) ) == NULL )
  1039. X        return( OK ) ;
  1040. X    min_start = hours * 60 + minutes ;
  1041. X
  1042. X    if ( ( p = get_num( &hours, 0, 23, p, ':' ) ) == NULL )
  1043. X        return( OK ) ;
  1044. X    if ( ( p = get_num( &minutes, 0, 59, p, NUL ) ) == NULL )
  1045. X        return( OK ) ;
  1046. X    min_end = hours * 60 + minutes ;
  1047. X    if ( min_start >= min_end )
  1048. X    {
  1049. X        parsemsg( LOG_ERR, func, "invalid time interval: %s", interval_str ) ;
  1050. X        return( OK ) ;
  1051. X    }
  1052. X
  1053. X    tip = NEW_TI() ;
  1054. X    if ( tip == NULL )
  1055. X    {
  1056. X        out_of_memory( func ) ;
  1057. X        return( FAILED ) ;
  1058. X    }
  1059. X    tip->min_start = min_start ;
  1060. X    tip->min_end = min_end ;
  1061. X    if ( pset_add( iset, tip ) == NULL )
  1062. X    {
  1063. X        FREE_TI( tip ) ;
  1064. X        out_of_memory( func ) ;
  1065. X        return( FAILED ) ;
  1066. X    }
  1067. X    return( OK ) ;
  1068. X}
  1069. X
  1070. X
  1071. Xvoid ti_dump( iset, fd )
  1072. X    pset_h iset ;
  1073. X    int fd ;
  1074. X{
  1075. X    register unsigned u ;
  1076. X
  1077. X    for ( u = 0 ; u < pset_count( iset ) ; u++ )
  1078. X    {
  1079. X        register struct time_interval *tip = TIP( pset_pointer( iset, u ) ) ;
  1080. X
  1081. X        Sprint( fd, " %02d:%02d-%02d:%02d",
  1082. X            tip->min_start / 60, tip->min_start % 60,
  1083. X            tip->min_end / 60, tip->min_end % 60 ) ;
  1084. X    }
  1085. X}
  1086. X
  1087. X
  1088. Xvoid ti_free( iset )
  1089. X    pset_h iset ;
  1090. X{
  1091. X    pset_apply( iset, free, NULL ) ;
  1092. X}
  1093. X
  1094. END_OF_FILE
  1095. if test 3472 -ne `wc -c <'xinetd/time.c'`; then
  1096.     echo shar: \"'xinetd/time.c'\" unpacked with wrong size!
  1097. fi
  1098. # end of 'xinetd/time.c'
  1099. fi
  1100. if test -f 'xinetd/xinetd.log.man' -a "${1}" != "-c" ; then 
  1101.   echo shar: Will not clobber existing file \"'xinetd/xinetd.log.man'\"
  1102. else
  1103. echo shar: Extracting \"'xinetd/xinetd.log.man'\" \(3316 characters\)
  1104. sed "s/^X//" >'xinetd/xinetd.log.man' <<'END_OF_FILE'
  1105. X.\"(c) Copyright 1992 by Panagiotis Tsirigotis
  1106. X.\"All rights reserved.  The file named COPYRIGHT specifies the terms 
  1107. X.\"and conditions for redistribution.
  1108. X.\"
  1109. X.\" $Id: xinetd.log.man,v 6.4 1993/06/06 00:13:28 panos Exp $
  1110. X.TH XINETD.LOG 5L "28 April 1993"
  1111. X.SH NAME
  1112. Xxinetd.log \- xinetd service log format
  1113. X.\" *********************** DESCRIPTION ****************************
  1114. X.SH "DESCRIPTION"
  1115. XA service configuration may specify various degrees of logging when
  1116. Xattempts are made to access the service. When logging for a service
  1117. Xis enabled,
  1118. X.B xinetd
  1119. Xwill generate one-line log entries which have the following format
  1120. X(all entries have a timestamp as a prefix):
  1121. X.sp 1
  1122. X.RS
  1123. X\fIentry\fP: \fIservice-id\fP \fIdata\fP
  1124. X.RE
  1125. X.LP
  1126. XThe \fIdata\fP depends on the \fIentry\fP.
  1127. XPossible \fIentry\fP types include:
  1128. X.RS
  1129. X.TP 12
  1130. X.SB START
  1131. Xgenerated when a server is started
  1132. X.TP
  1133. X.SB EXIT
  1134. Xgenerated when a server exits
  1135. X.TP
  1136. X.SB FAIL
  1137. Xgenerated when it is not possible to start a server
  1138. X.TP
  1139. X.SB DATA
  1140. Xgenerated when an attempt to start a server fails and the service supports
  1141. Xthe \fIRECORD\fP log option.
  1142. X.TP
  1143. X.SB USERID
  1144. Xgenerated if the \fIUSERID\fP log option is used.
  1145. X.TP
  1146. X.SB NOID
  1147. Xgenerated if the 
  1148. X.I USERID
  1149. Xlog option is used,
  1150. Xand the 
  1151. X.I IDONLY
  1152. Xservice flag is used,
  1153. Xand the remote end does not identify who is trying to access the service.
  1154. X.RE
  1155. X.LP
  1156. XIn the following, the information enclosed in brackets appears 
  1157. Xif the appropriate log option is used.
  1158. X.LP
  1159. XA \fISTART\fP entry has the format:
  1160. X.sp 1
  1161. X.RS
  1162. XSTART: \fIservice-id\fP [pid=%d] [from=%d.%d.%d.%d]
  1163. X.RE
  1164. X.LP
  1165. XAn \fIEXIT\fP entry has the format:
  1166. X.sp 1
  1167. X.RS
  1168. XEXIT: \fIservice-id\fP [\fItype\fP=%d] [pid=%d] [duration=%d(sec)]
  1169. X.RE
  1170. X.sp 1
  1171. X.I type
  1172. Xcan be either
  1173. X.SB status
  1174. Xor
  1175. X.SB signal.
  1176. XThe number is either the exit status or the signal that caused process
  1177. Xtermination.
  1178. X.LP
  1179. XA \fIFAIL\fP entry has the format:
  1180. X.sp 1
  1181. X.RS
  1182. XFAIL: \fIservice-id\fP \fIreason\fP [from=%d.%d.%d.%d]
  1183. X.RE
  1184. X.sp 1
  1185. XPossible \fIreasons\fP are:
  1186. X.RS
  1187. X.TP 15
  1188. X.SB fork
  1189. Xa certain number of consecutive fork attempts failed (this number is
  1190. Xa configurable parameter)
  1191. X.TP
  1192. X.SB time
  1193. Xthe time check failed
  1194. X.TP
  1195. X.SB address
  1196. Xthe address check failed
  1197. X.TP
  1198. X.SB service_limit
  1199. Xthe allowed number of server instances for this service would be exceeded
  1200. X.TP
  1201. X.SB process_limit
  1202. Xa limit on the number of forked processes was specified and it would 
  1203. Xbe exceeded
  1204. X.RE
  1205. X.LP
  1206. XA \fIDATA\fP entry has the format:
  1207. X.sp 1
  1208. X.RS
  1209. XDATA: \fIservice-id\fP \fIdata\fP
  1210. X.RE
  1211. X.sp 1
  1212. XThe \fIdata\fP logged depends on the service.
  1213. X.RS
  1214. X.TP 12
  1215. X.SB login
  1216. Xremote_user=%s local_user=%s tty=%s
  1217. X.TP
  1218. X.SB exec
  1219. Xremote_user=%s verify=\fIstatus\fP command=%s
  1220. X.br
  1221. XPossible
  1222. X.I status
  1223. Xvalues:
  1224. X.RS
  1225. X.TP 10
  1226. X.I ok
  1227. Xthe password was correct
  1228. X.TP
  1229. X.I failed
  1230. Xthe password was incorrect
  1231. X.TP
  1232. X.I baduser
  1233. Xno such user
  1234. X.RE
  1235. X.TP
  1236. X.SB shell
  1237. Xremote_user=%s local_user=%s command=%s
  1238. X.TP
  1239. X.SB finger
  1240. X\fIreceived string\fP or
  1241. X.I EMPTY-LINE
  1242. X.RE
  1243. X.LP
  1244. XA \fIUSERID\fP entry has the format:
  1245. X.sp 1
  1246. X.RS
  1247. XUSERID: \fIservice-id\fP \fItext\fP
  1248. X.RE
  1249. X.sp 1
  1250. XThe \fItext\fP is the response of the identification daemon at the remote end
  1251. Xexcluding the port numbers (which are included in the response).
  1252. X.LP
  1253. XA \fINOID\fP entry has the format:
  1254. X.sp 1
  1255. X.RS
  1256. XNOID: \fIservice-id\fP \fIIP-address\fP \fIreason\fP 
  1257. X.RE
  1258. X.\" *********************** SEE ALSO ****************************
  1259. X.SH "SEE ALSO"
  1260. X.I "xinetd(1L),"
  1261. X.LP
  1262. X.I "xinetd.conf(5)"
  1263. END_OF_FILE
  1264. if test 3316 -ne `wc -c <'xinetd/xinetd.log.man'`; then
  1265.     echo shar: \"'xinetd/xinetd.log.man'\" unpacked with wrong size!
  1266. fi
  1267. # end of 'xinetd/xinetd.log.man'
  1268. fi
  1269. echo shar: End of archive 6 \(of 31\).
  1270. cp /dev/null ark6isdone
  1271. MISSING=""
  1272. 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
  1273.     if test ! -f ark${I}isdone ; then
  1274.     MISSING="${MISSING} ${I}"
  1275.     fi
  1276. done
  1277. if test "${MISSING}" = "" ; then
  1278.     echo You have unpacked all 31 archives.
  1279.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1280. else
  1281.     echo You still need to unpack the following archives:
  1282.     echo "        " ${MISSING}
  1283. fi
  1284. ##  End of shell archive.
  1285. exit 0
  1286.