Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S377129AbdD2XRt (ORCPT ); Sat, 29 Apr 2017 19:17:49 -0400 Received: from mail.kernel.org ([198.145.29.136]:48542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S377082AbdD2XRm (ORCPT ); Sat, 29 Apr 2017 19:17:42 -0400 MIME-Version: 1.0 In-Reply-To: <20170429220414.GT29622@ZenIV.linux.org.uk> References: <20170429220414.GT29622@ZenIV.linux.org.uk> From: Andy Lutomirski Date: Sat, 29 Apr 2017 16:17:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: new ...at() flag: AT_NO_JUMPS To: Al Viro Cc: Linux API , "linux-kernel@vger.kernel.org" , Linux FS Devel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 827 Lines: 18 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 "../.."? > Right now I have it hooked only for fstatat() and friends; it could be > easily extended to any ...at() syscalls. Objections? I like it, assuming the answers to all the questions above are that they will be rejected.