linux/fs/nfsd
Frank Filz 406a7ea97d nfsd: Allow AIX client to read dir containing mountpoints
This patch addresses a compatibility issue with a Linux NFS server and
AIX NFS client.

I have exported /export as fsid=0 with sec=krb5:krb5i
I have mount --bind /home onto /export/home
I have exported /export/home with sec=krb5i

The AIX client mounts / -o sec=krb5:krb5i onto /mnt

If I do an ls /mnt, the AIX client gets a permission error. Looking at
the network traceIwe see a READDIR looking for attributes
FATTR4_RDATTR_ERROR and FATTR4_MOUNTED_ON_FILEID. The response gives a
NFS4ERR_WRONGSEC which the AIX client is not expecting.

Since the AIX client is only asking for an attribute that is an
attribute of the parent file system (pseudo root in my example), it
seems reasonable that there should not be an error.

In discussing this issue with Bruce Fields, I initially proposed
ignoring the error in nfsd4_encode_dirent_fattr() if all that was being
asked for was FATTR4_RDATTR_ERROR and FATTR4_MOUNTED_ON_FILEID, however,
Bruce suggested that we avoid calling cross_mnt() if only these
attributes are requested.

The following patch implements bypassing cross_mnt() if only
FATTR4_RDATTR_ERROR and FATTR4_MOUNTED_ON_FILEID are called. Since there
is some complexity in the code in nfsd4_encode_fattr(), I didn't want to
duplicate code (and introduce a maintenance nightmare), so I added a
parameter to nfsd4_encode_fattr() that indicates whether it should
ignore cross mounts and simply fill in the attribute using the passed in
dentry as opposed to it's parent.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01 16:42:06 -05:00
..
auth.c knfsd: clean up EX_RDONLY 2007-07-19 10:04:52 -07:00
auth.h nfsd: minor fs/nfsd/auth.h cleanup 2008-02-01 16:42:05 -05:00
export.c knfsd: allow cache_register to return error on failure 2008-02-01 16:42:05 -05:00
lockd.c knfsd: lockd: nfsd4: use same grace period for lockd and nfsd4 2007-07-17 10:23:07 -07:00
Makefile knfsd: trivial makefile cleanup 2007-05-09 12:30:54 -07:00
nfs2acl.c nfsd: Fix inconsistent assignment 2008-02-01 16:42:01 -05:00
nfs3acl.c knfsd: fix spurious EINVAL errors on first access of new filesystem 2007-11-12 14:28:08 -08:00
nfs3proc.c RPC: add wrapper for svc_reserve to account for checksum 2007-05-09 12:30:54 -07:00
nfs3xdr.c nfsd: fix encode_entryplus_baggage() indentation 2008-02-01 16:42:06 -05:00
nfs4acl.c knfsd: nfsd4: fix handling of acl errrors 2007-07-17 10:23:07 -07:00
nfs4callback.c nfsd4: recognize callback channel failure earlier 2008-02-01 16:42:06 -05:00
nfs4idmap.c knfsd: allow cache_register to return error on failure 2008-02-01 16:42:05 -05:00
nfs4proc.c nfsd: Allow AIX client to read dir containing mountpoints 2008-02-01 16:42:06 -05:00
nfs4recover.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
nfs4state.c nfsd4: fix bad seqid on lock request incompatible with open mode 2008-02-01 16:42:06 -05:00
nfs4xdr.c nfsd: Allow AIX client to read dir containing mountpoints 2008-02-01 16:42:06 -05:00
nfscache.c nfsd: fail module init on reply cache init failure 2008-02-01 16:42:04 -05:00
nfsctl.c knfsd: allow cache_register to return error on failure 2008-02-01 16:42:05 -05:00
nfsfh.c nfsd: move nfsd/auth.h into fs/nfsd 2008-02-01 16:42:05 -05:00
nfsproc.c knfsd: nfsd4: make readonly access depend on pseudoflavor 2007-07-17 10:23:08 -07:00
nfssvc.c knfsd: move nfsv4 slab creation/destruction to module init/exit 2007-10-09 18:31:56 -04:00
nfsxdr.c nfsd: move nfsd/auth.h into fs/nfsd 2008-02-01 16:42:05 -05:00
stats.c [PATCH] knfsd: nfsd4: add per-operation server stats 2006-07-10 13:24:27 -07:00
vfs.c NFSD: Adjust filename length argument of nfsd_lookup 2008-02-01 16:42:03 -05:00