diff options
author | Michal Bialozor <bialyy@o2.pl> | 2011-03-05 18:22:25 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-03-05 18:22:25 -0300 |
commit | bec82caba55fdf2e2d986320cbbe15c3b8ca2ed8 (patch) | |
tree | 9da37912faafc6abbda84937f6d3a4d2da9c5ba6 | |
parent | 53fb4f05f2cce1369eaa249d7f61e0822033b675 (diff) |
network/rssh: Added (restricted ssh)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r-- | network/rssh/Makefile.in.patch | 11 | ||||
-rw-r--r-- | network/rssh/README | 5 | ||||
-rw-r--r-- | network/rssh/doinst.sh | 15 | ||||
-rw-r--r-- | network/rssh/rssh.SlackBuild | 81 | ||||
-rw-r--r-- | network/rssh/rssh.info | 10 | ||||
-rw-r--r-- | network/rssh/slack-desc | 19 |
6 files changed, 141 insertions, 0 deletions
diff --git a/network/rssh/Makefile.in.patch b/network/rssh/Makefile.in.patch new file mode 100644 index 0000000000000..5e6c06e1fe5d8 --- /dev/null +++ b/network/rssh/Makefile.in.patch @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2011-03-01 14:47:01.563001285 +0100 ++++ Makefile.in 2011-03-01 14:50:20.735775586 +0100 +@@ -830,7 +830,7 @@ + $(CC) -c $(DEFS) $(ourdefs) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< + + install-exec-hook: +- chmod u+s $(libexecdir)/rssh_chroot_helper ++ chmod u+s $(DESTDIR)/$(libexecdir)/rssh_chroot_helper + + rpm: dist + rpmbuild -ta --sign $(base).tar.gz diff --git a/network/rssh/README b/network/rssh/README new file mode 100644 index 0000000000000..a072937f466e1 --- /dev/null +++ b/network/rssh/README @@ -0,0 +1,5 @@ +rssh is a restricted shell for use with OpenSSH, allowing only scp +and/or sftp. It now also includes support for rdist, rsync, and cvs. +For example, if you have a server which you only want to allow users +to copy files off of via scp, without providing shell access, you can +use rssh to do that. diff --git a/network/rssh/doinst.sh b/network/rssh/doinst.sh new file mode 100644 index 0000000000000..408e09eda4219 --- /dev/null +++ b/network/rssh/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/rssh.conf.new + diff --git a/network/rssh/rssh.SlackBuild b/network/rssh/rssh.SlackBuild new file mode 100644 index 0000000000000..55d7a2cba81de --- /dev/null +++ b/network/rssh/rssh.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/sh + +# Slackware build script for rssh +# Written by Michal Bialozor <bialyy@o2.pl> + +PRGNAM=rssh +VERSION=2.3.3 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +cat $CWD/Makefile.in.patch | patch --verbose -p0 || exit 1 + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +# rename config file to .new +mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS CHROOT COPYING ChangeLog INSTALL LICENSE NEWS README SECURITY TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/rssh/rssh.info b/network/rssh/rssh.info new file mode 100644 index 0000000000000..70d8cd26049ab --- /dev/null +++ b/network/rssh/rssh.info @@ -0,0 +1,10 @@ +PRGNAM="rssh" +VERSION="2.3.3" +HOMEPAGE="http://www.pizzashack.org/rssh/" +DOWNLOAD="http://sourceforge.net/projects/rssh/files/rssh/2.3.3/rssh-2.3.3.tar.gz" +MD5SUM="b0c147602fcc95737ed50573b92fc468" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Michal Bialozor" +EMAIL="bialyy@o2.pl" +APPROVED="Niels Horn" diff --git a/network/rssh/slack-desc b/network/rssh/slack-desc new file mode 100644 index 0000000000000..8739e1a711c64 --- /dev/null +++ b/network/rssh/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +rssh: rssh (restricted ssh) +rssh: +rssh: rssh is a restricted shell for use with OpenSSH, allowing only scp +rssh: and/or sftp. It now also includes support for rdist, rsync, and cvs. +rssh: For example, if you have a server which you only want to allow users +rssh: to copy files off of via scp, without providing shell access, you can +rssh: use rssh to do that. +rssh: +rssh: Homepage: http://www.pizzashack.org/rssh/ +rssh: +rssh: |