Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 99120

Summary: Portage 2.0.51.22-r1 with ccache and userpriv set checks CCACHE_DIR permissions incorrectly
Product: Portage Development Reporter: Jeremy Barton <sixteen-gentoo>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: vdaghan
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 108082    
Attachments: patch of the /usr/lib/portage/pym/portage.py

Description Jeremy Barton 2005-07-15 09:21:00 UTC
In combination with bug #99101, the ccache+userpriv permissions checking also
compares the directory UID with the portage GID.  While these are normally the
same it is not, in fact, what the code modifies.

Suggest changing it to either
mystat[stat.ST_UID] != portage_uid
or
mystat[stat.ST_GID] != portage_gid

probably the latter.


Reproducible: Always
Steps to Reproduce:
Code defect
Comment 1 Jaroslav Henner 2005-08-04 13:54:20 UTC
Created attachment 65095 [details, diff]
patch of the /usr/lib/portage/pym/portage.py
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-09 17:54:25 UTC
Looks good to me, if portage's GID is not equal to the UID then all kinds of 
permission changes get triggers, even through they aren't needed.  A quick check 
shows stable could use it.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-08-31 10:23:53 UTC
*** Bug 104392 has been marked as a duplicate of this bug. ***
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-10-04 23:39:13 UTC
Fixed in 2.0.53_rc3