From owner-svn-src-all@FreeBSD.ORG Tue Sep 18 13:03:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28FD11065670; Tue, 18 Sep 2012 13:03:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1442D8FC12; Tue, 18 Sep 2012 13:03:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ID30mR096056; Tue, 18 Sep 2012 13:03:00 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ID30xb096054; Tue, 18 Sep 2012 13:03:00 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209181303.q8ID30xb096054@svn.freebsd.org> From: Ed Maste Date: Tue, 18 Sep 2012 13:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240647 - releng/9.1/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 13:03:01 -0000 Author: emaste Date: Tue Sep 18 13:03:00 2012 New Revision: 240647 URL: http://svn.freebsd.org/changeset/base/240647 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 Approved by: re Sponsored by: ADARA Networks Modified: releng/9.1/lib/libc/stdlib/realpath.c Directory Properties: releng/9.1/lib/libc/ (props changed) Modified: releng/9.1/lib/libc/stdlib/realpath.c ============================================================================== --- releng/9.1/lib/libc/stdlib/realpath.c Tue Sep 18 12:34:35 2012 (r240646) +++ releng/9.1/lib/libc/stdlib/realpath.c Tue Sep 18 13:03:00 2012 (r240647) @@ -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);