From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1A50A138334 for ; Sat, 23 Jun 2018 09:24:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0B9E8E092C; Sat, 23 Jun 2018 09:24:09 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B92BCE092C for ; Sat, 23 Jun 2018 09:24:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B0EDD335C8A for ; Sat, 23 Jun 2018 09:24:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 668912E6 for ; Sat, 23 Jun 2018 09:24:04 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1529745738.294f1a18f3271f7d506d346c2a514a2afa6ce8ec.ulm@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/doebuild.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 294f1a18f3271f7d506d346c2a514a2afa6ce8ec X-VCS-Branch: master Date: Sat, 23 Jun 2018 09:24:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 38cf6d22-f278-4f45-a933-162bdbc488be X-Archives-Hash: d5ab3842c546660c7c668f416dff0380 commit: 294f1a18f3271f7d506d346c2a514a2afa6ce8ec Author: Ulrich Müller gentoo org> AuthorDate: Sat Jun 23 09:22:18 2018 +0000 Commit: Ulrich Müller gentoo 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