aboutsummaryrefslogtreecommitdiffstats
path: root/audio/teamspeak_server
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-09-05 12:46:06 +0800
committeredwin <edwin@FreeBSD.org>2003-09-05 12:46:06 +0800
commit3378c2a3d778bbc3df2218454ae9aa3ee3a33c22 (patch)
tree72c256d9fa1a681002f52215f68ed34e3bc5f513 /audio/teamspeak_server
parentb64fa6762a04c06fe1caa16240cc67fb5050b5c6 (diff)
downloadfreebsd-ports-gnome-3378c2a3d778bbc3df2218454ae9aa3ee3a33c22.tar.gz
freebsd-ports-gnome-3378c2a3d778bbc3df2218454ae9aa3ee3a33c22.tar.zst
freebsd-ports-gnome-3378c2a3d778bbc3df2218454ae9aa3ee3a33c22.zip
iMinor teamspeak_server port update
This patch by crtxreavr@trioptimum.com to prevent users from read passwords out of the log file and database. Also runs the server as the nobody user. PR: ports/56464 Submitted by: Daniel O'Connor <darius@dons.net.au>
Diffstat (limited to 'audio/teamspeak_server')
-rw-r--r--audio/teamspeak_server/Makefile4
-rw-r--r--audio/teamspeak_server/files/teamspeak_server.sh27
2 files changed, 18 insertions, 13 deletions
diff --git a/audio/teamspeak_server/Makefile b/audio/teamspeak_server/Makefile
index da617aab8ddd..0fe09f734c58 100644
--- a/audio/teamspeak_server/Makefile
+++ b/audio/teamspeak_server/Makefile
@@ -7,6 +7,7 @@
PORTNAME= teamspeak_server
PORTVERSION= 2.0.19.40
+PORTREVISION=1
CATEGORIES= audio net
MASTER_SITES= http://www.teamspeak.org/files/ \
ftp://ftp.ngz-network.de/pub/11/4/releases/ \
@@ -25,7 +26,8 @@ NO_FILTER_SHLIBS=yes
do-install:
${MKDIR} ${PREFIX}/lib/teamspeak_server
${TAR} -C ${WRKSRC} -cf - . | ${TAR} -C ${PREFIX}/lib/teamspeak_server -xf -
- ${CHMOD} -R u+w ${PREFIX}/lib/teamspeak_server
+ ${CHOWN} -R nobody:nobody ${PREFIX}/lib/teamspeak_server
+ ${CHMOD} -R u+w,o-rx ${PREFIX}/lib/teamspeak_server
${SED} -e 's#%%TSHOME%%#${PREFIX}/lib/teamspeak_server#' <${FILESDIR}/teamspeak_server.sh >${WRKSRC}/teamspeak_server.sh
${INSTALL_SCRIPT} ${WRKSRC}/teamspeak_server.sh ${PREFIX}/etc/rc.d/
${RM} ${WRKSRC}/teamspeak_server.sh
diff --git a/audio/teamspeak_server/files/teamspeak_server.sh b/audio/teamspeak_server/files/teamspeak_server.sh
index 3f9ffdde1213..cfff238856a7 100644
--- a/audio/teamspeak_server/files/teamspeak_server.sh
+++ b/audio/teamspeak_server/files/teamspeak_server.sh
@@ -9,18 +9,21 @@ PIDFILE=${TSHOME}/server.pid
cd "$TSHOME"
case "$1" in
- start)
- ./server_linux >/dev/null 2>&1
- ;;
- stop)
- kill -TERM `cat "$PIDFILE"`
- ;;
- restart)
- $0 stop && $0 start || exit 1
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
+ start)
+ su -fm nobody -c './server_linux >/dev/null 2>&1' && echo -n ' teamspeak_server'
+ ;;
+ stop)
+ kill -TERM `cat "$PIDFILE"`
+ ;;
+ restart)
+ $0 stop
+ echo 5 second pause before restart. . .
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
esac
exit 0