Skip to contentSkip to conversation

kNFSd - In READDIRPLUS reply, don't return a file handle for a mounted directory.

PATCH New NeilBrown 1 participant 1 message Oct 20, 2003

Subsystems (2)
lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 kNFSd - In READDIRPLUS reply, don't return a file handle for a mounted directory.

### Comments for ChangeSet

... as if "nohide" is in used, it will be the wrong filehandle, and returning a filehandle is optional anyway.

----------- Diffstat output ------------

 ./fs/nfsd/nfs3xdr.c |    2 ++
 1 files changed, 2 insertions(+)
fs/nfsd/nfs3xdr.c renamed from fs/nfsd/nfs3xdr.c~current~ +2 -0
diff ./fs/nfsd/nfs3xdr.c~current~ ./fs/nfsd/nfs3xdr.c
@@ -825,6 +825,8 @@ encode_entry(struct readdir_cd *ccd, con
 			dchild = lookup_one_len(name, dparent,namlen);
 		if (IS_ERR(dchild))
 			goto noexec;
+		if (d_mountpoint(dchild))
+			goto noexec;
 		if (fh_compose(&fh, exp, dchild, &cd->fh) != 0 || !dchild->d_inode)
 			goto noexec;
 		p = encode_post_op_attr(cd->rqstp, p, &fh);

-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs