Date: 19 Aug 2011 04:35:54 -0000 From: Colin Percival <cperciva@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/159899: New port: sysutils/spiped secure pipe daemon Message-ID: <20110819043554.33243.qmail@xps.daemonology.net> Resent-Message-ID: <201108190440.p7J4e9Px096834@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 159899 >Category: ports >Synopsis: New port: sysutils/spiped secure pipe daemon >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Aug 19 04:40:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Colin Percival >Release: n/a >Organization: >Environment: n/a >Description: Port of the spiped secure pipe daemon; this is essentially a replacement for 'ssh -L', but using a pre-shared symmetric key (and not requiring SSH). The only non-trivial component here is the rc.d script for creating pipes; it is common for multiple instances of spiped to be required so the rc.d script uses a list of pipes ($spiped_pipes) and options for each pipe ($spiped_pipe_X_* for the pipe X). I have a ports commit bit but don't use it often, and I'm not sure about whether I got the rc.d script right in particular, so I'm submitting this as a PR rather than committing it myself in the hopes that someone with more ports-fu will make sure that I did things right. ;-) >How-To-Repeat: >Fix: --- spiped.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # spiped # spiped/files # spiped/files/spiped.in # spiped/pkg-descr # spiped/distinfo # spiped/Makefile # echo c - spiped mkdir -p spiped > /dev/null 2>&1 echo c - spiped/files mkdir -p spiped/files > /dev/null 2>&1 echo x - spiped/files/spiped.in sed 's/^X//' >spiped/files/spiped.in << '333e110c043b23aeda04713cf125df30' X#!/bin/sh X X# $FreeBSD$ X# X# PROVIDE: spiped X# REQUIRE: LOGIN X# KEYWORD: shutdown X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# spiped_enable: Set to YES to enable spiped. X# spiped_pipes: List of names of pipes to create. X# spiped_pipe_X_mode: "encrypt"/"client" or "decrypt"/"server". X# spiped_pipe_X_source: Source address of pipe X. X# spiped_pipe_X_target: Target address of pipe X. X# spiped_pipe_X_key: Key file for pipe X. X X. /etc/rc.subr X Xname="spiped" Xstart_cmd="${name}_start" Xstop_cmd="${name}_stop" Xrcvar=${name}_enable X Xcommand=%%PREFIX%%/bin/${name} X Xload_rc_config $name X X: ${spiped_enable="NO"} X Xspiped_start() X{ X for P in ${spiped_pipes}; do X PIDFILE=/var/run/spiped_$P.pid X eval MODE=\$spiped_pipe_${P}_mode X eval SOURCE=\$spiped_pipe_${P}_source X eval TARGET=\$spiped_pipe_${P}_target X eval KEY=\$spiped_pipe_${P}_key X case "$MODE" in X encrypt | client) X MODEFLAG="-e" X ;; X decrypt | server) X MODEFLAG="-d" X ;; X *) X echo Invalid value for spiped_pipe_$P}_mode: $MODE X continue X esac X ${command} $MODEFLAG -s $SOURCE -t $TARGET -k $KEY -p $PIDFILE X done X} X Xspiped_stop() X{ X for P in ${spiped_pipes}; do X PIDFILE=/var/run/spiped_$P.pid X if [ -f $PIDFILE ]; then X kill -TERM `cat $PIDFILE` X rm $PIDFILE X fi X done X} X Xrun_rc_command "$1" 333e110c043b23aeda04713cf125df30 echo x - spiped/pkg-descr sed 's/^X//' >spiped/pkg-descr << '6ba1786c45428fb88d462c43c1965fdf' XSpiped (pronounced "ess-pipe-dee") is a utility for creating symmetrically Xencrypted and authenticated pipes between socket addresses, so that one may Xconnect to one address (e.g., a UNIX socket on localhost) and transparently Xhave a connection established to another address (e.g., a UNIX socket on a Xdifferent system). This is similar to 'ssh -L' functionality, but does not Xuse SSH and requires a pre-shared symmetric key. X XWWW: http://www.tarsnap.com/spiped.html X X- Colin Percival Xcperciva@tarsnap.com 6ba1786c45428fb88d462c43c1965fdf echo x - spiped/distinfo sed 's/^X//' >spiped/distinfo << '994a20e8a7d012e332be9fbe0642de43' XSHA256 (spiped-1.0.0.tgz) = 82df05533bf8d8580f57e6dbec7d7e2966eabd3ea7a0a0bb06f87000947969a3 XSIZE (spiped-1.0.0.tgz) = 46684 994a20e8a7d012e332be9fbe0642de43 echo x - spiped/Makefile sed 's/^X//' >spiped/Makefile << '2ab3cd9813c7e6138398a6bbf18b262d' X# New ports collection makefile for: spiped secure pipe daemon X# Date created: 2011-08-18 X# Whom: Colin Percival X# X# $FreeBSD$ X# X XPORTNAME= spiped XPORTVERSION= 1.0.0 XCATEGORIES= sysutils security XMASTER_SITES= http://www.tarsnap.com/spiped/ XEXTRACT_SUFX= .tgz X XMAINTAINER= cperciva@tarsnap.com XCOMMENT= Daemon for creating secure symmetric pipes X XPLIST_FILES= bin/spiped X XUSE_RC_SUBR= spiped X X.include <bsd.port.mk> 2ab3cd9813c7e6138398a6bbf18b262d exit --- spiped.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110819043554.33243.qmail>