nethack: use setgid instead of setuid, to access user's config file.

This commit is contained in:
Christian Neukirchen 2015-01-23 13:08:05 +01:00
parent 5564772c57
commit 2381f2437f
2 changed files with 5 additions and 3 deletions

View File

@ -1,8 +1,10 @@
case "${ACTION}" in case "${ACTION}" in
post) post)
chown nethack:nethack usr/lib/nethack/nethack chown nethack:nethack usr/lib/nethack/nethack
chmod 04755 usr/lib/nethack/nethack chmod 02755 usr/lib/nethack/nethack
touch var/games/nethack/logfile var/games/nethack/perm var/games/nethack/record touch var/games/nethack/logfile var/games/nethack/perm var/games/nethack/record
chown nethack:nethack var/games/nethack var/games/nethack/* chown nethack:nethack var/games/nethack var/games/nethack/*
chmod 0775 var/games/nethack
chmod 0664 var/games/nethack/logfile var/games/nethack/perm var/games/nethack/record
;; ;;
esac esac

View File

@ -1,8 +1,8 @@
# Template file for 'nethack' # Template file for 'nethack'
pkgname=nethack pkgname=nethack
version=3.4.3 version=3.4.3
revision=1 revision=2
make_dirs="/var/games/nethack/save 0755 nethack root" make_dirs="/var/games/nethack/save 0775 nethack nethack"
system_accounts="$pkgname" system_accounts="$pkgname"
nethack_homedir="/var/empty" nethack_homedir="/var/empty"
hostmakedepends="ncurses-devel flex groff" hostmakedepends="ncurses-devel flex groff"