PERFORCE change 77201 for review
Christian S.J. Peron
csjp at FreeBSD.org
Fri May 20 00:17:48 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=77201
Change 77201 by csjp at 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);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list