summaryrefslogtreecommitdiff
path: root/shells/scponly
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-01-15 02:44:01 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-01-15 02:44:01 +0000
commit03671d92fe78c2e51ddcc04101516e4742682bdb (patch)
tree9c7216542fb67973c856457f035a8460eaa5bcc5 /shells/scponly
parent- Make socket executable if client attached (useful for scripts), obtained fr... (diff)
- Fix rc.d script for chroot functionality (thanks to Doug Barton for help with this)
- Switch an empty #elif to #else to please GCC 4.4 - Submitter is now MAINTAINER PR: ports/142764 Submitted by: Rob Farmer <rfarmer@predatorlabs.net>
Notes
Notes: svn path=/head/; revision=247905
Diffstat (limited to 'shells/scponly')
-rw-r--r--shells/scponly/Makefile3
-rw-r--r--shells/scponly/files/patch-helper.c11
-rw-r--r--shells/scponly/files/scponlyc.in13
3 files changed, 21 insertions, 6 deletions
diff --git a/shells/scponly/Makefile b/shells/scponly/Makefile
index ea73b0d8a87a..3319a07258cd 100644
--- a/shells/scponly/Makefile
+++ b/shells/scponly/Makefile
@@ -71,13 +71,14 @@
PORTNAME= scponly
PORTVERSION= 4.8
+PORTREVISION= 1
CATEGORIES= shells security
MASTER_SITES= http://www.sublimation.org/scponly/ \
SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
EXTRACT_SUFX= .tgz
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= rfarmer@predatorlabs.net
COMMENT= A tiny shell that only permits scp and sftp
MAN8= scponly.8
diff --git a/shells/scponly/files/patch-helper.c b/shells/scponly/files/patch-helper.c
new file mode 100644
index 000000000000..a72af80225e9
--- /dev/null
+++ b/shells/scponly/files/patch-helper.c
@@ -0,0 +1,11 @@
+--- helper.c.orig 2010-01-05 21:06:05.000000000 -0800
++++ helper.c 2010-01-05 21:06:18.000000000 -0800
+@@ -230,7 +230,7 @@
+ return 1;
+ }
+ }
+-#elif
++#else
+ /*
+ * make sure that processing doesn't continue if we can't validate a rsync check
+ * and if the getopt flag is set.
diff --git a/shells/scponly/files/scponlyc.in b/shells/scponly/files/scponlyc.in
index 6f9d48e4aaef..28f8bf42e147 100644
--- a/shells/scponly/files/scponlyc.in
+++ b/shells/scponly/files/scponlyc.in
@@ -33,12 +33,15 @@ make_devfs() {
# devfs created. If ~/dev exists, it will be deleted.
eval DEV="~$1/dev"
- while /sbin/umount "${DEV}" 2>/dev/null; do :; done
- /bin/rm -rf "${DEV}"
+ if /sbin/mount | grep "${DEV}" >/dev/null 2>&1; then
+ /sbin/umount "${DEV}" 2>/dev/null
+ fi
+ /bin/rmdir "${DEV}" || err 1 "Unable to remove $DEV"
/bin/mkdir -p "${DEV}"
- if /sbin/mount -t devfs dev "${DEV}"; then
- /sbin/devfs -m "${DEV}" rule -s 1 applyset && \
- /sbin/devfs -m "${DEV}" rule -s 2 applyset || \
+ devfs_domount "${DEV}"
+ if devfs_init_rulesets; then
+ devfs_apply_ruleset "devfsrules_hide_all" "${DEV}" && \
+ devfs_apply_ruleset "devfsrules_unhide_basic" "${DEV}" || \
/sbin/umount "${DEV}" 2>/dev/null
fi
}