Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: games.eclass
Date: Sat, 26 Apr 2008 15:50:39
Message-Id: E1Jpmfc-0002aH-3e@stork.gentoo.org
1 mr_bones_ 08/04/26 15:50:36
2
3 Modified: games.eclass
4 Log:
5 Make sure only files in GAMES_STATEDIR are writable.
6
7 Revision Changes Path
8 1.125 eclass/games.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games.eclass?rev=1.125&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games.eclass?rev=1.125&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games.eclass?r1=1.124&r2=1.125
13
14 Index: games.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/games.eclass,v
17 retrieving revision 1.124
18 retrieving revision 1.125
19 diff -u -r1.124 -r1.125
20 --- games.eclass 15 Feb 2008 00:15:51 -0000 1.124
21 +++ games.eclass 26 Apr 2008 15:50:35 -0000 1.125
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.124 2008/02/15 00:15:51 nyhm Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.125 2008/04/26 15:50:35 mr_bones_ Exp $
27
28 # devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org -> games@g.o
29 #
30 @@ -82,7 +82,7 @@
31 gamesowners() { chown ${GAMES_USER}:${GAMES_GROUP} "$@"; }
32 gamesperms() { chmod u+rw,g+r-w,o-rwx "$@"; }
33 prepgamesdirs() {
34 - local dir f
35 + local dir f mode
36 for dir in \
37 "${GAMES_PREFIX}" "${GAMES_PREFIX_OPT}" "${GAMES_DATADIR}" \
38 "${GAMES_SYSCONFDIR}" "${GAMES_STATEDIR}" "$(games_get_libdir)" \
39 @@ -92,7 +92,9 @@
40 (
41 gamesowners -R "${D}/${dir}"
42 find "${D}/${dir}" -type d -print0 | xargs -0 chmod 750
43 - find "${D}/${dir}" -type f -print0 | xargs -0 chmod o-rwx,g+r
44 + mode=o-rwx,g+r,g-w
45 + [[ ${dir} = ${GAMES_STATEDIR} ]] && mode=o-rwx,g+r
46 + find "${D}/${dir}" -type f -print0 | xargs -0 chmod $mode
47 ) &>/dev/null
48 f=$(find "${D}/${dir}" -perm +4000 -a -uid 0 2>/dev/null)
49 if [[ -n ${f} ]] ; then
50
51
52
53 --
54 gentoo-commits@l.g.o mailing list