From: millert Date: Thu, 18 Jul 2024 15:38:57 +0000 (+0000) Subject: The source of a link (name1) may not be a directory. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=070ee79af545aa6b0bfe576949fa28f34e1cf374;p=openbsd The source of a link (name1) may not be a directory. POSIX says this is implementation-dependent; OpenBSD does not allow it. OK guenther@ --- diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2 index 4d6f9f1abe3..0047f6e1f5a 100644 --- a/lib/libc/sys/link.2 +++ b/lib/libc/sys/link.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: link.2,v 1.30 2024/03/25 17:57:07 guenther Exp $ +.\" $OpenBSD: link.2,v 1.31 2024/07/18 15:38:57 millert Exp $ .\" $NetBSD: link.2,v 1.7 1995/02/27 12:34:01 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" -.Dd $Mdocdate: March 25 2024 $ +.Dd $Mdocdate: July 18 2024 $ .Dt LINK 2 .Os .Sh NAME @@ -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