svn commit: r447227 - in head/devel/staf: . files

Alan Somers asomers at FreeBSD.org
Thu Aug 3 15:20:18 UTC 2017


Author: asomers (src committer)
Date: Thu Aug  3 15:20:17 2017
New Revision: 447227
URL: https://svnweb.freebsd.org/changeset/ports/447227

Log:
  devel/staf: stafproc passes a revoked file descriptor to children
  
  staf's rc script uses daemon(8) to detach stafproc from its controlling
  terminal, but it does nothing to stdin.  The result is that stafproc has a
  stdin in the revoked state, which it passes to child processes.  Some
  programs can't handle revoked file descriptors, because they return EBADF
  despite being opened.
  
  PR:		221161
  Approved by:	koobs (portmgr)
  MFH:		2017Q3
  Sponsored by:	Spectra Logic Corp

Modified:
  head/devel/staf/Makefile
  head/devel/staf/files/stafproc.in

Modified: head/devel/staf/Makefile
==============================================================================
--- head/devel/staf/Makefile	Thu Aug  3 15:17:53 2017	(r447226)
+++ head/devel/staf/Makefile	Thu Aug  3 15:20:17 2017	(r447227)
@@ -3,7 +3,7 @@
 
 PORTNAME=	staf
 PORTVERSION=	3.4.23
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel net
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/V${PORTVERSION}
 DISTNAME=	STAF${PORTVERSION:S/.//g}-src

Modified: head/devel/staf/files/stafproc.in
==============================================================================
--- head/devel/staf/files/stafproc.in	Thu Aug  3 15:17:53 2017	(r447226)
+++ head/devel/staf/files/stafproc.in	Thu Aug  3 15:20:17 2017	(r447227)
@@ -25,7 +25,7 @@ pidfile="/var/run/${name}/${name}.pid"
 start_precmd="stafproc_precmd"
 procname="%%PREFIX%%/bin/STAFProc"
 command="/usr/sbin/daemon"
-command_args="-p ${pidfile} env PATH=$PATH:%%PREFIX%%/bin ${procname} ${stafproc_config} >> ${stafproc_log} 2>&1"
+command_args="-p ${pidfile} env PATH=$PATH:%%PREFIX%%/bin ${procname} ${stafproc_config} < /dev/null >> ${stafproc_log} 2>&1"
 
 stafproc_precmd()
 {


More information about the svn-ports-head mailing list