Re: [BUG] Kernel 2.4.0-test1-ac10 changes open of symlink behavior.

From: Alan Cox (alan@redhat.com)
Date: Sun Jun 11 2000 - 14:55:55 EST


> > Yes. The new POSIX draft standard says
> > "In general the open() function follows the symbolic link
> > if path names a symbolic link."
> > (The exception is the case O_CREAT|O_EXCL.)
>
> Excuse me, but I'll take difference from POSIX over a bunch of very real
> races, thank you very much. Again, feel free to propose race-free
> implementation if you want that thing back. Until then O_CREAT without
> O_EXCL will return -ENOENT on broken symlinks. Userland should not rely
> on objects' creation/removal following symlinks. Period.

POSIX says otherwise. Period ;)

The case we are about is O_EXCL. That the magic security concious etc
case. If a symlink is moved while we are opening to create then who cares ?
BSD added an option to not follow links which cleaned up even those cases
for the worried and paranoid (as wlel as being handy for removing stat
calls in httpd)

If posix said O_CREAT|O_EXCL had to follow I would be concerned. O_CREAT
following is fine.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:23 EST