From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: new ...at() flag: AT_NO_JUMPS Date: Sun, 30 Apr 2017 00:25:04 +0100 Message-ID: <20170429232504.GU29622@ZenIV.linux.org.uk> References: <20170429220414.GT29622@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Lutomirski Cc: Linux API , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Linux FS Devel List-Id: linux-api@vger.kernel.org On Sat, Apr 29, 2017 at 04:17:18PM -0700, Andy Lutomirski wrote: > On Sat, Apr 29, 2017 at 3:04 PM, Al Viro wrote: > > New AT_... flag - AT_NO_JUMPS > > > > Semantics: pathname resolution must not involve > > * traversals of absolute symlinks > > * traversals of procfs-style symlinks > > * traversals of mountpoints (including bindings, referrals, etc.) > > * traversal of .. in the starting point of pathname resolution. > > Can you clarify this last one? I assume that ".." will be rejected, > but what about "a/../.."? How about "b" if b is a symlink to ".."? > How about "a/b" if a is a directory and b is a symlink to "../.."? All of those will be rejected - in each of those cases pathname traversal leads back into the starting point with .. being the next component to handle.