ports/137394: New port: shells/lshell - Restricts a user's shell environment to limited sets of commands
SClo
sclo+freebsd-ports at rapsody.com
Mon Aug 3 14:20:53 UTC 2009
>Number: 137394
>Category: ports
>Synopsis: New port: shells/lshell - Restricts a user's shell environment to limited sets of commands
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 03 14:20:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:
>Release: FreeBSD 6.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD magoamoth 6.4-STABLE FreeBSD 6.4-STABLE #6: Mon Jan 19 11:17:44 CET 2009
>Description:
Here's the .shar file as attachment to add lshell (http://sourceforge.net/projects/lshell/ http://lshell.ghantoos.org/) to the port tree in the shells category.
Features:
Restricts a user's shell environment to limited sets of commands
lshell is a shell coded in Python that lets you restrict a user's environment
to limited sets of commands, choose to enable/disable any command over SSH
(e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing
restrictions, and more.
Requirements:
python 2.4+ and distutils
Author:
Ignace Mouzannar (ghantoos) <ghantoos at ghantoos.org>
>How-To-Repeat:
>Fix:
--- lshell.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# lshell
# lshell/Makefile
# lshell/pkg-plist
# lshell/pkg-descr
# lshell/distinfo
#
echo c - lshell
mkdir -p lshell > /dev/null 2>&1
echo x - lshell/Makefile
sed 's/^X//' >lshell/Makefile << '24a50839df20275ec30673a708c3fbff'
X# New ports collection makefile for: lshell
X# Date created: 29 July 2009
X# Whom: Ignace Mouzannar <mouzannar at gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= lshell
XPORTVERSION= 0.9.5
XCATEGORIES= shells python
XMASTER_SITES= SF
X
XMAINTAINER= benoit at litchis.org
XCOMMENT= Restricts a user's shell environment to limited sets of commands
X
XBUILD_DEPENDS= easy_install:${PORTSDIR}/devel/py-setuptools
X
XUSE_PYTHON= 2.4+
XUSE_PYDISTUTILS= yes
X
XSHELLS= /etc/shells
X
XDATADIR= ${PREFIX}/share/doc/${PORNAME}
XPLIST_SUB+= DATADIR=${DATADIR} LOGDIR=${LOGDIR}
X
XMAN1= lshell.1
X
Xpost-patch:
X @${REINPLACE_CMD} -e 's|/etc|/usr/local/etc|g' ${WRKSRC}/setup.py
X @${REINPLACE_CMD} -e 's|share/man|/usr/local/man|g' ${WRKSRC}/setup.py
X
Xpost-install:
X @${INSTALL_DATA} ${WRKSRC}/etc/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample
X @if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
X ${INSTALL_DATA} -p ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf ; \
X fi
X @${ECHO_MSG} "Updating ${SHELLS}"
X @${CP} ${SHELLS} ${SHELLS}.bak
X @(${GREP} -v ${PREFIX}/bin/${PORTNAME} ${SHELLS}.bak; \
X ${ECHO_CMD} ${PREFIX}/bin/${PORTNAME}) > ${SHELLS}
X @${RM} ${SHELLS}.bak
X
X.include <bsd.port.mk>
24a50839df20275ec30673a708c3fbff
echo x - lshell/pkg-plist
sed 's/^X//' >lshell/pkg-plist << '5fdef047187613039b2e75d6de5de295'
X at comment $FreeBSD$
Xbin/lshell
X at exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
X at unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
X at unexec if cmp -s %D/etc/lshell.conf %D/etc/lshell.conf.sample; then rm -f %D/etc/lshell.conf; fi
Xetc/lshell.conf.sample
X at exec if [ ! -f %D/etc/lshell.conf ]; then cp %B/%f %D/etc/lshell.conf; fi
X%%PYTHON_SITELIBDIR%%/lshell.py
X%%PYTHON_SITELIBDIR%%/lshell.pyc
X%%PYTHON_SITELIBDIR%%/lshell.pyo
X%%PORTDOCS%%%%DOCSDIR%%/CHANGES
X%%PORTDOCS%%%%DOCSDIR%%/COPYING
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X at dirrmtry %%DATADIR%%
X at dirrmtry %%LOGDIR%%
5fdef047187613039b2e75d6de5de295
echo x - lshell/pkg-descr
sed 's/^X//' >lshell/pkg-descr << '6be03f158f6b0d510079bb1c988494ac'
XRestricts a user's shell environment to limited sets of commands
X lshell is a shell coded in Python that lets you restrict a user's environment
X to limited sets of commands, choose to enable/disable any command over SSH
X (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing
X restrictions, and more.
X
X
XWWW: http://sourceforge.net/projects/lshell/
6be03f158f6b0d510079bb1c988494ac
echo x - lshell/distinfo
sed 's/^X//' >lshell/distinfo << '77e7ca5701ca55081b6fe9672c29480a'
XMD5 (lshell-0.9.5.tar.gz) = 89f0a93725f762f31e3b0c5ac2599df2
XSHA256 (lshell-0.9.5.tar.gz) = 9261ceb5b076cdde576c946bc0b1dc8f1c6e8a23dca7629f61479f7c6d9f59da
XSIZE (lshell-0.9.5.tar.gz) = 30524
77e7ca5701ca55081b6fe9672c29480a
exit
--- lshell.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list