From owner-cvs-src-old@FreeBSD.ORG Fri May 29 10:07:44 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37A941065676 for ; Fri, 29 May 2009 10:07:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 24C4B8FC18 for ; Fri, 29 May 2009 10:07:44 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n4TA7iBM012166 for ; Fri, 29 May 2009 10:07:44 GMT (envelope-from des@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4TA7iDr012165 for cvs-src-old@freebsd.org; Fri, 29 May 2009 10:07:44 GMT (envelope-from des@repoman.freebsd.org) Message-Id: <200905291007.n4TA7iDr012165@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to des@repoman.freebsd.org using -f From: Dag-Erling Smorgrav Date: Fri, 29 May 2009 10:02:44 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern vfs_lookup.c src/sys/sys namei.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 10:07:44 -0000 des 2009-05-29 10:02:44 UTC FreeBSD src repository Modified files: sys/kern vfs_lookup.c sys/sys namei.h Log: SVN rev 193028 on 2009-05-29 10:02:44Z by des Let vfs_lookup() return ENOTDIR if the path has a trailing slash and the last component is a symlink to something that isn't a directory. We introduce a new namei flag, TRAILINGSLASH, which is set by lookup() if the last component is followed by a slash. The trailing slash is then stripped, as before. If the final component is a symlink, lookup() will return to namei(), which will expand the symlink and call lookup() with the new path. When all symlinks have been resolved, lookup() checks if the TRAILINGSLASH flag is set, and if it is, and the vnode it ended up with is not a directory, it returns ENOTDIR. PR: kern/21768 Submitted by: Eygene Ryabinkin MFC after: 3 weeks Revision Changes Path 1.126 +12 -8 src/sys/kern/vfs_lookup.c 1.52 +2 -1 src/sys/sys/namei.h