Date: Mon, 29 Jun 2026 21:47:28 +0000 From: Colin Percival <cperciva@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 023f86dc5840 - main - sysutils/spiped: Clean up UNIX sockets Message-ID: <6a42e7f0.38d26.3d5cdb82@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/ports/commit/?id=023f86dc5840075d84099fc7067dd66d953689a3 commit 023f86dc5840075d84099fc7067dd66d953689a3 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2026-06-29 02:07:17 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2026-06-29 21:47:14 +0000 sysutils/spiped: Clean up UNIX sockets When a TCP socket is closed, it becomes possible to create a new socket listening on the same address; the behaviour of UNIX (aka "local") sockets is different, in that an inode remains even after it is closed, and blocks the creation of a new socket with the same address. When spiped is launched with a UNIX socket as its source address, delete any existing socket with that address first. This makes it possible to "service spiped restart" when UNIX sockets are used. Deleting the socket when stopping spiped would also work for the case of restarting the daemon, but not for the case of starting the daemon after an unclean system shutdown; so deleting only prior to starting the daemon seemed like the better option. PR: 295432 Reported by: feld --- sysutils/spiped/Makefile | 1 + sysutils/spiped/files/spiped.in | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/sysutils/spiped/Makefile b/sysutils/spiped/Makefile index d9f5cac39925..6c3476b05ebc 100644 --- a/sysutils/spiped/Makefile +++ b/sysutils/spiped/Makefile @@ -1,5 +1,6 @@ PORTNAME= spiped PORTVERSION= 1.6.4 +PORTREVISION= 1 CATEGORIES= sysutils security MASTER_SITES= http://www.tarsnap.com/spiped/ diff --git a/sysutils/spiped/files/spiped.in b/sysutils/spiped/files/spiped.in index 5f661fd398c8..fedc8b5e7fa2 100644 --- a/sysutils/spiped/files/spiped.in +++ b/sysutils/spiped/files/spiped.in @@ -54,6 +54,11 @@ spiped_start() echo Invalid value for spiped_pipe_${P}_mode: $MODE continue esac + case "$SOURCE" in + /*) + [ -S "$SOURCE" ] && rm -f "$SOURCE" + ;; + esac ${command} -D $MODEFLAG -s $SOURCE -t $TARGET -k $KEY \ -u ${spiped_uid}:${spiped_gid} -p $PIDFILE $FLAGS donehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a42e7f0.38d26.3d5cdb82>
