Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196720 - glibc-2.7 introduces new fopen() flag which breaks sandbox
Summary: glibc-2.7 introduces new fopen() flag which breaks sandbox
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 198509 201409 (view as bug list)
Depends on: 182361
Blocks:
  Show dependency tree
 
Reported: 2007-10-22 17:08 UTC by SpanKY
Modified: 2009-01-23 00:06 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2007-10-22 17:08:03 UTC
any machine using glibc-2.7 gets sandbox failures on just about anything (usually complaining about /etc/passwd and /etc/group when they get opened for reading *only*)

27502 open("/etc/group", O_RDONLY|0x80000 /* O_??? */) = 5

the new flag 0x80000 causes the failure
Comment 1 SpanKY gentoo-dev 2007-10-22 19:48:54 UTC
# define O_CLOEXEC     02000000 /* Set close_on_exec.  */

(in hex, that is 0x80000)
Comment 2 David Pyke 2007-10-23 14:17:48 UTC
Is it possible to have the glibc-2.7 ebuild masked as opposed to having a die command with a note to review this bug?

While this is a very interesting bug, it doesn't offer suggestions as to how to overcome the upgrade issue.
Comment 3 SpanKY gentoo-dev 2007-10-23 17:00:33 UTC
(1) it is masked seeing as how it doesnt have any KEYWORDS
(2) there is no solution in the message because none currently exists
Comment 4 SpanKY gentoo-dev 2007-10-23 23:45:17 UTC
looks like the "e" fopen() for cloexec pisses it off

fixed in 1.2.18.1-r2
Comment 5 SpanKY gentoo-dev 2007-11-10 09:11:11 UTC
*** Bug 198509 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Triller 2007-11-10 16:59:35 UTC
Alright, went back to glibc 2.6.1, and portage emerges fine with sandbox

but still: someone needs to fix it for glibc 2.7...
Comment 7 SpanKY gentoo-dev 2007-11-10 21:50:51 UTC
it's already been fixed, hence the bug being closed as "FIXED"
Comment 8 Maurice Volaski 2007-11-16 04:36:50 UTC
In case anyone gets trapped in a catch-22 where glibc-2.7 got installed and now they can't emerge the new sandbox or anything for that matter, execute 

export FEATURES="-sandbox" 

and then you can emerge the new sandbox. 
Comment 9 SpanKY gentoo-dev 2007-11-16 06:21:50 UTC
"got installed" implies the package should have been on your system when there's absolutely no way it could have been without the user putting glibc into accept keywords locally

at any rate, that should work, but if it doesnt, i just do:
rm /usr/lib/libsandbox*
emerge sandbox
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-12-05 19:47:53 UTC
*** Bug 201409 has been marked as a duplicate of this bug. ***
Comment 11 Kevin J Meagher 2007-12-05 20:30:57 UTC
it looks like this was caused by a bug in portage
the new version of sandbox failed, but then emerge --resume --skipfirst went a ahead and installed the version of glibc that depended on sandbox without it being at the right version
Comment 12 SpanKY gentoo-dev 2007-12-05 22:48:50 UTC
--skipfirst is a powerful tool ... portage isnt going to protect you from doing something stupid with it

there are related feature requests in portage, but you telling emerge to do something dumb isnt a bug in portage
Comment 13 SpanKY gentoo-dev 2008-11-09 08:01:46 UTC
*** Bug 198509 has been marked as a duplicate of this bug. ***
Comment 14 Anton Romanov 2009-01-21 13:48:08 UTC
i still have this bug with 
sys-apps/sandbox-1.3.2
sys-libs/glibc-2.9_p20081201-r1
shouldn't this be reopened?
Comment 15 SpanKY gentoo-dev 2009-01-21 16:38:10 UTC
once you verify that your system has no stale libsandbox binaries in /lib*/, open a new bug.  i doubt you're having the same problem here.
Comment 16 Anton Romanov 2009-01-21 18:00:30 UTC
(In reply to comment #15)
> once you verify that your system has no stale libsandbox binaries in /lib*/,
gosh.. i'm embarassed
sorry
Comment 17 SpanKY gentoo-dev 2009-01-21 18:19:35 UTC
np ... i'll add a sanity check to the sandbox ebuild
Comment 18 Stefan Triller 2009-01-23 00:06:23 UTC
(In reply to comment #15)
> once you verify that your system has no stale libsandbox binaries in /lib*/,
> open a new bug.  i doubt you're having the same problem here.
> 

Someone should have told me earlier to delete those files!
I was running portage with -sandbox since about over one year now, but now it works with the sandbox again.