2007-12-03 23:13:26

by Frank Filz

[permalink] [raw]
Subject: Re: [NFS] nfs-utils crossmnt/fsid bug

On Fri, 2007-11-23 at 13:50 +1100, Neil Brown wrote:
> On Wednesday September 5, [email protected] wrote:
> > With an exports entry like
> >
> > /exports *.citi.umich.edu(rw,crossmnt,fsid=0)
> >
> > and some other stuff mounted under /exports, I get an odd situation
> > where listing /exports/submnt/ shows me the contents of /exports/.
> >
> > I looks to me like what's happening is that the new code to
> > automatically export filesystems under crossmnt exports is exporting
> > those directories with the fsid option turned on, with the result that
> > the root of each of those subdirectories ends up with the same
> > filehandle as the root of /exports, and the hilarity ensues. But I
> > haven't tried a patch yet.
> >
> > Does that make sense? I assume we should just clear the fsid flag on
> > submounts, as it's never going to make sense, and leave the logic
> > otherwise intact.
> >
> > --b.
>
> Thanks for noticing and reporting this.
>
> Does this (untested, but it compiles) patch seem right?

In testing security negotiation, I ran into this problem. I've tried
this patch and it doesn't seem to be working right. My exports file is:

/export/home gss/krb5i(nohide,insecure,no_subtree_check,no_root_squash,async,rw)
/export/home gss/krb5p(nohide,insecure,no_subtree_check,no_root_squash,async,rw)
/export gss/krb5(fsid=0,insecure,no_subtree_check,no_root_squash,async,rw,crossmnt)
/export gss/krb5i(fsid=0,insecure,no_subtree_check,no_root_squash,async,rw,crossmnt)

>From the client I execute:

mount -overs=4,sec=krb5 elm3a19.beaverton.ibm.com:/ /mnt
ls -l /mnt/home

I added some debug logging, and I see the different_fs path being taken
on the /export/home. I'm wondering, could there be a kernel part to this
also?

Thanks

Frank Filz


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs



2007-12-11 21:48:15

by Frank Filz

[permalink] [raw]
Subject: Re: [NFS] nfs-utils crossmnt/fsid bug

Ok, I've looked at this issue some more. The crossmnt and nohide options
work correctly so long as security negotiation isn't required to cross
the mount point (whether the mount command provides the correct set of
security flavors or not). If the crossmnt export option is provided in
this case (whether or not nohide is specified on the child export), an
ls of the /mnt/home ends up with the results from an ls of /mnt. If the
crossmnt option is not specified on the parent but nohide is specified
on the child, an ls -l of /mnt results in slightly different contents
while an ls -l of /mnt/home results in the contents of the hidden
directory on the parent export.

These behaviors seem undesirable, but perhaps not worth eliminating
since they do represent something unsupported by the old format which is
deprecated in favor of the new format where everything works just fine.

Frank Filz



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs