Date: Fri, 20 May 2005 00:17:48 GMT From: "Christian S.J. Peron" <csjp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 77201 for review Message-ID: <200505200017.j4K0HmZP080639@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=77201 Change 77201 by csjp@csjp_xor on 2005/05/20 00:17:30 -replace a size_t for int in the checksum calculation routines -declare temp variable to stuff the size of the extended attribute in. We have to do this because for some reason the data type representing extended attribute size between vn_extattr_get and VOP_GETEXTATTR conflict. This makes the mac_chkexec build happy on AMD64 Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_chkexec/mac_chkexec.c#8 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_chkexec/mac_chkexec.c#8 (text+ko) ==== @@ -419,7 +419,7 @@ MD5_CTX md5ctx; u_quad_t b; int error, count; - size_t resid; + int resid; struct vattr va; caddr_t bufobj; @@ -465,7 +465,7 @@ SHA1_CTX sha1ctx; u_quad_t b; int error, count; - size_t resid; + int resid; struct vattr va; caddr_t bufobj; @@ -510,15 +510,20 @@ char *depends, **ap, *paths[10]; int error, i, npaths; struct nameidata nd; - size_t alen; - + int alen; + size_t ealen; + ASSERT_VOP_LOCKED(vp, "no vlock held"); error = VOP_GETEXTATTR(vp, MAC_CHKEXEC_ATTRN, MAC_CHKEXEC_DEP, - NULL, &alen, NOCRED, curthread); + NULL, &ealen, NOCRED, curthread); if (error != 0 && error == ENOATTR) return (0); else if (error) return (error); + /* XXX why are'nt extended attribute size specification types between + * VOP_GETEXTATTR and vn_extattr_get the same? + */ + alen = ealen; depends = malloc(alen + 1, M_CHKEXEC, M_WAITOK | M_ZERO); error = vn_extattr_get(vp, IO_NODELOCKED, MAC_CHKEXEC_ATTRN, MAC_CHKEXEC_DEP, &alen, depends, curthread);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505200017.j4K0HmZP080639>