Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2012 02:52:20 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r240528 - stable/9/lib/libc/stdlib
Message-ID:  <201209150252.q8F2qKRb063575@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Sat Sep 15 02:52:19 2012
New Revision: 240528
URL: http://svn.freebsd.org/changeset/base/240528

Log:
  MFC r240410:
  
    Avoid mapping ENOENT to ENOTDIR for non-existent path components.
  
    The ENOTDIR mapping was introduced in r235266 for kern/128933 based on
    an interpretation of the somewhat ambiguous language in the POSIX realpath
    specification.  The interpretation is inconsistent with Solaris and Linux,
    a regression from 9.0, and does not appear to be permitted by the
    description of ENOTDIR:
  
         20 ENOTDIR Not a directory.  A component of the specified pathname
                 existed, but it was not a directory, when a directory was
                 expected.
  
  PR: standards/171577

Modified:
  stable/9/lib/libc/stdlib/realpath.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/stdlib/realpath.c
==============================================================================
--- stable/9/lib/libc/stdlib/realpath.c	Fri Sep 14 23:47:23 2012	(r240527)
+++ stable/9/lib/libc/stdlib/realpath.c	Sat Sep 15 02:52:19 2012	(r240528)
@@ -181,8 +181,6 @@ realpath(const char * __restrict path, c
 			return (NULL);
 		}
 		if (lstat(resolved, &sb) != 0) {
-			if (errno != ENOENT || p != NULL)
-				errno = ENOTDIR;
 			if (m)
 				free(resolved);
 			return (NULL);



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