Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
Date: Sat, 23 Jun 2018 09:24:10
Message-Id: 1529745738.294f1a18f3271f7d506d346c2a514a2afa6ce8ec.ulm@gentoo
1 commit: 294f1a18f3271f7d506d346c2a514a2afa6ce8ec
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 23 09:22:18 2018 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 23 09:22:18 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=294f1a18
7
8 Revert "_post_src_install_uid_fix: allow files with portage group permissions (bug 600804)"
9
10 This reverts commit f479a4cdcac5db92231f489f232f10eb934c6f12.
11 Acked by zmedico in #gentoo-portage.
12
13 Bug: https://bugs.gentoo.org/600804
14
15 pym/portage/package/ebuild/doebuild.py | 9 +++------
16 1 file changed, 3 insertions(+), 6 deletions(-)
17
18 diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
19 index 0e94de805..97a9199a3 100644
20 --- a/pym/portage/package/ebuild/doebuild.py
21 +++ b/pym/portage/package/ebuild/doebuild.py
22 @@ -2045,7 +2045,7 @@ def _postinst_bsdflags(mysettings):
23 def _post_src_install_uid_fix(mysettings, out):
24 """
25 Files in $D with user and group bits that match the "portage"
26 - user and group are automatically mapped to PORTAGE_INST_UID and
27 + user or group are automatically mapped to PORTAGE_INST_UID and
28 PORTAGE_INST_GID if necessary. The chown system call may clear
29 S_ISUID and S_ISGID bits, so those bits are restored if
30 necessary.
31 @@ -2191,11 +2191,8 @@ def _post_src_install_uid_fix(mysettings, out):
32 mystat.st_ino not in counted_inodes:
33 counted_inodes.add(mystat.st_ino)
34 size += mystat.st_size
35 -
36 - # Only remap the UID/GID if both match the portage user,
37 - # in order to avoid interference with ebuilds that install
38 - # files with portage group permissions (see bug 600804).
39 - if (mystat.st_uid, mystat.st_gid) != (portage_uid, portage_gid):
40 + if mystat.st_uid != portage_uid and \
41 + mystat.st_gid != portage_gid:
42 continue
43 myuid = -1
44 mygid = -1