commit:     294f1a18f3271f7d506d346c2a514a2afa6ce8ec
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 23 09:22:18 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jun 23 09:22:18 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=294f1a18

Revert "_post_src_install_uid_fix: allow files with portage group permissions 
(bug 600804)"

This reverts commit f479a4cdcac5db92231f489f232f10eb934c6f12.
Acked by zmedico in #gentoo-portage.

Bug: https://bugs.gentoo.org/600804

 pym/portage/package/ebuild/doebuild.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/pym/portage/package/ebuild/doebuild.py 
b/pym/portage/package/ebuild/doebuild.py
index 0e94de805..97a9199a3 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -2045,7 +2045,7 @@ def _postinst_bsdflags(mysettings):
 def _post_src_install_uid_fix(mysettings, out):
        """
        Files in $D with user and group bits that match the "portage"
-       user and group are automatically mapped to PORTAGE_INST_UID and
+       user or group are automatically mapped to PORTAGE_INST_UID and
        PORTAGE_INST_GID if necessary. The chown system call may clear
        S_ISUID and S_ISGID bits, so those bits are restored if
        necessary.
@@ -2191,11 +2191,8 @@ def _post_src_install_uid_fix(mysettings, out):
                                        mystat.st_ino not in counted_inodes:
                                        counted_inodes.add(mystat.st_ino)
                                        size += mystat.st_size
-
-                               # Only remap the UID/GID if both match the 
portage user,
-                               # in order to avoid interference with ebuilds 
that install
-                               # files with portage group permissions (see bug 
600804).
-                               if (mystat.st_uid, mystat.st_gid) != 
(portage_uid, portage_gid):
+                               if mystat.st_uid != portage_uid and \
+                                       mystat.st_gid != portage_gid:
                                        continue
                                myuid = -1
                                mygid = -1

Reply via email to