diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2008-04-26 15:50:35 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2008-04-26 15:50:35 +0000 |
commit | 858e942784359810ccdaf3c27a818e875e6e0495 (patch) | |
tree | e48f7e5f1055a769595b346a266690dcb495c838 /eclass | |
parent | Actually do the removal. (diff) | |
download | historical-858e942784359810ccdaf3c27a818e875e6e0495.tar.gz historical-858e942784359810ccdaf3c27a818e875e6e0495.tar.bz2 historical-858e942784359810ccdaf3c27a818e875e6e0495.zip |
Make sure only files in GAMES_STATEDIR are writable.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/games.eclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/eclass/games.eclass b/eclass/games.eclass index c2f727e800aa..d8ab7d1c8d94 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.124 2008/02/15 00:15:51 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.125 2008/04/26 15:50:35 mr_bones_ Exp $ # devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org -> games@gentoo.org # @@ -82,7 +82,7 @@ games_make_wrapper() { gameswrapper ${FUNCNAME/games_} "$@"; } gamesowners() { chown ${GAMES_USER}:${GAMES_GROUP} "$@"; } gamesperms() { chmod u+rw,g+r-w,o-rwx "$@"; } prepgamesdirs() { - local dir f + local dir f mode for dir in \ "${GAMES_PREFIX}" "${GAMES_PREFIX_OPT}" "${GAMES_DATADIR}" \ "${GAMES_SYSCONFDIR}" "${GAMES_STATEDIR}" "$(games_get_libdir)" \ @@ -92,7 +92,9 @@ prepgamesdirs() { ( gamesowners -R "${D}/${dir}" find "${D}/${dir}" -type d -print0 | xargs -0 chmod 750 - find "${D}/${dir}" -type f -print0 | xargs -0 chmod o-rwx,g+r + mode=o-rwx,g+r,g-w + [[ ${dir} = ${GAMES_STATEDIR} ]] && mode=o-rwx,g+r + find "${D}/${dir}" -type f -print0 | xargs -0 chmod $mode ) &>/dev/null f=$(find "${D}/${dir}" -perm +4000 -a -uid 0 2>/dev/null) if [[ -n ${f} ]] ; then |