ports/144059: shells/scponly: setup_chroot.sh patch

Michael Meelis m.meelis at easybow.com
Thu Feb 18 13:00:09 UTC 2010


>Number:         144059
>Category:       ports
>Synopsis:       shells/scponly: setup_chroot.sh patch
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 18 13:00:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Michael Meelis
>Release:        7.2-RELEASE-p4
>Organization:
EasyBOW
>Environment:
FreeBSD mdmdc2.node.easybow.net 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #21: Fri Jan  8 03:07:00 CET 2010     bow at pxe3:/usr/obj/usr/src/sys/EASYBOW  i386

>Description:
The included /usr/local/share/examples/scponly/setup_chroot.sh is not complete on the creation of the chrooted environment for scp use. The script does not created the needed /dev/null in the chrooted environment. My suggestion is to add this to the script. See fix below.

>How-To-Repeat:
everytime you run setup_chroot.sh
>Fix:
Insert on line 201 of /usr/local/share/examples/scponly/setup_chroot.sh

mkdir $targetdir/dev
touch $targetdir/dev/null
chmod 0666 $targetdir/dev/null


To facilitate the .ssh directory for user, append:
mkdir $targetdir/.ssh
chmod 500 $targetdir/.ssh
touch $targetdir/.ssh/authorized_keys
chmod 444 $targetdir/.ssh/authorized_keys
chown -R $targetuser:$targetuser $targetdir/.ssh


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list