#! /bin/sh
# $Id: cvsshell,v 1.1 2001/02/28 13:12:54 an Exp $
# a wrapper for cvs, to allow users only to run cvs
# set this up as the users shell

arg2=`echo $@ | awk '{print $2}'`

if [ -z "$SSH_CLIENT" ]
then
	echo "This shell is only usable with ssh."
	exit 1
fi

case $arg2 in
cvs)
	cat | /bin/sh -c "cvs server"
	;;
*)
	echo "Sorry. You only have permission to use CVS."
	exit 1
	;;
esac
