[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1285923347.3207.7.camel@localhost>
Date: Fri, 01 Oct 2010 16:55:47 +0800
From: Ian Kent <raven@...maw.net>
To: David Howells <dhowells@...hat.com>
Cc: viro@....linux.org.uk, jmoyer@...hat.com, linux-fs@...r.kernel.org,
autofs@...ux.kernel.org, linux-kernel@...r.kernel.org,
linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org,
linux-cifs@...r.kernel.org
Subject: Re: [PATCH 06/17] Add an AT_NO_AUTOMOUNT flag to suppress terminal
automount
On Thu, 2010-09-30 at 19:15 +0100, David Howells wrote:
> Add an AT_NO_AUTOMOUNT flag to suppress terminal automounting of directories
> with follow_link semantics. This can be used by fstatat() users to permit the
> gathering of attributes on an automount point and also prevent
> mass-automounting of a directory of automount points by ls.
>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Acked-by: Ian Kent <raven@...maw.net>
> ---
>
> fs/namei.c | 6 ++++++
> fs/stat.c | 4 +++-
> include/linux/fcntl.h | 1 +
> include/linux/namei.h | 2 ++
> 4 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index 86421f9..74bce3a 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -625,6 +625,12 @@ static int follow_automount(struct path *path, unsigned flags,
> if (!path->dentry->d_op || !path->dentry->d_op->d_automount)
> return -EREMOTE;
>
> + /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT
> + * and this is the terminal part of the path.
> + */
> + if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE))
> + return -EXDEV; /* we actually want to stop here */
Oops, we missed this -EXDEV when we made the change to -EISDIR.
Ian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists