Lines 3570-3575
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3570 |
NFSM_BUILD(repp, u_int32_t *, 2 * NFSX_UNSIGNED); |
3570 |
NFSM_BUILD(repp, u_int32_t *, 2 * NFSX_UNSIGNED); |
3571 |
*repp++ = *tl; |
3571 |
*repp++ = *tl; |
3572 |
op = fxdr_unsigned(int, *tl); |
3572 |
op = fxdr_unsigned(int, *tl); |
|
|
3573 |
nd->nd_procnum = op; |
3574 |
if (i == 0 && op != NFSV4OP_CBSEQUENCE && minorvers != |
3575 |
NFSV4_MINORVERSION) { |
3576 |
nd->nd_repstat = NFSERR_OPNOTINSESS; |
3577 |
*repp = nfscl_errmap(nd, minorvers); |
3578 |
retops++; |
3579 |
break; |
3580 |
} |
3573 |
if (op < NFSV4OP_CBGETATTR || |
3581 |
if (op < NFSV4OP_CBGETATTR || |
3574 |
(op > NFSV4OP_CBRECALL && minorvers == NFSV4_MINORVERSION) || |
3582 |
(op > NFSV4OP_CBRECALL && minorvers == NFSV4_MINORVERSION) || |
3575 |
(op > NFSV4OP_CBNOTIFYDEVID && |
3583 |
(op > NFSV4OP_CBNOTIFYDEVID && |
Lines 3581-3587
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3581 |
retops++; |
3589 |
retops++; |
3582 |
break; |
3590 |
break; |
3583 |
} |
3591 |
} |
3584 |
nd->nd_procnum = op; |
|
|
3585 |
if (op < NFSV42_CBNOPS) |
3592 |
if (op < NFSV42_CBNOPS) |
3586 |
nfsstatsv1.cbrpccnt[nd->nd_procnum]++; |
3593 |
nfsstatsv1.cbrpccnt[nd->nd_procnum]++; |
3587 |
switch (op) { |
3594 |
switch (op) { |
Lines 3593-3601
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3593 |
if (!error) |
3600 |
if (!error) |
3594 |
error = nfsrv_getattrbits(nd, &attrbits, |
3601 |
error = nfsrv_getattrbits(nd, &attrbits, |
3595 |
NULL, NULL); |
3602 |
NULL, NULL); |
3596 |
if (error == 0 && i == 0 && |
|
|
3597 |
minorvers != NFSV4_MINORVERSION) |
3598 |
error = NFSERR_OPNOTINSESS; |
3599 |
if (!error) { |
3603 |
if (!error) { |
3600 |
mp = nfscl_getmnt(minorvers, sessionid, cbident, |
3604 |
mp = nfscl_getmnt(minorvers, sessionid, cbident, |
3601 |
&clp); |
3605 |
&clp); |
Lines 3659-3667
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3659 |
tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); |
3663 |
tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); |
3660 |
trunc = fxdr_unsigned(int, *tl); |
3664 |
trunc = fxdr_unsigned(int, *tl); |
3661 |
error = nfsm_getfh(nd, &nfhp); |
3665 |
error = nfsm_getfh(nd, &nfhp); |
3662 |
if (error == 0 && i == 0 && |
|
|
3663 |
minorvers != NFSV4_MINORVERSION) |
3664 |
error = NFSERR_OPNOTINSESS; |
3665 |
if (!error) { |
3666 |
if (!error) { |
3666 |
NFSLOCKCLSTATE(); |
3667 |
NFSLOCKCLSTATE(); |
3667 |
if (minorvers == NFSV4_MINORVERSION) |
3668 |
if (minorvers == NFSV4_MINORVERSION) |
Lines 3716-3723
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3716 |
NFSBCOPY(tl, stateid.other, NFSX_STATEIDOTHER); |
3717 |
NFSBCOPY(tl, stateid.other, NFSX_STATEIDOTHER); |
3717 |
if (minorvers == NFSV4_MINORVERSION) |
3718 |
if (minorvers == NFSV4_MINORVERSION) |
3718 |
error = NFSERR_NOTSUPP; |
3719 |
error = NFSERR_NOTSUPP; |
3719 |
else if (i == 0) |
|
|
3720 |
error = NFSERR_OPNOTINSESS; |
3721 |
NFSCL_DEBUG(4, "off=%ju len=%ju sq=%u err=%d\n", |
3720 |
NFSCL_DEBUG(4, "off=%ju len=%ju sq=%u err=%d\n", |
3722 |
(uintmax_t)off, (uintmax_t)len, |
3721 |
(uintmax_t)off, (uintmax_t)len, |
3723 |
stateid.seqid, error); |
3722 |
stateid.seqid, error); |
Lines 3828-3833
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3828 |
} |
3827 |
} |
3829 |
break; |
3828 |
break; |
3830 |
case NFSV4OP_CBSEQUENCE: |
3829 |
case NFSV4OP_CBSEQUENCE: |
|
|
3830 |
if (i != 0) { |
3831 |
error = NFSERR_SEQUENCEPOS; |
3832 |
break; |
3833 |
} |
3831 |
NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID + |
3834 |
NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID + |
3832 |
5 * NFSX_UNSIGNED); |
3835 |
5 * NFSX_UNSIGNED); |
3833 |
bcopy(tl, sessionid, NFSX_V4SESSIONID); |
3836 |
bcopy(tl, sessionid, NFSX_V4SESSIONID); |
Lines 3849-3860
nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
Link Here
|
3849 |
} |
3852 |
} |
3850 |
} |
3853 |
} |
3851 |
NFSLOCKCLSTATE(); |
3854 |
NFSLOCKCLSTATE(); |
3852 |
if (i == 0) { |
3855 |
clp = nfscl_getclntsess(sessionid); |
3853 |
clp = nfscl_getclntsess(sessionid); |
3856 |
if (clp == NULL) |
3854 |
if (clp == NULL) |
3857 |
error = NFSERR_SERVERFAULT; |
3855 |
error = NFSERR_SERVERFAULT; |
|
|
3856 |
} else |
3857 |
error = NFSERR_SEQUENCEPOS; |
3858 |
if (error == 0) { |
3858 |
if (error == 0) { |
3859 |
tsep = nfsmnt_mdssession(clp->nfsc_nmp); |
3859 |
tsep = nfsmnt_mdssession(clp->nfsc_nmp); |
3860 |
error = nfsv4_seqsession(seqid, slotid, |
3860 |
error = nfsv4_seqsession(seqid, slotid, |