Jailkit is a set of utilities to limit user accounts to specific

files using chroot() and or specific commands.
Setting up a chroot shell, a shell limited to some specific
command, or a daemon inside a chroot jail is a lot easier and
can be automated using these utilities.

WWW:    http://olivier.sessink.nl/jailkit/

PR:		ports/138047
Submitted by:	Sylvio Cesar <scjamorim@bsd.com.br>
This commit is contained in:
Marcelo Araujo 2009-09-04 00:37:27 +00:00
parent 2080701b64
commit 1ad8099c5c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=240832
6 changed files with 111 additions and 0 deletions

View File

@ -19,6 +19,7 @@
SUBDIR += gscommander
SUBDIR += heirloom-sh
SUBDIR += ibsh
SUBDIR += jailkit
SUBDIR += ksh93
SUBDIR += lshell
SUBDIR += mksh

52
shells/jailkit/Makefile Normal file
View File

@ -0,0 +1,52 @@
# New ports collection makefile for: jailkit
# Date created: 2009-08-20
# Whom: Sylvio Cesar <scjamorim@bsd.com.br>
#
# $FreeBSD$
#
PORTNAME= jailkit
PORTVERSION= 2.8
CATEGORIES= shells
MASTER_SITES= http://olivier.sessink.nl/jailkit/ \
http://www.sfr-fresh.com/unix/privat/
MAINTAINER= scjamorim@bsd.com.br
COMMENT= Jailkit is a set of utilities to limit user account
GNU_CONFIGURE= yes
USE_PYTHON= 2.4+
SHELLS= /etc/shells
MAN8= jailkit.8 \
jk_addjailuser.8 \
jk_check.8 \
jk_chrootlaunch.8 \
jk_chrootsh.8 \
jk_cp.8 \
jk_init.8 \
jk_jailuser.8 \
jk_list.8 \
jk_lsh.8 \
jk_socketd.8 \
jk_uchroot.8 \
jk_update.8
MANCOMPRESSED= yes
PORTDOCS= COPYRIGHT README.txt
post-install:
@${ECHO_MSG} "Updating ${SHELLS}"
@${CP} ${SHELLS} ${SHELLS}.bak
@(${GREP} -v ${PREFIX}/sbin/jk_chrootsh ${SHELLS}.bak; \
${ECHO_CMD} ${PREFIX}/sbin/jk_chrootsh) > ${SHELLS}
@${RM} -f ${SHELLS}.bak
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for docs in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>

3
shells/jailkit/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (jailkit-2.8.tar.gz) = eabb1f90be7b5be99f763dd08a7be9a1
SHA256 (jailkit-2.8.tar.gz) = b80cfcce9797b79b4cfa4f4cae553bcf462406896c7faacf535435922e1d4684
SIZE (jailkit-2.8.tar.gz) = 128586

View File

@ -0,0 +1,24 @@
--- Makefile.in.orig 2009-08-20 20:46:11.000000000 -0300
+++ Makefile.in 2009-08-20 20:46:51.000000000 -0300
@@ -67,15 +67,6 @@
@cd src/ && $(MAKE) install
@cd py/ && $(MAKE) install
@cd man/ && $(MAKE) install
- # test if the jk_chrootsh is already in /etc/shells
- # this previously had @echo but that fails on FreeBSD
- if test -w /etc/shells; then \
- if ! grep ${prefix}/sbin/jk_chrootsh /etc/shells ; then \
- echo "appending ${prefix}/sbin/jk_chroots to /etc/shells";\
- echo ${prefix}/sbin/jk_chrootsh >> /etc/shells ;\
- fi \
- fi
-
uninstall:
rm -f ${iniprefix}/*.ini
@@ -83,5 +74,3 @@
@cd man/ && $(MAKE) uninstall
@cd src/ && $(MAKE) uninstall
-rmdir --ignore-fail-on-non-empty ${DESTDIR}${iniprefix}
- @echo "You must manually remove jk_chrootsh from /etc/shells"
-# remove jk_chrootsh from /etc/shells

7
shells/jailkit/pkg-descr Normal file
View File

@ -0,0 +1,7 @@
Jailkit is a set of utilities to limit user accounts to specific
files using chroot() and or specific commands.
Setting up a chroot shell, a shell limited to some specific
command, or a daemon inside a chroot jail is a lot easier and
can be automated using these utilities.
WWW: http://olivier.sessink.nl/jailkit/

24
shells/jailkit/pkg-plist Normal file
View File

@ -0,0 +1,24 @@
bin/jk_uchroot
etc/jailkit/jk_check.ini
etc/jailkit/jk_init.ini
etc/jailkit/jk_lsh.ini
etc/jailkit/jk_socketd.ini
etc/jailkit/jk_chrootsh.ini
etc/jailkit/jk_update.ini
sbin/jk_chrootlaunch
sbin/jk_chrootsh
sbin/jk_cp
sbin/jk_init
sbin/jk_check
sbin/jk_addjailuser
sbin/jk_jailuser
sbin/jk_list
sbin/jk_update
sbin/jk_lsh
sbin/jk_socketd
@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v jk_chrootsh /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v jk_chrootsh /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
%%DATADIR%%/jk_lib.py
%%DATADIR%%/jk_lib.pyc
@dirrm %%DATADIR%%
@dirrmtry etc/jailkit