Re: [PATCH] Implement AT_SYMLINK_FOLLOW flag for linkat

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

 



On Sat, Jun 17, 2006 at 03:13:22PM -0400, Ulrich Drepper wrote:
> When the linkat() syscall was added the flag parameter was added in the
> last minute but it wasn't used so far.  The following patch should
> change that.  My tests show that this is all that's needed.
> 
> If OLDNAME is a symlink setting the flag causes linkat to follow the
> symlink and create a hardlink with the target.  This is actually
> the behavior POSIX demands for link() as well but Linux wisely does
> not do this.  With this flag (which will most likely be in the next
> POSIX revision) the programmer can choose the behavior, defaulting
> to the safe variant.  As a side effect it is now possible to implement
> a POSIX-compliant link(2) function for those who are interested.

Where does POSIX require that?  IIRC, it was along the lines of "application
can't rely on kernel doing the right thing", not "kernel must do the
wrong thing"...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux