ports/142764: [PATCH] shells/scponly Fix rc.d script, fix build with new gcc, take maintainership
Rob Farmer
rfarmer at predatorlabs.net
Wed Jan 13 03:50:01 UTC 2010
>Number: 142764
>Category: ports
>Synopsis: [PATCH] shells/scponly Fix rc.d script, fix build with new gcc, take maintainership
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 13 03:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Rob Farmer
>Release: 9.0-CURRENT
>Organization:
>Environment:
FreeBSD amethyst.predatorlabs.net 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r202069: Mon Jan 11 00:32:29 PST 2010 rfarmer at amethyst.predatorlabs.net:/usr/obj/usr/src/sys/AMETHYST i386
>Description:
* 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
* Take maintainership
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -ruN scponly.old/Makefile scponly/Makefile
--- scponly.old/Makefile 2010-01-05 21:00:50.000000000 -0800
+++ scponly/Makefile 2010-01-05 21:02:46.000000000 -0800
@@ -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 at FreeBSD.org
+MAINTAINER= rfarmer at predatorlabs.net
COMMENT= A tiny shell that only permits scp and sftp
MAN8= scponly.8
diff -ruN scponly.old/files/patch-helper.c scponly/files/patch-helper.c
--- scponly.old/files/patch-helper.c 1969-12-31 16:00:00.000000000 -0800
+++ scponly/files/patch-helper.c 2010-01-05 21:06:49.000000000 -0800
@@ -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 -ruN scponly.old/files/scponlyc.in scponly/files/scponlyc.in
--- scponly.old/files/scponlyc.in 2010-01-05 21:00:50.000000000 -0800
+++ scponly/files/scponlyc.in 2010-01-06 00:15:53.000000000 -0800
@@ -33,12 +33,15 @@
# 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
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list