bug-autoconf
[Top][All Lists]
Advanced

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

Re: Use current directory for POSIX mkdir test in install-sh


From: Alex Unleashed
Subject: Re: Use current directory for POSIX mkdir test in install-sh
Date: Tue, 10 Oct 2006 13:46:29 +0200

On 10/10/06, Paul Eggert <address@hidden> wrote:


> The difference with other mkdir versions is that GNU mkdir does not try
to
> chmod() the directory if it didn't just create it. The mkdir I'm
currently
> testing is FreeBSD's. It always chmod()'s the directory when a mode is
> specified, no matter it didn't create it.

Ouch!

That behavior is incorrect; it doesn't conform to POSIX.  You might
file a bug report, citing
< http://www.opengroup.org/onlinepubs/009695399/utilities/mkdir.html >.


Will do. Thanks for the link.

This chmod(), even when failing,
> is considered an attempt to write to an external path,

That's weird.  mkdir("/", ...) is not considered to be an attempt to
write to an external file name, but chmod ("/", ...) is?  This doesn't
sound consistent to me; both system calls _attempt_ to write to an
external file name.  And neither _succeeds_ (which is what should
matter here).  So it sounds like your sandbox tests should be
adjusted, one way or another, since they're not consistent.


Yup, that's a known issue in the sandboxing code, and it would certainly
trigger the mkdir call once fixed. But the fact of the attempt is what
really matters, as we cannot predict if the call will fail, and if it
succeeds it would actually change the file system, which is an unacceptable
risk.

Thanks,

Alex


reply via email to

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