aboutsummaryrefslogtreecommitdiff
path: root/security/cfs/files/patch-ac
diff options
context:
space:
mode:
authorBrian Feldman <green@FreeBSD.org>2004-04-22 07:27:00 +0000
committerBrian Feldman <green@FreeBSD.org>2004-04-22 07:27:00 +0000
commit623104fdc7b23e7cf07059bdf626bbb0c2834230 (patch)
tree278b581064d683b75267269c3ff28d7620079b0c /security/cfs/files/patch-ac
parentc2b29025c60a77600e2e643bec4bedece4743014 (diff)
downloadports-623104fdc7b23e7cf07059bdf626bbb0c2834230.tar.gz
ports-623104fdc7b23e7cf07059bdf626bbb0c2834230.zip
Revamp cfssh(1) so that it creates the attach points randomly again.
It used $RANDOM when it was a ksh script, but here it had always been broken because ash (/bin/sh) doesn't have it. Also, make the cfssh manpage refer to itself as cfssh instead of ssh. Submitted by: Martin Kammerhofer <dada@sbox.tugraz.at> PR: 65620
Notes
Notes: svn path=/head/; revision=107790
Diffstat (limited to 'security/cfs/files/patch-ac')
-rw-r--r--security/cfs/files/patch-ac20
1 files changed, 17 insertions, 3 deletions
diff --git a/security/cfs/files/patch-ac b/security/cfs/files/patch-ac
index bf63c532aede..bd3f9d95a2fa 100644
--- a/security/cfs/files/patch-ac
+++ b/security/cfs/files/patch-ac
@@ -1,8 +1,22 @@
---- cfssh.orig Mon May 22 20:56:00 2000
-+++ cfssh Mon May 22 20:56:11 2000
-@@ -1,4 +1,4 @@
+--- cfssh.orig Wed Dec 3 16:21:40 1997
++++ cfssh Tue Apr 20 19:45:17 2004
+@@ -1,15 +1,16 @@
-#!/bin/ksh
+#!/bin/sh
if [ -z "$1" ]; then
echo Usage: cfssh directory
+ exit
+ fi
+ export PS1="crypto:`basename $1`$ "
+-D=.$RANDOM.$RANDOM
++set -- $1 `dd if=/dev/urandom bs=8 count=1 2>/dev/null | od -D`
++D=.$3.$4
+ cattach $1 $D || exit 1
+ echo "Directory is /crypt/$D"
+ cd /crypt/$D
+-D=" "
++D=" "
+ CWD=`/bin/pwd`
+ D=`basename $CWD`
+ PWD=$CWD