[csw-maintainers] lighttpd and ipv6

Dagobert Michelsen dam at opencsw.org
Tue Mar 1 18:37:21 CET 2011


Hi Jörg,

Am 01.03.2011 um 18:00 schrieb Joerg Schilling:
> Dagobert Michelsen <dam at opencsw.org> wrote:
>> The issue was real. When sending compressed data the compression is done
>> in a temp directory which is created on demand. If this directory is on
>> an automounted filesystem (like /home/dam) the result of mkdir(2) is
>> ENOSYS instead of EEXIST which confuses the recursive directory creation
>> routine thinking that the directory is already there:
>> 
>>  /1:     mkdir("/home", 0700)                            Err#17 EEXIST
>>  /1:     mkdir("/home/dam", 0700)                        Err#89 ENOSYS
> 
> A POSIXly correct error code would be EROFS. Would this help?

I have seen checks for EROFS in code from other programs when
investigating this issue, but as ENOSYS is returned from mkdir(2)
I don't see how an explicit check could be avoided with the
exception of rewriting it the way the Solaris implementation
did it (traversing from right to left instead of mkdir'ing from
left to right):
  http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libgen/common/mkdirp.c


Best regards

  -- Dago


More information about the maintainers mailing list