Date: Mon, 5 Aug 2013 19:42:03 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253969 - head/sys/kern Message-ID: <201308051942.r75Jg3M9005843@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Aug 5 19:42:03 2013 New Revision: 253969 URL: http://svnweb.freebsd.org/changeset/base/253969 Log: Do not override the ENOENT error for the empty path, or EFAULT errors from copyins, with the relative lookup check. Discussed with: rwatson Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Mon Aug 5 19:06:28 2013 (r253968) +++ head/sys/kern/vfs_lookup.c Mon Aug 5 19:42:03 2013 (r253969) @@ -172,7 +172,8 @@ namei(struct nameidata *ndp) * not an absolute path, and not containing '..' components) to * a real file descriptor, not the pseudo-descriptor AT_FDCWD. */ - if (IN_CAPABILITY_MODE(td) && (cnp->cn_flags & NOCAPCHECK) == 0) { + if (error == 0 && IN_CAPABILITY_MODE(td) && + (cnp->cn_flags & NOCAPCHECK) == 0) { ndp->ni_strictrelative = 1; if (ndp->ni_dirfd == AT_FDCWD) { #ifdef KTRACE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308051942.r75Jg3M9005843>