kNFSd - 8 of 8 - Set nfsd user every time a filehandle is verified.
Subsystems (3)
PATCH 1/1 kNFSd - 8 of 8 - Set nfsd user every time a filehandle is verified.
### Comments for ChangeSet
request might traverse several export points which may have different uid squashing.
----------- Diffstat output ------------
./fs/nfsd/auth.c | 4 ---- ./fs/nfsd/nfsfh.c | 7 ++++--- ./include/linux/sunrpc/svc.h | 1 - ./net/sunrpc/svcsock.c | 1 - 4 files changed, 4 insertions(+), 9 deletions(-)
fs/nfsd/auth.c renamed from fs/nfsd/auth.c~current~ +0 -4
@@ -17,9 +17,6 @@ nfsd_setuser(struct svc_rqst *rqstp, strstruct svc_cred *cred = &rqstp->rq_cred;int i; -if (rqstp->rq_userset) -return ; -if (exp->ex_flags &NFSEXP_ALLSQUASH ) { cred->cr_uid = exp->ex_anon_uid; cred->cr_gid = exp->ex_anon_gid;
@@ -57,5 +54,4 @@ nfsd_setuser(struct svc_rqst *rqstp, str current->cap_permitted); } - rqstp->rq_userset =1 ; }
fs/nfsd/nfsfh.c renamed from fs/nfsd/nfsfh.c~current~ +4 -3
@@ -161,9 +161,6 @@ fh_verify(struct svc_rqst *rqstp, struct goto out; } -/* Set user creds if we haven't done so already. */ -nfsd_setuser (rqstp, exp); -/* * Look up the dentry using the NFS file handle. */
@@ -223,6 +220,10 @@ fh_verify(struct svc_rqst *rqstp, struct inode = dentry->d_inode; + +/* Set user creds for this exportpoint */ +nfsd_setuser (rqstp, exp); +/* Type check. The correct error return for type mismatches * does not seem to be generally agreed upon. SunOS seems to * use EISDIR if file isn't S_IFREG; a comment in the NFSv3
include/linux/sunrpc/svc.h renamed from include/linux/sunrpc/svc.h~current~ +0 -1
@@ -125,7 +125,6 @@ struct svc_rqst {u32 rq_proc;/* procedure number */ u32 rq_prot;/* IP protocol */ unsigned short - rq_userset : 1, /* auth->setuser OK */ rq_secure : 1; /* secure port */
net/sunrpc/svcsock.c renamed from net/sunrpc/svcsock.c~current~ +0 -1
@@ -1222,7 +1222,6 @@ svc_recv(struct svc_serv *serv, struct s } rqstp->rq_secure =ntohs (rqstp->rq_addr.sin_port) <1024 ; - rqstp->rq_userset =0 ; rqstp->rq_chandle.defer = svc_defer;if (serv->sv_stats)
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs