From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161872AbbKTDJY (ORCPT ); Thu, 19 Nov 2015 22:09:24 -0500 Received: from mail-ig0-f178.google.com ([209.85.213.178]:38230 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934262AbbKTDJV (ORCPT ); Thu, 19 Nov 2015 22:09:21 -0500 MIME-Version: 1.0 In-Reply-To: <20151120025749.GJ22011@ZenIV.linux.org.uk> References: <20151119232635.GI22011@ZenIV.linux.org.uk> <20151120025749.GJ22011@ZenIV.linux.org.uk> Date: Thu, 19 Nov 2015 19:09:20 -0800 X-Google-Sender-Auth: CI9F6vWdDwdkXDRjsespJxj_Z6w Message-ID: Subject: Re: [RFC] readlink()-related oddities From: Linus Torvalds To: Al Viro Cc: linux-fsdevel , Linux Kernel Mailing List , LSM List , Miklos Szeredi , David Howells Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2015 at 6:57 PM, Al Viro wrote: > > How would those tools know that this particular pathname _is_ a magical > symlink? Like maybe just the AFS management tools? By design you'd only run them on the mountpoint in question. Not everything has to be "generic". Sometimes its' good enough to just have the ability to get the work done. Now, if it turns out that others also want to do this, maybe somebody decides "let's add flag -V to 'ls', which forces a 'readlink()' on all the targets, whether links or not, and shows the information". I could imagine other special files having "a single line of information about the file" that they'd expose with readlink(). Who knows? So there is *potential* for just making it generic, but that doesn't mean that it necessarily has to act that way. Linus