]> git.decadent.org.uk Git - nfs-utils.git/commit
nfsd_fh: if two exports are possible, choose the one without V4ROOT
authorNeilBrown <neilb@suse.de>
Tue, 1 May 2012 19:22:57 +0000 (15:22 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 1 May 2012 19:29:59 +0000 (15:29 -0400)
commit12a31b8011ab258fc726300dcfbb7a03af74adb3
tree2f5a3b7ad312ca0be323178037cb74b4b1530ca1
parent3d7faa0249332e23a2dc2e3e78020ed6bc66036a
nfsd_fh: if two exports are possible, choose the one without V4ROOT

When nfsd_fh it looking for an export for a particular
client and file-handle, it might find two exports for the same path:
one with NFSEXP_V4ROOT, one with out.

As nfsd_fh calls cache_export_ent to give the export information to
the kernel it much choose the same export that auth_authenticate
chooses for get_rootfh which it also passes cache_export_ent (via
cache_export).
i.e. it must choose the non-V4ROOT on where possible.

Also change
   strcmp(foo, bar)
to
   strcmp(foo, bar) == 0
because I have a pathological fear of the former.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mountd/cache.c