Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 149140 Details for
Bug 162542
portage doesn't fix CCACHE_DIR permissions w/ userpriv/usersandbox in FEATURES
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
check permissions inside CCACHE_DIR
userpriv.patch (text/plain), 1.64 KB, created by
Zac Medico
on 2008-04-08 22:50:16 UTC
(
hide
)
Description:
check permissions inside CCACHE_DIR
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2008-04-08 22:50:16 UTC
Size:
1.64 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 9759) >+++ pym/portage.py (revision 9760) >@@ -4234,12 +4234,34 @@ > if droppriv: > st = os.stat(mydir) > if st.st_gid != portage_gid or \ >- not stat.S_IMODE(st.st_mode) & dirmode: >+ not dirmode == (stat.S_IMODE(st.st_mode) & dirmode): > droppriv_fix = True >+ if not droppriv_fix: >+ # Check permissions of files in the directory. >+ for filename in os.listdir(mydir): >+ try: >+ subdir_st = os.lstat( >+ os.path.join(mydir, filename)) >+ except OSError: >+ continue >+ if subdir_st.st_gid != portage_gid or \ >+ ((stat.S_ISDIR(subdir_st.st_mode) and \ >+ not dirmode == (stat.S_IMODE(subdir_st.st_mode) & dirmode)) or \ >+ (not stat.S_ISDIR(subdir_st.st_mode) and \ >+ not filemode == (stat.S_IMODE(subdir_st.st_mode) & filemode))): >+ droppriv_fix = True >+ break >+ if droppriv_fix: >+ writemsg(colorize("WARN", " * ") + \ >+ "Adjusting permissions " + \ >+ "for FEATURES=userpriv: '%s'\n" % mydir, >+ noiselevel=-1) >+ elif modified: >+ writemsg(colorize("WARN", " * ") + \ >+ "Adjusting permissions " + \ >+ "for FEATURES=%s: '%s'\n" % (myfeature, mydir), >+ noiselevel=-1) > if modified or kwargs["always_recurse"] or droppriv_fix: >- if modified: >- writemsg("Adjusting permissions recursively: '%s'\n" % mydir, >- noiselevel=-1) > def onerror(e): > raise # The feature is disabled if a single error > # occurs during permissions adjustment.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 162542
:
140638
| 149140