Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsserver/nfs_nfsdport.c
Show First 20 Lines • Show All 1,277 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Do a mknod vnode op. | * Do a mknod vnode op. | ||||
*/ | */ | ||||
int | int | ||||
nfsvno_mknod(struct nameidata *ndp, struct nfsvattr *nvap, struct ucred *cred, | nfsvno_mknod(struct nameidata *ndp, struct nfsvattr *nvap, struct ucred *cred, | ||||
struct thread *p) | struct thread *p) | ||||
{ | { | ||||
int error = 0; | int error = 0; | ||||
enum vtype vtyp; | __enum_uint8(vtype) vtyp; | ||||
vtyp = nvap->na_type; | vtyp = nvap->na_type; | ||||
/* | /* | ||||
* Iff doesn't exist, create it. | * Iff doesn't exist, create it. | ||||
*/ | */ | ||||
if (ndp->ni_vp) { | if (ndp->ni_vp) { | ||||
nfsvno_relpathbuf(ndp); | nfsvno_relpathbuf(ndp); | ||||
vput(ndp->ni_dvp); | vput(ndp->ni_dvp); | ||||
▲ Show 20 Lines • Show All 5,735 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Check to see if a put file handle operation should test for | * Check to see if a put file handle operation should test for | ||||
* NFSERR_WRONGSEC, although NFSv3 actually returns NFSERR_AUTHERR. | * NFSERR_WRONGSEC, although NFSv3 actually returns NFSERR_AUTHERR. | ||||
* When Open is the next operation, NFSERR_WRONGSEC cannot be | * When Open is the next operation, NFSERR_WRONGSEC cannot be | ||||
* replied for the Open cases that use a component. This can | * replied for the Open cases that use a component. This can | ||||
* be identified by the fact that the file handle's type is VDIR. | * be identified by the fact that the file handle's type is VDIR. | ||||
*/ | */ | ||||
bool | bool | ||||
nfsrv_checkwrongsec(struct nfsrv_descript *nd, int nextop, enum vtype vtyp) | nfsrv_checkwrongsec(struct nfsrv_descript *nd, int nextop, __enum_uint8(vtype) vtyp) | ||||
{ | { | ||||
if ((nd->nd_flag & ND_NFSV4) == 0) | if ((nd->nd_flag & ND_NFSV4) == 0) | ||||
return (true); | return (true); | ||||
if ((nd->nd_flag & ND_LASTOP) != 0) | if ((nd->nd_flag & ND_LASTOP) != 0) | ||||
return (false); | return (false); | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |