Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/nfsserver/nfs_nfsdserv.c
Show First 20 Lines • Show All 416 Lines • ▼ Show 20 Lines | #endif | ||||
/* | /* | ||||
* Now that we have all the fields, lets do it. | * Now that we have all the fields, lets do it. | ||||
* If the size is being changed write access is required, otherwise | * If the size is being changed write access is required, otherwise | ||||
* just check for a read only file system. | * just check for a read only file system. | ||||
*/ | */ | ||||
if (!nd->nd_repstat) { | if (!nd->nd_repstat) { | ||||
if (NFSVNO_NOTSETSIZE(&nva)) { | if (NFSVNO_NOTSETSIZE(&nva)) { | ||||
if (NFSVNO_EXRDONLY(exp) || | if (NFSVNO_EXRDONLY(exp) || | ||||
(vfs_flags(vnode_mount(vp)) & MNT_RDONLY)) | (vfs_flags(vp->v_mount) & MNT_RDONLY)) | ||||
nd->nd_repstat = EROFS; | nd->nd_repstat = EROFS; | ||||
} else { | } else { | ||||
if (vnode_vtype(vp) != VREG) | if (vnode_vtype(vp) != VREG) | ||||
nd->nd_repstat = EINVAL; | nd->nd_repstat = EINVAL; | ||||
else if (nva2.na_uid != nd->nd_cred->cr_uid || | else if (nva2.na_uid != nd->nd_cred->cr_uid || | ||||
NFSVNO_EXSTRICTACCESS(exp)) | NFSVNO_EXSTRICTACCESS(exp)) | ||||
nd->nd_repstat = nfsvno_accchk(vp, | nd->nd_repstat = nfsvno_accchk(vp, | ||||
VWRITE, nd->nd_cred, exp, p, | VWRITE, nd->nd_cred, exp, p, | ||||
▲ Show 20 Lines • Show All 5,436 Lines • Show Last 20 Lines |