NetBSD Problem Report #52412

From www@NetBSD.org  Sun Jul 16 20:08:24 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2808A7A1AE
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 16 Jul 2017 20:08:24 +0000 (UTC)
Message-Id: <20170716200822.8D2C77A269@mollari.NetBSD.org>
Date: Sun, 16 Jul 2017 20:08:22 +0000 (UTC)
From: edgar@pettijohn-web.com
Reply-To: edgar@pettijohn-web.com
To: gnats-bugs@NetBSD.org
Subject: inetd(8) lacks information
X-Send-Pr-Version: www-1.0

>Number:         52412
>Category:       misc
>Synopsis:       inetd(8) lacks information
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 16 20:10:00 +0000 2017
>Closed-Date:    Tue Jul 18 13:04:49 +0000 2017
>Last-Modified:  Tue Jul 18 13:04:49 +0000 2017
>Originator:     Edgar Pettijohn
>Release:        NetBSD 7.1 Sun Jul 16 14:46:42 CDT 2017
>Organization:
>Environment:
NetBSD 7.1 (GENERIC.201703111743Z) amd64

>Description:
I'm guessing since inetd switched to getaddrinfo() its possible to do the following in inetd.conf

10.99.0.10:8080 stream  tcp     nowait  _httpd  /usr/libexec/httpd      httpd -v /var/vroot /var/www

Or without the [ipv4:]. To sum it up you aren't restricted to service names from /etc/services.
>How-To-Repeat:
man inetd.conf
>Fix:
Index: inetd.8
===================================================================
RCS file: /cvsroot/src/usr.sbin/inetd/inetd.8,v
retrieving revision 1.57
diff -u -r1.57 inetd.8
--- inetd.8	25 Apr 2011 22:12:05 -0000	1.57
+++ inetd.8	16 Jul 2017 19:45:42 -0000
@@ -115,7 +115,7 @@
 The fields of the configuration file are as follows:
 .Pp
 .Bd -unfilled -offset indent -compact
-[addr:]service-name
+[addr:]service-name/port number
 socket-type[:accept_filter]
 protocol[,sndbuf=size][,rcvbuf=size]
 wait/nowait[:max]
@@ -152,9 +152,9 @@
 .Ed
 .Pp
 For Internet services, the first field of the line may also have a host
-address specifier prefixed to it, separated from the service name by a colon.
-If this is done, the string before the colon in the first field
-indicates what local address
+address specifier prefixed to it, separated from the service name or port
+number by a colon. If this is done, the string before the colon in the
+first field indicates what local address
 .Nm
 should use when listening for that service, or the single character
 .Dq \&*
@@ -175,11 +175,11 @@
 on all local addresses.
 .Pp
 The
-.Em service-name
+.Em service-name/port number
 entry is the name of a valid service in
 the file
 .Pa /etc/services .
-For
+Or an alternate port number. For
 .Dq internal
 services (discussed below), the service
 name

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52412 CVS commit: src/usr.sbin/inetd
Date: Sun, 16 Jul 2017 17:05:19 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Sun Jul 16 21:05:19 UTC 2017

 Modified Files:
 	src/usr.sbin/inetd: inetd.8

 Log Message:
 PR/52412: Edgar Pettijohn: Describe the service/port syntax.


 To generate a diff of this commit:
 cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/inetd/inetd.8

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Tue, 18 Jul 2017 13:04:49 +0000
State-Changed-Why:
Fixed by <christos> in -r1.58 of src/usr.sbin/inetd/inetd.8.

Thank you Edgar for the PR and patches and thanks to Christos
for managing it!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.