Date: Fri, 28 Aug 2009 22:24:31 GMT From: Jonathan Anderson <jona@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 167934 for review Message-ID: <200908282224.n7SMOVje087527@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167934 Change 167934 by jona@jona-trustedbsd-belle-vmware on 2009/08/28 22:23:48 Some test code went into the last rev... putting things right now Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libuserangel/libuserangel.c#15 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libuserangel/libuserangel.c#15 (text+ko) ==== @@ -276,7 +276,7 @@ if(angel < 0) return NULL; int flags = 0; - cap_rights_t rights = CAP_SEEK | CAP_FSYNC | CAP_FCNTL | CAP_FCHFLAGS | CAP_MASK_VALID; + cap_rights_t rights = CAP_SEEK | CAP_FSYNC | CAP_FCNTL; if(strnstr(mode, "r+", 3)) { @@ -319,10 +319,6 @@ return NULL; } - char buf[80]; - bzero(buf, 80); - if(read(fd, buf, 35) < 0) perror("Error reading file"); - return fdopen(fd, mode); } @@ -807,11 +803,11 @@ void handle_error(const datum *d) { - int32_t errnum = 0; + int32_t errnum; char msg[200]; int msglen = 200; - ua_unmarshall_error(d, &errnum, msg, &msglen); + if(ua_unmarshall_error(d, &errnum, msg, &msglen) < 0) return; errno = errnum; printf("libuserangel error: %s\n", msg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908282224.n7SMOVje087527>