On 10/10/06, Paul Eggert <[EMAIL PROTECTED]> 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