Subject: re: kern/6062: bind() to unix domain socket doesn't use emul path
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 08/31/1998 15:12:44
    > there is inconsistency between which syscalls in each emulation
    > check the alternative path.  IMO, creat(2) should not be checked,
    > as it is creating new files, not reading pre-existing ones.
    > emulations shouldn't write to their alternative path unless
    > explicitely given.
   
   No, this is totally bogus... What if it wants to create a temp file
   in /usr/adm/fooprog/...?  You want to put a /usr/adm on your NetBSD
   system?  Not.

this is one case that supports your argument, but i can easily
provide a similar one against it, using the exact same concept.
take, i want to use some text editor from the emulated system,
as my default editor.  if i edit file that has a dirname(1) that
exists under the alternative path, as well as the normal root,
then i will lose.  i don't know what the best thing for this
is, however i believe that not creating files under the alt path
is the most sane answer...


i also see that `mknod' in some emulations checks the alternate
path.  i also see that some emulations do not use the correct
check for CREAT or open O_CREAT in some cases.  as i noted above,
there is quite a bit of inconsistency here about what syscalls
do what.

   
   The Correct thing happens if the emul shadow dir doesn't exist for the
   created file (i.e. it falls back on the real /-rooted path).

that's good. :)