Date: Sat, 22 Mar 2003 18:58:03 -0800 (PST) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 27243 for review Message-ID: <200303230258.h2N2w3O9017774@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=27243 Change 27243 by rwatson@rwatson_paprika on 2003/03/22 18:57:46 Apply the cmask to nfs_mnod(). Note that due to the semantics of the vap->nfsattr conversion macro for NFSv3, we have to modify caller-owned vap memory, which is unfortunate. Affected files ... .. //depot/projects/trustedbsd/acl/sys/nfsclient/nfs_vnops.c#5 edit Differences ... ==== //depot/projects/trustedbsd/acl/sys/nfsclient/nfs_vnops.c#5 (text+ko) ==== @@ -1184,7 +1184,7 @@ */ static int nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, - struct vattr *vap) + struct vattr *vap, int cmask) { struct nfsv2_sattr *sp; u_int32_t *tl; @@ -1197,6 +1197,12 @@ u_int32_t rdev; int v3 = NFS_ISV3(dvp); + /* + * XXXACL: This changes the value in vap, which is caller-owned + * memory. Unfortunately, nfsm_v3attrbuild accepts a full + * vattr, not just the elements. + */ + vap->va_mode &= ~cmask; if (vap->va_type == VCHR || vap->va_type == VBLK) rdev = txdr_unsigned(vap->va_rdev); else if (vap->va_type == VFIFO || vap->va_type == VSOCK) @@ -1273,7 +1279,8 @@ nfs_mknod(struct vop_mknod_args *ap) { - return nfs_mknodrpc(ap->a_dvp, ap->a_vpp, ap->a_cnp, ap->a_vap); + return nfs_mknodrpc(ap->a_dvp, ap->a_vpp, ap->a_cnp, ap->a_vap, + ap->a_cmask); } static u_long create_verf; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the messagehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303230258.h2N2w3O9017774>
