forked from freebsd/freebsd-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> PR: 65620
- Loading branch information
green
authored and
green
committed
Apr 22, 2004
1 parent
6787b40
commit ce153c8
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,21 @@ | |
|
||
PORTNAME= cfs | ||
PORTVERSION= 1.4.1 | ||
PORTREVESION= 1 | ||
PORTREVESION= 2 | ||
CATEGORIES= security | ||
MASTER_SITES= http://www.crypto.com/software/ | ||
|
||
MAINTAINER= [email protected] | ||
COMMENT= A cryptographic file system implemented as a user-space NFS server | ||
|
||
USE_REINPLACE= yes | ||
ALL_TARGET= cfs | ||
MAN1= cattach.1 cdetach.1 cmkdir.1 cpasswd.1 cfssh.1 | ||
MAN8= ccat.8 cfsd.8 cname.8 | ||
|
||
post-patch: | ||
${REINPLACE_CMD} 's/^\.TH SSH/.TH CFSSH/' ${WRKSRC}/cfssh.1 | ||
|
||
do-install: | ||
@cd ${WRKSRC}; \ | ||
${INSTALL_PROGRAM} ccat cfsd cname ${PREFIX}/sbin; \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |