From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 13 03:50:01 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AB6D1065672 for ; Wed, 13 Jan 2010 03:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5708F8FC19 for ; Wed, 13 Jan 2010 03:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0D3o1rR097483 for ; Wed, 13 Jan 2010 03:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0D3o12Z097482; Wed, 13 Jan 2010 03:50:01 GMT (envelope-from gnats) Resent-Date: Wed, 13 Jan 2010 03:50:01 GMT Resent-Message-Id: <201001130350.o0D3o12Z097482@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rob Farmer Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F95A1065672 for ; Wed, 13 Jan 2010 03:40:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 548D08FC14 for ; Wed, 13 Jan 2010 03:40:14 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0D3eEsP037845 for ; Wed, 13 Jan 2010 03:40:14 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0D3eEUe037844; Wed, 13 Jan 2010 03:40:14 GMT (envelope-from nobody) Message-Id: <201001130340.o0D3eEUe037844@www.freebsd.org> Date: Wed, 13 Jan 2010 03:40:14 GMT From: Rob Farmer To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/142764: [PATCH] shells/scponly Fix rc.d script, fix build with new gcc, take maintainership X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 03:50:01 -0000 >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@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@FreeBSD.org +MAINTAINER= rfarmer@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: