Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Sep 2016 17:09:18 +0000 (UTC)
From:      Renato Botelho <garga@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r421378 - in head/security/xinetd: . files
Message-ID:  <201609051709.u85H9IH2083736@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: garga
Date: Mon Sep  5 17:09:18 2016
New Revision: 421378
URL: https://svnweb.freebsd.org/changeset/ports/421378

Log:
  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
  MFH:		2016Q3
  Sponsored by:	Rubicon Communications (Netgate)

Added:
  head/security/xinetd/files/patch-xinetd_child.c   (contents, props changed)
Modified:
  head/security/xinetd/Makefile

Modified: head/security/xinetd/Makefile
==============================================================================
--- head/security/xinetd/Makefile	Mon Sep  5 16:11:23 2016	(r421377)
+++ head/security/xinetd/Makefile	Mon Sep  5 17:09:18 2016	(r421378)
@@ -3,7 +3,7 @@
 
 PORTNAME=	xinetd
 PORTVERSION=	2.3.15
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security ipv6
 MASTER_SITES=	GENTOO
 

Added: head/security/xinetd/files/patch-xinetd_child.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/xinetd/files/patch-xinetd_child.c	Mon Sep  5 17:09:18 2016	(r421378)
@@ -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 )
+    {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609051709.u85H9IH2083736>