Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144518 - sandbox mkdir wrapper differs in behavior than kernel
Summary: sandbox mkdir wrapper differs in behavior than kernel
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-20 05:25 UTC by SpanKY
Modified: 2009-03-11 23:25 UTC (History)
0 users

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 2006-08-20 05:25:42 UTC
the `make check` of coreutils fails because it tries to do:
rm -rf d2
install -d d2/..

normal behavior would be:
mkdir("d2/..", 0755)                    = -1 ENOENT (No such file or directory)
mkdir("d2", 0755)                       = 0
mkdir("d2/..", 0755)                    = -1 EEXIST (File exists)
stat("d2/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
<success!>

the wrapper-funcs/mkdir.c does an lstat() on the canonicalized path rather than the original ... since canonicalize() doesnt actually do any filesystem calls, it has no idea if the specified path can even be resolved, it just assumes that it can be

if i change the lstat() to operate on the original pathname rather than the canonicalized one, the `install -d d2/..` works just fine ...
Comment 1 SpanKY gentoo-dev 2009-03-11 23:25:59 UTC
it's been too long since i filed this bug, so i dont recall the behind-the-scene details.  the proposed test case with `install` works fine with latest sandbox, so let's call it a day.