aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2017-08-03 23:20:17 +0800
committerasomers <asomers@FreeBSD.org>2017-08-03 23:20:17 +0800
commit0fea34abcdc2a1cd3411157d4e335bd015e23183 (patch)
treed9f8fd97042c9e4184080de21fb82b927d1b7445
parentfdac0bd70a142cee0e6b97c2ce988427181e0089 (diff)
downloadfreebsd-ports-gnome-0fea34abcdc2a1cd3411157d4e335bd015e23183.tar.gz
freebsd-ports-gnome-0fea34abcdc2a1cd3411157d4e335bd015e23183.tar.zst
freebsd-ports-gnome-0fea34abcdc2a1cd3411157d4e335bd015e23183.zip
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
-rw-r--r--devel/staf/Makefile2
-rw-r--r--devel/staf/files/stafproc.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/devel/staf/Makefile b/devel/staf/Makefile
index e02c83fc659d..2f810f07c883 100644
--- a/devel/staf/Makefile
+++ b/devel/staf/Makefile
@@ -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
diff --git a/devel/staf/files/stafproc.in b/devel/staf/files/stafproc.in
index 8e9782e2eb8d..31b728c8313f 100644
--- a/devel/staf/files/stafproc.in
+++ b/devel/staf/files/stafproc.in
@@ -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()
{