Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Dec 2016 16:00:25 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r309536 - stable/10/lib/libc/sys
Message-ID:  <201612041600.uB4G0P3u076382@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun Dec  4 16:00:25 2016
New Revision: 309536
URL: https://svnweb.freebsd.org/changeset/base/309536

Log:
  MFC r309026: open(2): Clarify non-POSIX error when opening a symlink with
  O_NOFOLLOW.
  
  We return [EMLINK] instead of [ELOOP] when trying to open a symlink with
  O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code
  like cmp -h and xz takes advantage of this.
  
  PR:		214633

Modified:
  stable/10/lib/libc/sys/open.2
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/sys/open.2
==============================================================================
--- stable/10/lib/libc/sys/open.2	Sun Dec  4 15:59:04 2016	(r309535)
+++ stable/10/lib/libc/sys/open.2	Sun Dec  4 16:00:25 2016	(r309536)
@@ -28,7 +28,7 @@
 .\"     @(#)open.2	8.2 (Berkeley) 11/16/93
 .\" $FreeBSD$
 .\"
-.Dd April 2, 2015
+.Dd November 22, 2016
 .Dt OPEN 2
 .Os
 .Sh NAME
@@ -471,6 +471,22 @@ The
 .Fn openat
 function was introduced in
 .Fx 8.0 .
+.Sh STANDARDS
+These functions are specified by
+.St -p1003.1-2008 .
+.Fx
+sets
+.Va errno
+to
+.Er EMLINK instead of
+.Er ELOOP
+as specified by
+.Tn POSIX
+when
+.Dv O_NOFOLLOW
+is set in flags and the final component of pathname is a symbolic link
+to distinguish it from the case of too many symbolic link traversals
+in one of its non-final components.
 .Sh BUGS
 The Open Group Extended API Set 2 specification requires that the test
 for whether



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612041600.uB4G0P3u076382>