Index | Thread | Search

From:
Philip Guenther <guenther@gmail.com>
Subject:
Re: [PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory
To:
"Todd C. Miller" <millert@openbsd.org>
Cc:
наб <nabijaczleweli@nabijaczleweli.xyz>, tech@openbsd.org
Date:
Wed, 17 Jul 2024 21:32:34 -0700

Download raw body.

Thread
  • Todd C. Miller:

    [PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory

    • Philip Guenther:

      [PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory

  • On Wed, Jul 17, 2024 at 7:30 PM Todd C. Miller <millert@openbsd.org> wrote:
    >
    > This was changed in rev 1.2 of link.2 in 1996.  I don't think we
    > want to make it sound like this behavior is OpenBSD-specific since
    > most systems disallow hard links to directories.
    >
    > Perhaps something like this.
    
    That's clearer, yeah.
    ok guenther@
    
    
    > --- lib/libc/sys/link.2 25 Mar 2024 17:57:07 -0000      1.30
    > +++ lib/libc/sys/link.2 18 Jul 2024 02:25:00 -0000
    > @@ -65,15 +65,13 @@ is removed, the file
    >  .Fa name2
    >  is not deleted and the link count of the underlying object is decremented.
    >  .Pp
    > +For the hard link to succeed,
    >  .Fa name1
    > -must exist for the hard link to succeed and both
    > +must exist and not be a directory, and both
    >  .Fa name1
    >  and
    >  .Fa name2
    >  must be in the same file system.
    > -As mandated by POSIX.1
    > -.Fa name1
    > -may not be a directory.
    >  .Pp
    >  The
    >  .Fn linkat
    >
    
    
    
  • Todd C. Miller:

    [PATCH] link.2: POSIX.1 does not, in fact, mandate file1 to not be a directory