ports/148211: New port: www/shellinabox, Publish command line shell through AJAX interface
Olivier Cochard-Labbé
olivier at cochard.me
Mon Jun 28 13:40:04 UTC 2010
>Number: 148211
>Category: ports
>Synopsis: New port: www/shellinabox, Publish command line shell through AJAX interface
>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 Jun 28 13:40:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Olivier Cochard-Labbé
>Release: 8.1-RC1
>Organization:
>Environment:
FreeBSD d630.bsdrp.net 8.1-RC1 FreeBSD 8.1-RC1 #71: Fri Jun 18 09:23:17 CEST 2010 root at d630.bsdrp.net:/usr/obj/usr/src/sys
/DellD630 amd64
>Description:
Hi,
here is a new port: www/shellinabox
Shell In A Box is a web server that can export arbitary command line tools to a
web based terminal emulator.
This port creates a user and a group "shellinabox": I've used the UID/GID 139 that seem available.
The diff file for /usr/ports/UIDs and GIDs are included:
cd /usr/ports/www/shellinabox
patch ../../UIDs UIDs.diff
patch ../../GIDs GIDs.diff
The users tests results and comments are on the FreeBSD port mailing-list:
http://lists.freebsd.org/pipermail/freebsd-ports/2010-June/062067.html
It's work on FreeBSD 7.3, 8.0 and 8.1.
On 9-current there is a compilation error related to the new utmpx subsystem changes included in 9-current, but I don't have 9-current for testing/fixing it.
One user have a problem for starting it under Virtualbox, but I wasn't able to reproduce his error.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
# 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:
#
# shellinabox
# shellinabox/Makefile
# shellinabox/pkg-descr
# shellinabox/distinfo
# shellinabox/files
# shellinabox/files/shellinaboxd.in
# shellinabox/pkg-plist
# shellinabox/UIDs.diff
# shellinabox/GIDs.diff
#
echo c - shellinabox
mkdir -p shellinabox > /dev/null 2>&1
echo x - shellinabox/Makefile
sed 's/^X//' >shellinabox/Makefile << '4c2789fc20c838f62d4fb65647442462'
X# New ports collection makefile for: shellinabox
X# Date created: 25 june 2010
X# Whom: Olivier Cochard-Labbe <olivier at cochard.me>
X#
X# $FreeBSD$
X#
X
XPORTNAME= shellinabox
XPORTVERSION= 2.10
XCATEGORIES= www
XMASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
XDISTNAME= ${PORTNAME}-${PORTVERSION}
X
XMAINTAINER= olivier at cochard.me
XCOMMENT= Publish command line shell through AJAX interface
X
XHAS_CONFIGURE= yes
XCONFIGURE_ARGS= \
X --prefix=${PREFIX} \
X --infodir=${PREFIX}/${INFO_PATH} \
X --mandir=${MANPREFIX}/man
X
XLICENSE= GPLv2
XLICENSE_FILE= ${WRKSRC}/COPYING
X
XUSE_RC_SUBR= shellinaboxd
XUSERS= shellinabox
XGROUPS= shellinabox
X
XMAN1= shellinaboxd.1
X
XPORTDOCS= AUTHORS ChangeLog INSTALL README COPYING GPL-2 NEWS TODO \
X black-on-white.css monochrome.css color.css white-on-black.css
X
Xpost-install:
X @${MKDIR} ${PREFIX}/etc/shellinabox
X @${CHMOD} 700 ${PREFIX}/etc/shellinabox
X @${CHOWN} shellinabox:shellinabox ${PREFIX}/etc/shellinabox
X
X.include <bsd.port.mk>
4c2789fc20c838f62d4fb65647442462
echo x - shellinabox/pkg-descr
sed 's/^X//' >shellinabox/pkg-descr << 'ef769dc6c8c796318d8dbca538de1c78'
XShell In A Box is a web server that can export arbitary command line tools to a
Xweb based terminal emulator
X
XWWW: http://code.google.com/p/shellinabox/
ef769dc6c8c796318d8dbca538de1c78
echo x - shellinabox/distinfo
sed 's/^X//' >shellinabox/distinfo << '1cc9c9e296e9f167ad399d552435c13f'
XMD5 (shellinabox-2.10.tar.gz) = 0e144910d85d92edc54702ab9c46f032
XSHA256 (shellinabox-2.10.tar.gz) = 9a2dfa14fcb050de6f450b3b53522f2106cdef4a5591e3e41bd00de1e11d43cb
XSIZE (shellinabox-2.10.tar.gz) = 513430
1cc9c9e296e9f167ad399d552435c13f
echo c - shellinabox/files
mkdir -p shellinabox/files > /dev/null 2>&1
echo x - shellinabox/files/shellinaboxd.in
sed 's/^X//' >shellinabox/files/shellinaboxd.in << '2815a5ab0be5ef5cf0212c458d395ef7'
X#!/bin/sh
X
X# $FreeBSD$
X#
X# Shell in a Box Daemon startup script
X#
X# PROVIDE: shellinaboxd
X# REQUIRE: login
X# KEYWORD: shutdown
X
X#
X# Add the following to /etc/rc.conf[.local] to enable this service
X#
X# shellinaboxd_enable="YES"
X#
X# You can fine tune others variables too:
X# shellinaboxd_fib="NONE"
X# shellinaboxd_pidfile="/var/run/shellinabox.pid"
X# shellinaboxd_port="4200"
X# shellinaboxd_certdir="%%PREFIX%%/etc/shellinabox"
X# shellinaboxd_flags=""
X
Xshellinaboxd_setfib() {
X sysctl net.fibs >/dev/null 2>&1 || return 0
X
X case "$shellinaboxd_fib" in
X [Nn][Oo][Nn][Ee])
X ;;
X *)
X command="setfib -F ${shellinaboxd_fib} ${command}"
X ;;
X esac
X}
X
X. /etc/rc.subr
X
Xname="shellinaboxd"
Xrcvar=`set_rcvar`
X
Xcommand="%%PREFIX%%/bin/${name}"
Xstart_precmd="shellinaboxd_setfib"
X
Xload_rc_config $name
X
Xshellinaboxd_enable=${shellinaboxd_enable:-"NO"}
Xshellinaboxd_fib=${shellinaboxd_fib:-"NONE"}
Xshellinaboxd_port=${shellinaboxd_port:-"4200"}
Xshellinaboxd_certdir=${shellinaboxd_certdir:-"%%PREFIX%%/etc/shellinabox"}
X
Xpidfile=${shellinaboxd_pidfile:-"/var/run/shellinaboxd.pid"}
X
Xrequired_dirs="${shellinaboxd_certdir}"
X
Xcommand_args="--group=shellinabox --user=shellinabox --port=${shellinaboxd_port} --cert=${shellinaboxd_certdir} --background=${pidfile}"
X
Xrun_rc_command "$1"
2815a5ab0be5ef5cf0212c458d395ef7
echo x - shellinabox/pkg-plist
sed 's/^X//' >shellinabox/pkg-plist << 'afba1e76039bbb082bb92c6c746f09d1'
Xbin/shellinaboxd
X at exec mkdir -p %D/etc/shellinabox
X at exec chmod 777 %D/etc/shellinabox
X at exec chown nobody %D/etc/shellinabox
X at unexec rmdir %D/etc/shellinabox 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf %%PREFIX%%/etc/shellinabox`` to remove the SSL certificate left." | fmt
afba1e76039bbb082bb92c6c746f09d1
echo x - shellinabox/UIDs.diff
sed 's/^X//' >shellinabox/UIDs.diff << 'dd5054c365b08bad9b9bb3624e235982'
X--- UIDs.orig 2010-06-28 13:02:46.000000000 +0200
X+++ UIDs 2010-06-28 13:03:38.000000000 +0200
X@@ -78,6 +78,7 @@
X dhcpd:*:136:136::0:0:ISC DHCP daemon:/nonexistent:/usr/sbin/nologin
X mpd:*:137:137::0:0:MusicPD pseudo-user:/usr/local/var/mpd:/usr/sbin/nologin
X wolfpack:*:138:138::0:0:Wolfpack Empire Server:/usr/local/share/wolfpack:/usr/sbin/nologin
X+shellinabox:*:139:139::0:0:Shell In A Box:/nonexistent:/usr/sbin/nologin
X cricket:*:141:80::0:0:Cricket Monitoring User:/usr/local/cricket:/usr/sbin/nologin
X ladvd:*:142:142::0:0:Ladvd User:/var/empty:/usr/sbin/nologin
X dovecot:*:143:143::0:0:Dovecot User:/var/empty:/usr/sbin/nologin
dd5054c365b08bad9b9bb3624e235982
echo x - shellinabox/GIDs.diff
sed 's/^X//' >shellinabox/GIDs.diff << 'bb4eeafd5e678cd5d32a72b2e10a7cd7'
X--- GIDs.orig 2010-06-28 13:02:56.000000000 +0200
X+++ GIDs 2010-06-28 13:04:02.000000000 +0200
X@@ -70,6 +70,7 @@
X dhcpd:*:136:
X mpd:*:137:
X wolfpack:*:138:
X+shellinabox:*:139:
X ladvd:*:142:
X dovecot:*:143:
X rbldns:*:153:
bb4eeafd5e678cd5d32a72b2e10a7cd7
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list