bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8577: GNU coreutils-8.12 thinks GNU libc-2.13's getcwd() is "buggy"


From: Eric Blake
Subject: bug#8577: GNU coreutils-8.12 thinks GNU libc-2.13's getcwd() is "buggy" ?
Date: Thu, 28 Apr 2011 12:52:08 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

forcemerge 8570 8577
thanks

On 04/28/2011 12:28 PM, Jason Vas Dias wrote:
> Hi - Having just built GNU coreutils-8.12 against GNU libc 2.13, 
> coreutils SKIPS a test normally run as part of "make check"
> because "system getcwd() is buggy" :
> (after coreutils-8.12  'configure' and 'make -j2' succeeds :)
> $ make check
> ...
> ./misc/pwd-unreadable-parent: skipping test: can't use buggy system getcwd
> SKIP: misc/pwd-unreadable-parent

Thanks for the report.  However, you just missed the fact that Bruno
Haible already reported the same issue.  Also, as noted in bug 8570,
glibc's getcwd() is indeed buggy, but if glibc were fixed, then this
test would still be skipped, so the test is worthless and has been
removed from the latest git.

> I think it's a shame that the latest stable GNU coreutils thinks the latest 
> stable GNU 
> libc's getcwd() is "buggy" . Why is this ?  Why not get glibc fixed if it is 
> "buggy" before
> releasing a coreutils that complains about it ?

glibc's getcwd() has _always_ been buggy.  It fails to return a name for
a current working directory whose name is longer than PATH_MAX bytes,
even though (in most cases) such a name can still be determined by
walking back through .. links.  And coreutils' pwd(1) command works
around this current limitation in glibc's getcwd().

Additionally, if the Linux kernel would ever implement O_SEARCH as
mandated by POSIX 2008, then it would be possible to do the .. walk for
even more directories (right now, an unreadable but searchable directory
can't be walked).

> I'll investigate further - I don't know if this is a glibc bug or a coreutils 
> bug so I raised
> glibc bug #12713 about this also.

Three affected parties (not two)

glibc should copy gnulib's code for making getcwd() more robust - thanks
for opening that bug.

The Linux kernel should implement O_SEARCH.

Coreutils should ditch the worthless test that is always skipped
(already done).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]