All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Staubach <staubach@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: NFS@lists.sourceforge.net
Subject: [PATCH] NFS server subtree_check returns dubious value
Date: Thu, 27 Apr 2006 14:45:56 -0400	[thread overview]
Message-ID: <44511164.4080303@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

Hi.

Attached is a patch which addresses a problem found when a Linux NFS server
uses the "subtree_check" export option.

The "subtree_check" NFS export option was designed to prohibit a client from
using a file handle for which it should not have permission.  The algorithm
used is to ensure that the entire path to the file being referenced is
accessible to the user attempting to use the file handle.  If some part of
the path is not accessible, then the operation is aborted and the 
appropriate
version of ESTALE is returned to the NFS client.

The error, ESTALE, is unfortunate in that it causes NFS clients to make
certain assumptions about the continued existence of the file.  They assume
that the file no longer exists and refuse to attempt to access it again.
In this case, the file really does exist, but access was denied by the
server for a particular user.

A better error to return would be an EACCES sort of error.  This would
inform the client that the particular operation that it was attempting
was not allowed, without the nasty side effects of the ESTALE error.

    Thanx...

       ps

Signed-off-by: Peter Staubach <staubach@redhat.com>

[-- Attachment #2: devel.today --]
[-- Type: text/plain, Size: 342 bytes --]

--- linux-2.6.16.x86_64/fs/exportfs/expfs.c.org
+++ linux-2.6.16.x86_64/fs/exportfs/expfs.c
@@ -102,7 +102,7 @@ find_exported_dentry(struct super_block 
 		if (acceptable(context, result))
 			return result;
 		if (S_ISDIR(result->d_inode->i_mode)) {
-			/* there is no other dentry, so fail */
+			err = -EACCES;
 			goto err_result;
 		}
 

                 reply	other threads:[~2006-04-27 18:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44511164.4080303@redhat.com \
    --to=staubach@redhat.com \
    --cc=NFS@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.