security bump. bug 72815.
authorMatsuu Takuto <matsuu@gentoo.org>
Thu, 2 Dec 2004 15:30:22 +0000 (15:30 +0000)
committerMatsuu Takuto <matsuu@gentoo.org>
Thu, 2 Dec 2004 15:30:22 +0000 (15:30 +0000)
net-misc/scponly/ChangeLog
net-misc/scponly/Manifest
net-misc/scponly/files/digest-scponly-4.0 [new file with mode: 0644]
net-misc/scponly/scponly-4.0.ebuild [new file with mode: 0644]

index 4dbb6669fe389fe74733733b7008d8ec585596a1..418b1fea8ae5a3c2ac3ec1116fb289119bb693fc 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for net-misc/scponly
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/ChangeLog,v 1.12 2004/10/31 14:49:56 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/ChangeLog,v 1.13 2004/12/02 15:30:22 matsuu Exp $
+
+*scponly-4.0 (03 Dec 2004)
+
+  03 Dec 2004; MATSUU Takuto <matsuu@gentoo.org> +scponly-4.0.ebuild:
+  security bump - bug 72815
 
   31 Oct 2004; MATSUU Takuto <matsuu@gentoo.org> scponly-3.11-r2.ebuild,
   -scponly-3.7.ebuild, -scponly-3.8.ebuild:
index ee8a72c4952eae654eac14ca88958d1021dc73ea..396f069b2278bd43f7d1a97bc462ccb7fd4730a9 100644 (file)
@@ -1,4 +1,6 @@
+MD5 48f3604e22751295c07e471844ade2bb scponly-4.0.ebuild 3067
 MD5 e8351ad8c6e76a8b538676e19940e5c7 scponly-3.11-r2.ebuild 3142
-MD5 f54d9da22b4c711bd1fc28fad6d597f8 ChangeLog 1904
+MD5 fbaae0854d8aa8a9a93d0f6ad1795856 ChangeLog 2031
 MD5 e10a0da4fac2882942ffa8360ccdd921 metadata.xml 201
 MD5 e4d07123d938d81c26fa0f70de4b6a8d files/digest-scponly-3.11-r2 60
+MD5 a1f6bee0be7b749e155d9ec945ce31a4 files/digest-scponly-4.0 59
diff --git a/net-misc/scponly/files/digest-scponly-4.0 b/net-misc/scponly/files/digest-scponly-4.0
new file mode 100644 (file)
index 0000000..537377f
--- /dev/null
@@ -0,0 +1 @@
+MD5 1706732945996865ed0cccd440b64fc1 scponly-4.0.tgz 85053
diff --git a/net-misc/scponly/scponly-4.0.ebuild b/net-misc/scponly/scponly-4.0.ebuild
new file mode 100644 (file)
index 0000000..deb7078
--- /dev/null
@@ -0,0 +1,107 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/scponly-4.0.ebuild,v 1.1 2004/12/02 15:30:22 matsuu Exp $
+
+inherit eutils
+
+DESCRIPTION="A tiny pseudoshell which only permits scp and sftp"
+HOMEPAGE="http://www.sublimation.org/scponly/"
+SRC_URI="http://www.sublimation.org/scponly/${P}.tgz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 amd64 ~sparc ~ppc"
+IUSE=""
+
+DEPEND="virtual/libc
+       net-misc/openssh"
+
+src_compile() {
+       PATH="${PATH}:/usr/lib/misc" \
+       econf \
+               --enable-rsync-compat \
+               --enable-chrooted-binary \
+               || die "./configure failed"
+       emake || die
+}
+
+src_install() {
+       make prefix=${D}/usr \
+               mandir=${D}/usr/share/man \
+               CONFDIR=${D}/etc/scponly \
+               install || die
+
+       dodoc AUTHOR CHANGELOG CONTRIB README TODO
+}
+
+pkg_postinst() {
+       # pkg_postinst is based on ${S}/setup_chroot.sh.
+
+       local myuser="scponly"
+       local myhome="/home/${myuser}"
+
+       einfo "Updating /etc/shells"
+       { grep -v "^/usr/bin/scponly$" /etc/shells;
+       echo "/usr/bin/scponly"
+       } > ${T}/shells
+       mv -f ${T}/shells /etc/shells
+
+       { grep -v "^/usr/sbin/scponlyc$" /etc/shells;
+       echo "/usr/sbin/scponlyc"
+       } > ${T}/shells
+       mv -f ${T}/shells /etc/shells
+
+       BINARIES="/usr/lib/misc/sftp-server /bin/ls /usr/bin/scp /bin/rm /bin/ln /bin/mv /bin/chmod /bin/chown /bin/chgrp /bin/mkdir /bin/rmdir /bin/pwd /bin/groups /usr/bin/ld /bin/echo /usr/bin/rsync"
+       LIB_LIST=`/usr/bin/ldd $BINARIES 2> /dev/null | /bin/cut -f2 -d\> | /bin/cut -f1 -d\( | /bin/grep "^ " | /bin/sort -u`
+       LDSO_LIST="/lib/ld.so /libexec/ld-elf.so /libexec/ld-elf.so.1 /usr/libexec/ld.so /lib/ld-linux.so.2 /usr/libexec/ld-elf.so.1"
+       for lib in $LDSO_LIST; do
+               if [ -f $lib ]; then
+                       LIB_LIST="$LIB_LIST $lib"
+               fi
+       done
+       /bin/ls /lib/libnss_compat* > /dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               LIB_LIST="$LIB_LIST /lib/libnss_compat*"
+       fi
+
+       ldconfig
+       LIB_LIST="$LIB_LIST /etc/ld.so.cache /etc/ld.so.conf"
+
+       enewgroup ${myuser}
+       enewuser ${myuser} -1 /usr/sbin/scponlyc ${myhome} ${myuser}
+       if [ ! -d ${myhome} ]; then
+               /bin/install -c -d ${myhome}
+               /bin/chmod 755 ${myhome}
+       fi
+       if [ ! -d ${myhome} ]; then
+               /bin/install -c -d ${myhome}/etc
+               /bin/chown 0:0 ${myhome}/etc
+               /bin/chmod 755 ${myhome}/etc
+       fi
+       for bin in $BINARIES; do
+               /bin/install -c -d ${myhome}/`/bin/dirname $bin`
+               /bin/install -c $bin ${myhome}/$bin
+       done
+       for lib in $LIB_LIST; do
+               /bin/install -c -d ${myhome}/`/bin/dirname $lib`
+               /bin/install -c $lib ${myhome}/$lib
+       done
+
+       /bin/chown 0:0 ${myhome}
+       if [ -d ${myhome}/.ssh ]; then
+               /bin/chown 0:0 ${myhome}/.ssh
+       fi
+
+       if [ ! -d ${myhome}/incoming ]; then
+               einfo "creating ${myhome}/incoming directory for uploading files"
+               /bin/install -c -o ${myuser} -d ${myhome}/incoming
+       fi
+       /bin/chown $myuser:$myuser ${myhome}/incoming
+
+       grep "^${myuser}" /etc/passwd > ${myhome}/etc/passwd
+
+       einfo ""
+       einfo "if you experience a warning with winscp regarding groups, please install"
+       einfo "the provided hacked out fake groups program into your chroot, like so:"
+       einfo "cp groups ${myhome}/bin/groups"
+}