Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266625 - /etc/sandbox.d/ has 0700 permissions breaking non-root usage
Summary: /etc/sandbox.d/ has 0700 permissions breaking non-root usage
Status: RESOLVED DUPLICATE of bug 265376
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-18 07:24 UTC by Hans de Graaff
Modified: 2009-04-18 21:18 UTC (History)
0 users

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


Attachments
build-x86/tests/testsuite.log (testsuite.log,110.65 KB, text/plain)
2009-04-18 07:25 UTC, Hans de Graaff
Details
emerge --info output (emerge-info.txt,10.98 KB, text/plain)
2009-04-18 19:20 UTC, Hans de Graaff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Graaff gentoo-dev Security 2009-04-18 07:24:20 UTC
I'm getting a test failure when trying to install sandbox 1.6-r2.

 11: mkdir/3                                         FAILED (mkdir.at:3)

The testsuite.log I'm attaching is from the build-x86 directory. No such file was present in the build-adm64 directory so I assume only the build-x86 tests got run.
Comment 1 Hans de Graaff gentoo-dev Security 2009-04-18 07:25:43 UTC
Created attachment 188774 [details]
build-x86/tests/testsuite.log
Comment 2 SpanKY gentoo-dev 2009-04-18 17:22:41 UTC
looks like a bug in your system rather than sandbox ... hard to guess though since you didnt provide `emerge --info` ...

ln: creating symbolic link `root': Permission denied

all it's doing is:
    mkdir -p base/d
    cd base/d
    chmod a-r .
    chmod a-rx ..
    ln -s / root

if your system cant handle that, well not sure there's anything i can do about it in sandbox ...
Comment 3 Hans de Graaff gentoo-dev Security 2009-04-18 19:20:34 UTC
The testsuite.log in the testsuite.dir/11 directory looks like this:

Permissions on /etc/sandbox.d:
drwx------ 2 root root 4.0K 2009-03-26 17:49 /etc/sandbox.d/

I've tried again with FEATURES=-userpriv and the test suite passes in that case, but the mkdir/3 test is skipped in that case.



#                             -*- compilation -*-
11. mkdir.at:3: testing ...
../../sandbox-1.6/tests/mkdir.at:3: env SANDBOX_BEEP=0 SANDBOX_LOG=/var/tmp/portage/sys-apps/sandbox-1.6-r2/work/build-x86/tests/testsuite.dir/11/sandbox.log sandbox.sh . $abs_top_srcdir/tests/mkdir-3.sh
stderr:
(sandbox) error: in ../../sandbox-1.6/libsbutil/src/file.c, function rc_ls_dir(), line 108:
(sandbox)        strerror() = 'Permission denied'
(sandbox)        Failed to opendir() '/etc/sandbox.d'!
(sandbox) error: in ../../sandbox-1.6/libsbutil/src/file.c, function rc_ls_dir(), line 108:
(sandbox)        strerror() = 'Permission denied'
(sandbox)        Failed to opendir() '/etc/sandbox.d'!
(sandbox) error: in ../../sandbox-1.6/libsbutil/src/file.c, function rc_ls_dir(), line 108:
(sandbox)        strerror() = 'Permission denied'
(sandbox)        Failed to opendir() '/etc/sandbox.d'!
ln: creating symbolic link `root': Permission denied
stdout:
PASS: mkdir("root/aksdfjasdfjaskdfjasdfla", 777) = -1 (wanted -1); errno = 2 [No such file or directory] (wanted 0 [Success])
../../sandbox-1.6/tests/mkdir.at:3: exit code was 1, expected 0
11. mkdir.at:3: 11. mkdir/3 (mkdir.at:3): FAILED (mkdir.at:3)
Comment 4 Hans de Graaff gentoo-dev Security 2009-04-18 19:20:58 UTC
Created attachment 188820 [details]
emerge --info output
Comment 5 SpanKY gentoo-dev 2009-04-18 20:49:49 UTC
re-emerge sandbox and/or fix the perms on your sandbox.d dir then
Comment 6 Hans de Graaff gentoo-dev Security 2009-04-18 20:53:54 UTC
Indeed, when emerging sandbox without userpriv in FEATURES the sandbox permissions also got changed to 0755, so this error would no longer occur even on subsequent updates with userpriv.

I'm pretty sure that I didn't set those permissions myself, so there may be a specific upgrade that triggers this.

In any case, feel free to close if you think that this path is not going to be hit by many people.
Comment 7 SpanKY gentoo-dev 2009-04-18 21:18:13 UTC
the issue was already root caused and fixed.  you were simply an unlikely early adopter.

FEATURES=userpriv should be irrelevant here as that only affects src_* stages and not pkg_* stages.

*** This bug has been marked as a duplicate of bug 265376 ***