linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/6] fix some problems with v4root handling in mountd
Date: Tue, 01 May 2012 15:33:11 -0400	[thread overview]
Message-ID: <4FA03A77.8070404@RedHat.com> (raw)
In-Reply-To: <20120424054003.20130.16209.stgit@notabene.brown>



On 04/24/2012 01:46 AM, Neil Brown wrote:
> First I'd like to say that I love seeing comments that explain the
> code..  What way when the code does something different to the
> comment, I can be sure I'm on to something :-)
> 
> If I have exports:
> 
>  /  *(rw,no_root_squash)
>  /home 192.168.1.2(rw,no_root_squash)
> 
> Then I want to export 'root' to everything (on my side of a firewall)
> but '/home' only to one machine.
> However this doesn't work for host 192.168.1.2.
> If I try to mount '/' with NFSv3, it fails.
> If I try to mount '/' with NFSv4, then it works but we only see
> "home" in the mounted "/".
> 
> The problem is that the export of "/home" causes a V4ROOT export
> of "/" to be created for 192.168.1.2 and as MCL_SUBNETWORK comes
> before MCL_WILDCARD, the V4ROOT export wins and the other wildcard
> export isn't even tried.
> 
> So the following patches:
>  1/ fix the NFSv4 mount case so that we really see '/' and not a pseudo
>     '/'.  This is the case where the comment says the right thing
>     but the code doesn't.
> 
>  2/ fix 'mountd' lookup for NFSv2/v3 so they successfully mount
>     the real export, and don't fail because only the V4ROOT export
>     was found,
> 
>  3/ Fix a similar ordering problem in nfsd_fh.  Without this an
>     NFSv4 client might see the V4ROOT export for '/' rather than
>     the explicitly exported export.
> 
>  4/ Set a useful ttl on V4ROOT exports so they don't need to
>     constantly be refreshed, an
>   
>  5/ fix a buglet which didn't cause any of these problems but
>     certainly looks wrong.
Committed all 6... thanks!

steved.

> 
> Enjoy :-)
> 
> NeilBrown
> 
> ---
> 
> Neil Brown (6):
>       v4_root_add_parents: remove a possible buffer overflow.
>       v4root: set the time-to-live for V4ROOT exports to the DEFAULT.
>       v4set_root: force "fsid=0" for all exports of '/'
>       nfsd_fh: if two exports are possible, choose the one without V4ROOT
>       auth_authenticate_newcache: prefer non-V4ROOT export over V4ROOT exports.
>       lookup_export: really prefer nonV4ROOT exports.
> 
> 
>  utils/mountd/auth.c   |    7 +++----
>  utils/mountd/cache.c  |   21 +++++++++++++++++----
>  utils/mountd/v4root.c |   12 ++++++++++--
>  3 files changed, 30 insertions(+), 10 deletions(-)
> 

  parent reply	other threads:[~2012-05-01 19:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  5:46 [PATCH 0/6] fix some problems with v4root handling in mountd Neil Brown
2012-04-24  5:46 ` [PATCH 2/6] auth_authenticate_newcache: prefer non-V4ROOT export over V4ROOT exports Neil Brown
2012-04-24  5:46 ` [PATCH 5/6] v4root: set the time-to-live for V4ROOT exports to the DEFAULT Neil Brown
2012-04-24  5:46 ` [PATCH 3/6] nfsd_fh: if two exports are possible, choose the one without V4ROOT Neil Brown
2012-04-24  5:46 ` [PATCH 4/6] v4set_root: force "fsid=0" for all exports of '/' Neil Brown
2012-04-24 22:03   ` J. Bruce Fields
2012-04-24  5:46 ` [PATCH 6/6] v4_root_add_parents: remove a possible buffer overflow Neil Brown
2012-04-24  5:46 ` [PATCH 1/6] lookup_export: really prefer nonV4ROOT exports Neil Brown
2012-04-24 22:05 ` [PATCH 0/6] fix some problems with v4root handling in mountd J. Bruce Fields
2012-05-01 19:33 ` Steve Dickson [this message]
2012-05-02  1:23   ` NeilBrown
2012-05-02 10:32     ` Steve Dickson
2012-05-02 23:08       ` NeilBrown

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=4FA03A77.8070404@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).