mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Allow internal and external wrapping to be enabled independantly of
each other. Instead of allowing the -w option to be specified twice, we now take -w (wrap external) and -W (wrap internal). Discussed with: markm
This commit is contained in:
parent
946d53a1b3
commit
10d03f50ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48697
@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# All arguments must be in double or single quotes.
|
# All arguments must be in double or single quotes.
|
||||||
#
|
#
|
||||||
# $Id: rc.conf,v 1.16 1999/07/07 12:49:47 peter Exp $
|
# $Id: rc.conf,v 1.17 1999/07/08 18:56:04 peter Exp $
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
### Important initial Boot-time options ####################
|
### Important initial Boot-time options ####################
|
||||||
@ -58,7 +58,7 @@ sppp_interfaces="" # List of sppp interfaces.
|
|||||||
syslogd_enable="YES" # Run syslog daemon (or NO).
|
syslogd_enable="YES" # Run syslog daemon (or NO).
|
||||||
syslogd_flags="" # Flags to syslogd (if enabled).
|
syslogd_flags="" # Flags to syslogd (if enabled).
|
||||||
inetd_enable="YES" # Run the network daemon dispatcher (or NO).
|
inetd_enable="YES" # Run the network daemon dispatcher (or NO).
|
||||||
inetd_flags="-w -w" # Optional flags to inetd
|
inetd_flags="-wW" # Optional flags to inetd
|
||||||
#
|
#
|
||||||
# named. It may be possible to run named in a sandbox, man security for
|
# named. It may be possible to run named in a sandbox, man security for
|
||||||
# details.
|
# details.
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94
|
.\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94
|
||||||
.\" $Id: inetd.8,v 1.32 1999/07/02 15:58:32 sheldonh Exp $
|
.\" $Id: inetd.8,v 1.33 1999/07/02 16:21:12 sheldonh Exp $
|
||||||
.\"
|
.\"
|
||||||
.Dd February 7, 1996
|
.Dd February 7, 1996
|
||||||
.Dt INETD 8
|
.Dt INETD 8
|
||||||
@ -43,7 +43,8 @@
|
|||||||
.Nm inetd
|
.Nm inetd
|
||||||
.Op Fl d
|
.Op Fl d
|
||||||
.Op Fl l
|
.Op Fl l
|
||||||
.Op Fl w Op Fl w
|
.Op Fl w
|
||||||
|
.Op Fl W
|
||||||
.Op Fl c Ar maximum
|
.Op Fl c Ar maximum
|
||||||
.Op Fl C Ar rate
|
.Op Fl C Ar rate
|
||||||
.Op Fl a Ar address
|
.Op Fl a Ar address
|
||||||
@ -80,10 +81,12 @@ Turn on debugging.
|
|||||||
.It Fl l
|
.It Fl l
|
||||||
Turn on logging.
|
Turn on logging.
|
||||||
.It Fl w
|
.It Fl w
|
||||||
Turn on TCP Wrapping. If this option is specified twice, internal
|
Turn on TCP Wrapping for external services. See the
|
||||||
services will also be wrapped. See the
|
|
||||||
.Sx "IMPLEMENTATION NOTES"
|
.Sx "IMPLEMENTATION NOTES"
|
||||||
section for more information on TCP Wrappers support.
|
section for more information on TCP Wrappers support.
|
||||||
|
.It Fl W
|
||||||
|
Turn on TCP Wrapping for internal services which are built in to
|
||||||
|
.Nm inetd .
|
||||||
.It Fl c Ar maximum
|
.It Fl c Ar maximum
|
||||||
Specify the default maximum number of services that can be invoked.
|
Specify the default maximum number of services that can be invoked.
|
||||||
May be overridden on a per-service basis with the "max-child"
|
May be overridden on a per-service basis with the "max-child"
|
||||||
@ -416,10 +419,11 @@ or
|
|||||||
except for
|
except for
|
||||||
.Dq internal
|
.Dq internal
|
||||||
services. If the
|
services. If the
|
||||||
.Fl w
|
.Fl W
|
||||||
option is given twice, such
|
option is given, such
|
||||||
.Dq internal
|
.Dq internal
|
||||||
services will be wrapped as well.
|
services will be wrapped. If both options are given, wrapping for both
|
||||||
|
internal and external services will be enabled.
|
||||||
.Pp
|
.Pp
|
||||||
If the
|
If the
|
||||||
.Fl l
|
.Fl l
|
||||||
|
@ -42,7 +42,7 @@ static const char copyright[] =
|
|||||||
static char sccsid[] = "@(#)from: inetd.c 8.4 (Berkeley) 4/13/94";
|
static char sccsid[] = "@(#)from: inetd.c 8.4 (Berkeley) 4/13/94";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: inetd.c,v 1.56 1999/06/30 23:47:46 sheldonh Exp $";
|
"$Id: inetd.c,v 1.57 1999/07/02 16:21:13 sheldonh Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -147,7 +147,7 @@ static const char rcsid[] =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ISWRAP(sep) \
|
#define ISWRAP(sep) \
|
||||||
( ((wrap && !(sep)->se_bi) || (wrap_bi && (sep)->se_bi)) \
|
( ((wrap_ex && !(sep)->se_bi) || (wrap_bi && (sep)->se_bi)) \
|
||||||
&& ( ((sep)->se_accept && (sep)->se_socktype == SOCK_STREAM) \
|
&& ( ((sep)->se_accept && (sep)->se_socktype == SOCK_STREAM) \
|
||||||
|| (sep)->se_socktype == SOCK_DGRAM))
|
|| (sep)->se_socktype == SOCK_DGRAM))
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
int allow_severity;
|
int allow_severity;
|
||||||
int deny_severity;
|
int deny_severity;
|
||||||
int wrap = 0;
|
int wrap_ex = 0;
|
||||||
int wrap_bi = 0;
|
int wrap_bi = 0;
|
||||||
int debug = 0;
|
int debug = 0;
|
||||||
int log = 0;
|
int log = 0;
|
||||||
@ -373,7 +373,7 @@ main(argc, argv, envp)
|
|||||||
openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
|
openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
|
||||||
|
|
||||||
bind_address.s_addr = htonl(INADDR_ANY);
|
bind_address.s_addr = htonl(INADDR_ANY);
|
||||||
while ((ch = getopt(argc, argv, "dlwR:a:c:C:p:")) != -1)
|
while ((ch = getopt(argc, argv, "dlwWR:a:c:C:p:")) != -1)
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
case 'd':
|
case 'd':
|
||||||
debug = 1;
|
debug = 1;
|
||||||
@ -405,14 +405,15 @@ main(argc, argv, envp)
|
|||||||
pid_file = optarg;
|
pid_file = optarg;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
if (wrap++)
|
wrap_ex++;
|
||||||
wrap_bi++;
|
break;
|
||||||
|
case 'W':
|
||||||
|
wrap_bi++;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
default:
|
default:
|
||||||
syslog(LOG_ERR,
|
syslog(LOG_ERR,
|
||||||
"usage: inetd [-dl] [-w [-w]] [-a address]"
|
"usage: inetd [-dlwW] [-a address] [-R rate]"
|
||||||
" [-R rate]"
|
|
||||||
" [-c maximum] [-C rate]"
|
" [-c maximum] [-C rate]"
|
||||||
" [-p pidfile] [conf-file]");
|
" [-p pidfile] [conf-file]");
|
||||||
exit(EX_USAGE);
|
exit(EX_USAGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user