From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162486AbbKTKAw (ORCPT ); Fri, 20 Nov 2015 05:00:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44911 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbbKTKAu (ORCPT ); Fri, 20 Nov 2015 05:00:50 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20151120025749.GJ22011@ZenIV.linux.org.uk> References: <20151120025749.GJ22011@ZenIV.linux.org.uk> <20151119232635.GI22011@ZenIV.linux.org.uk> To: Al Viro Cc: dhowells@redhat.com, Linus Torvalds , linux-fsdevel , Linux Kernel Mailing List , LSM List , Miklos Szeredi Subject: Re: [RFC] readlink()-related oddities MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22333.1448013641.1@warthog.procyon.org.uk> Date: Fri, 20 Nov 2015 10:00:41 +0000 Message-ID: <22334.1448013641@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Al Viro wrote: > How would those tools know that this particular pathname _is_ a magical > symlink? Sure, if you see a symlink with body that starts with % or #, > you could figure out that it's not a regular one and go parse the body, > but for stat(2) it looks like a directory. Do those tools call readlink() > on every directory they spot on AFS volume? David? It has to be a directory so that you can mount on it. If you look in /afs on an OpenAFS client filesystem it appears as a symlink to somewhere under /afs/ because they can't do the in-kernel mounting (it's GPL-only on Linux). David