FreeBSD Bugzilla – Attachment 192667 Details for
Bug 227214
ESXi NFSv4.1 client sets bits in OpenDowngrade not recognized by the FreeBSD server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix OpenDowngrade to clear want bits and allow adding of deny bits
opendowngrade.patch (text/plain), 1.61 KB, created by
Rick Macklem
on 2018-04-19 20:18:08 UTC
(
hide
)
Description:
Fix OpenDowngrade to clear want bits and allow adding of deny bits
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2018-04-19 20:18:08 UTC
Size:
1.61 KB
patch
obsolete
>--- fs/nfsserver/nfs_nfsdserv.c.orig 2018-04-18 20:24:04.208691000 -0400 >+++ fs/nfsserver/nfs_nfsdserv.c 2018-04-19 16:54:34.388964000 -0400 >@@ -3235,6 +3235,8 @@ nfsrvd_opendowngrade(struct nfsrv_descri > tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); > stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++); > i = fxdr_unsigned(int, *tl++); >+ if ((nd->nd_flag & ND_NFSV41) != 0) >+ i &= ~NFSV4OPEN_WANTDELEGMASK; > switch (i) { > case NFSV4OPEN_ACCESSREAD: > stp->ls_flags = (NFSLCK_READACCESS | NFSLCK_DOWNGRADE); >@@ -3247,7 +3249,7 @@ nfsrvd_opendowngrade(struct nfsrv_descri > NFSLCK_DOWNGRADE); > break; > default: >- nd->nd_repstat = NFSERR_BADXDR; >+ nd->nd_repstat = NFSERR_INVAL; > } > i = fxdr_unsigned(int, *tl); > switch (i) { >@@ -3263,7 +3265,7 @@ nfsrvd_opendowngrade(struct nfsrv_descri > stp->ls_flags |= (NFSLCK_READDENY | NFSLCK_WRITEDENY); > break; > default: >- nd->nd_repstat = NFSERR_BADXDR; >+ nd->nd_repstat = NFSERR_INVAL; > } > > clientid.lval[0] = stp->ls_stateid.other[0]; >--- fs/nfsserver/nfs_nfsdstate.c.orig 2018-04-18 21:17:51.642392000 -0400 >+++ fs/nfsserver/nfs_nfsdstate.c 2018-04-19 16:51:20.196726000 -0400 >@@ -3386,10 +3386,11 @@ nfsrv_openupdate(vnode_t vp, struct nfss > } else { > /* > * Update the share bits, making sure that the new set are a >- * subset of the old ones. >+ * subset of the access bits and a superset of the deny bits. > */ > bits = (new_stp->ls_flags & NFSLCK_SHAREBITS); >- if (~(stp->ls_flags) & bits) { >+ if ((~(stp->ls_flags) & (bits & NFSLCK_ACCESSBITS)) || >+ ((stp->ls_flags & NFSLCK_DENYBITS) & ~bits)) { > NFSUNLOCKSTATE(); > error = NFSERR_INVAL; > goto out;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227214
:
192123
| 192667