From owner-svn-ports-all@freebsd.org Tue Sep 6 16:49:02 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9442BC7BFB; Tue, 6 Sep 2016 16:49:02 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F38CBF9; Tue, 6 Sep 2016 16:49:02 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u86Gn13j025367; Tue, 6 Sep 2016 16:49:01 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u86Gn10M025365; Tue, 6 Sep 2016 16:49:01 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201609061649.u86Gn10M025365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 6 Sep 2016 16:49:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r421441 - in branches/2016Q3/security/xinetd: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 16:49:02 -0000 Author: garga Date: Tue Sep 6 16:49:01 2016 New Revision: 421441 URL: https://svnweb.freebsd.org/changeset/ports/421441 Log: MFH: r421378 Fix some edge cases in xinetd file descriptor handling This change fixes the case where the listening file descriptor is in 0~2 range (easily reprodutible with a single UDP service) PR: 211038 Obtained from: pfSense Sponsored by: Rubicon Communications (Netgate) Approved by: ports-secteam (feld) Added: branches/2016Q3/security/xinetd/files/patch-xinetd_child.c - copied unchanged from r421378, head/security/xinetd/files/patch-xinetd_child.c Modified: branches/2016Q3/security/xinetd/Makefile Directory Properties: branches/2016Q3/ (props changed) Modified: branches/2016Q3/security/xinetd/Makefile ============================================================================== --- branches/2016Q3/security/xinetd/Makefile Tue Sep 6 16:28:46 2016 (r421440) +++ branches/2016Q3/security/xinetd/Makefile Tue Sep 6 16:49:01 2016 (r421441) @@ -3,7 +3,7 @@ PORTNAME= xinetd PORTVERSION= 2.3.15 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security ipv6 MASTER_SITES= GENTOO Copied: branches/2016Q3/security/xinetd/files/patch-xinetd_child.c (from r421378, head/security/xinetd/files/patch-xinetd_child.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q3/security/xinetd/files/patch-xinetd_child.c Tue Sep 6 16:49:01 2016 (r421441, copy of r421378, head/security/xinetd/files/patch-xinetd_child.c) @@ -0,0 +1,24 @@ +--- xinetd/child.c.orig 2016-07-13 19:00:31 UTC ++++ xinetd/child.c +@@ -168,7 +168,8 @@ void exec_server( const struct server *s + } + #endif + +- (void) Sclose( descriptor ) ; ++ if ( descriptor > MAX_PASS_FD ) ++ (void) Sclose( descriptor ) ; + + #ifndef solaris + #if !defined(HAVE_SETSID) +@@ -321,11 +322,6 @@ void child_process( struct server *serp + signals_pending[0] = -1; + signals_pending[1] = -1; + +- Sclose(0); +- Sclose(1); +- Sclose(2); +- +- + #ifdef DEBUG_SERVER + if ( debug.on ) + {