bug-coreutils
[Top][All Lists]
Advanced

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

Re: CVS misc/pwd bug on Solaris 9


From: Paul Eggert
Subject: Re: CVS misc/pwd bug on Solaris 9
Date: Thu, 17 Jun 2004 09:51:53 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Albert Chin <address@hidden> writes:

> Is this a Solaris 9 getcwd() bug?

Yes, it's Sun bug 4867081, dated 2004-03-26, with no fix yet.
Solaris 9 getcwd does not work if the current directory name has more
than PATH_MAX bytes (1024 bytes).  For example, if the working
directory length is 1025 bytes, the following code fails:

char buf[PATH_MAX * 2];
getcwd (buf, sizeof buf)

Solaris 9 getcwd returns null and sets errno to ERANGE in this case.

I suppose the getcwd checker could catch this at configure-time; but
that won't suffice if coreutils is configured with a working library
(e.g., Solaris 8) and then run with a non-working library (e.g.,
Solaris 9).

I should mention that Solaris getcwd has a different longstanding bug:
it fails if the working directory has more than 141 path name
components.  This is Sun bug 4033182, which is not published (and, I
presume, not fixed).  In Sun bug 4048027 (dated 1997-05-17), when Sun
was fixing the "rm can't remove arbitrarily-deep directories" problem,
someone wrote "A fix to the library function getcwd is deemed too
risky".




reply via email to

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