diff options
author | ijliao <ijliao@FreeBSD.org> | 2002-04-02 16:08:26 +0000 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2002-04-02 16:08:26 +0000 |
commit | d479dcb23754a8092c48f496afd82093741c592b (patch) | |
tree | 9707677bb516806c0b16c5b7c2c5953136d85e75 /games/quakeserver | |
parent | dd9919df4f92521bff8366f6d29a7777b3a4244a (diff) | |
download | FreeBSD-ports-d479dcb23754a8092c48f496afd82093741c592b.zip FreeBSD-ports-d479dcb23754a8092c48f496afd82093741c592b.tar.gz |
fix file ownership problem
PR: 33795
Submitted by: Lyndon Nerenberg <lyndon@atg.aciworldwide.com>
Diffstat (limited to 'games/quakeserver')
-rw-r--r-- | games/quakeserver/Makefile | 21 | ||||
-rw-r--r-- | games/quakeserver/files/quakeserver.sh | 4 | ||||
-rw-r--r-- | games/quakeserver/files/readme.port | 6 | ||||
-rw-r--r-- | games/quakeserver/pkg-plist | 9 |
4 files changed, 22 insertions, 18 deletions
diff --git a/games/quakeserver/Makefile b/games/quakeserver/Makefile index 6bd1520..4957f68 100644 --- a/games/quakeserver/Makefile +++ b/games/quakeserver/Makefile @@ -13,7 +13,7 @@ MASTER_SITES= ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/old/ \ DISTFILES= unixded-${PORTVERSION}-i386-unknown-bsdi3.0.tar.gz \ quake106.zip -MAINTAINER= ports@freebsd.org +MAINTAINER= ports@FreeBSD.org BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip \ lha:${PORTSDIR}/archivers/lha @@ -37,21 +37,26 @@ do-configure: @ ${CP} ${FILESDIR}/stopserver.sh ${WRKSRC} @ ${SETENV} ${MAKE_ENV} ${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/readme.port ${WRKSRC}/quakeserver.sh ${WRKSRC}/qserver.sh ${WRKSRC}/stopserver.sh +pre-install: + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + do-install: @ ${MKDIR} ${PREFIX}/quakeserver @ ${MKDIR} ${PREFIX}/quakeserver/id1 ${INSTALL_DATA} ${WRKSRC}/id1/pak0.pak ${PREFIX}/quakeserver/id1 - ${INSTALL} -c -o nobody -g nobody -m 0500 ${WRKSRC}/unixded ${PREFIX}/quakeserver + ${INSTALL} -c -g quakerun -m 0510 ${WRKSRC}/unixded ${PREFIX}/quakeserver ${INSTALL_DATA} ${WRKSRC}/readme.unixded ${PREFIX}/quakeserver ${INSTALL_DATA} ${WRKSRC}/readme.port ${PREFIX}/quakeserver - ${INSTALL_SCRIPT} -m 0750 ${WRKSRC}/quakeserver.sh ${PREFIX}/etc/rc.d - ${INSTALL} -c -o nobody -g nobody -m 0500 ${WRKSRC}/qserver.sh ${PREFIX}/quakeserver - ${INSTALL} -c -o nobody -g nobody -m 0500 ${WRKSRC}/stopserver.sh ${PREFIX}/quakeserver + ${INSTALL_SCRIPT} -m 0755 ${WRKSRC}/quakeserver.sh ${PREFIX}/etc/rc.d + ${INSTALL} -c -m 0755 ${WRKSRC}/qserver.sh ${PREFIX}/quakeserver + ${INSTALL} -c -m 0755 ${WRKSRC}/stopserver.sh ${PREFIX}/quakeserver + ${TOUCH} ${PREFIX}/quakeserver/quakeserver.log + ${CHOWN} :quakerun ${PREFIX}/quakeserver/quakeserver.log + ${CHMOD} 660 ${PREFIX}/quakeserver/quakeserver.log @ ${RM} -f ${PREFIX}/quakeserver/quakeserver.in /usr/bin/mkfifo ${PREFIX}/quakeserver/quakeserver.in - ${TOUCH} ${PREFIX}/quakeserver/quakeserver.log - @ ${CHMOD} 700 ${PREFIX}/quakeserver/quakeserver.in ${PREFIX}/quakeserver/quakeserver.log - @ ${CHOWN} -R nobody:nobody ${PREFIX}/quakeserver + @ ${CHMOD} 660 ${PREFIX}/quakeserver/quakeserver.in + @ ${CHOWN} :quakerun ${PREFIX}/quakeserver/quakeserver.in .if !defined(BATCH) @ /usr/bin/more -e ${PREFIX}/quakeserver/readme.port .endif diff --git a/games/quakeserver/files/quakeserver.sh b/games/quakeserver/files/quakeserver.sh index 34ce6242..3b138d6 100644 --- a/games/quakeserver/files/quakeserver.sh +++ b/games/quakeserver/files/quakeserver.sh @@ -5,12 +5,12 @@ case "$1" in start) if [ -x %%PREFIX%%/quakeserver/unixded ] then - su nobody -c %%PREFIX%%/quakeserver/qserver.sh \ + echo %%PREFIX%%/quakeserver/qserver.sh | su -m quakerun \ && echo -n ' quakeserver' fi ;; stop) - su nobody -c %%PREFIX%%/quakeserver/qserver.sh && echo -n ' quakeserver' + echo killall unixded | su -m quakerun && echo -n ' quakeserver' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 diff --git a/games/quakeserver/files/readme.port b/games/quakeserver/files/readme.port index 124c072..6ec778f 100644 --- a/games/quakeserver/files/readme.port +++ b/games/quakeserver/files/readme.port @@ -23,7 +23,7 @@ and look at the suggestions in qserver.sh. The startup procedure for the server is: -%%PREFIX%%/etc/rc.d/quakeserver.sh runs the server as user 'nobody'. +%%PREFIX%%/etc/rc.d/quakeserver.sh runs the server as user 'quakerun'. Input is redirected from the named pipe %%PREFIX%%/quakeserver/quakeserver.in @@ -35,10 +35,6 @@ and output is redirected to You can see the output of the console by viewing quakeserver.log, and feed commands to the server by echoing them into quakeserver.in. -NOTE THAT THIS COULD REPRESENT A SECURITY RISK ON MACHINES RUNNING WEB -SERVERS AS USER 'nobody'. If your system does this, please create an -alternate pseudo-user to run the server as. - One of the frequently asked questions about this port is how to run a registered server. It's pretty simple. If you want to run just a shareware server, copy the files from the ID1/ subdirectory of an installed copy of diff --git a/games/quakeserver/pkg-plist b/games/quakeserver/pkg-plist index 770a7927..499265d 100644 --- a/games/quakeserver/pkg-plist +++ b/games/quakeserver/pkg-plist @@ -1,14 +1,17 @@ etc/rc.d/quakeserver.sh quakeserver/id1/pak0.pak quakeserver/unixded +@exec chown quakerun:quakerun %D/quakeserver/unixded quakeserver/readme.unixded quakeserver/readme.port quakeserver/qserver.sh quakeserver/stopserver.sh quakeserver/quakeserver.log +@exec chown quakerun:quakerun %D/quakeserver/quakeserver.log +@exec chmod 664 %D/quakeserver/quakeserver.log @exec mkfifo %D/quakeserver/quakeserver.in -@exec chown nobody:nobody %D/quakeserver/quakeserver.in -@exec chmod 700 %D/quakeserver/quakeserver.in -@unexec rm -f %D/quakeserver/quakeserver.in +@exec chown quakerun:quakerun %D/quakeserver/quakeserver.in +@exec chmod 660 %D/quakeserver/quakeserver.in +@unexec rm -f %D/quakeserver/quakeserver.in %D/quakeserver/quakeserver.log @dirrm quakeserver/id1 @dirrm quakeserver |