Commit 6f887ed2 authored by Marco d'Itri's avatar Marco d'Itri

Debian release 0.20050402-2

parent 87c29c9f
openbsd-inetd (0.20050402-2) unstable; urgency=medium
* Added a sleep command to the init script restart section.
(Closes: #376716)
* Added -E option not to clobber the environment, contribute by
Ian Jackson. (Closes: #355005)
* Priority raised to standard.
-- Marco d'Itri <md@linux.it> Thu, 17 Aug 2006 18:53:39 +0200
openbsd-inetd (0.20050402-1) unstable; urgency=low
* New CVS snapshot.
......
Source: openbsd-inetd
Section: net
Priority: extra
Priority: standard
Maintainer: Marco d'Itri <md@linux.it>
Build-Depends: debhelper (>= 4.0), libwrap0-dev
Standards-Version: 3.6.1.1
Standards-Version: 3.7.2.1
Package: openbsd-inetd
Architecture: any
......
This is a port of the original OpenBSD inetd daemon downloaded from CVS.
Some features have been merged from the NetBSD source tree.
* Copyright (c) 1983,1991 The Regents of the University of California.
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
It has a standard 3-clauses BSD license (/usr/share/common-licenses/BSD).
setproctitle.c and discard_stupid_environment() come from netkit 0.17,
......
......@@ -62,6 +62,7 @@ case "$1" in
--exec $DAEMON --oknodo
checkportmap
checknoservices
sleep 1
start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid \
--exec $DAEMON -- $OPTIONS
echo " inetd."
......
......@@ -36,6 +36,8 @@ binary-arch: checkroot build
binary: binary-arch
binary-indep:
checkroot:
test root = "`whoami`"
......
......@@ -39,6 +39,7 @@
.Nm inetd
.Op Fl d
.Op Fl l
.Op Fl E
.Op Fl R Ar rate
.Op Ar configuration file
.Sh DESCRIPTION
......@@ -63,6 +64,13 @@ The options are as follows:
.Bl -tag -width Ds
.It Fl d
Turns on debugging.
.It Fl E
Prevents
.Nm inetd
from laundering the environment. Without this option a selection of
environent variables believed by the authors to be harmful, including
.Pa PATH ,
will be removed and not inherited by services.
.It Fl l
Turns on libwrap connection logging. Internal services cannot be wrapped.
When enabled,
......
......@@ -184,6 +184,7 @@ int lflag = 0;
int global_queuelen = 128;
int debug = 0;
int keepenv = 0;
int nsock, maxsock;
fd_set *allsockp;
int allsockn;
......@@ -356,10 +357,8 @@ main(int argc, char *argv[], char *envp[])
progname = progname ? progname + 1 : argv[0];
initsetproctitle(argc, argv, envp);
/* This must be called _after_ initsetproctitle */
discard_stupid_environment();
while ((ch = getopt(argc, argv, "dilq:R:")) != -1)
while ((ch = getopt(argc, argv, "dilEq:R:")) != -1)
switch (ch) {
case 'd':
debug = 1;
......@@ -367,6 +366,9 @@ main(int argc, char *argv[], char *envp[])
case 'i':
nodaemon = 1;
break;
case 'E':
keepenv = 1;
break;
case 'l':
#ifdef LIBWRAP
lflag = 1;
......@@ -404,6 +406,9 @@ main(int argc, char *argv[], char *envp[])
argc -= optind;
argv += optind;
/* This must be called _after_ initsetproctitle and arg parsing */
discard_stupid_environment();
uid = getuid();
if (uid != 0)
CONFIG = NULL;
......@@ -2290,6 +2295,9 @@ discard_stupid_environment(void)
};
int i, k = 0;
if (keepenv)
return;
for (i = 0; __environ[i]; i++) {
int found = 0, j;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment