PERFORCE change 167934 for review
Jonathan Anderson
jona at FreeBSD.org
Fri Aug 28 22:24:32 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=167934
Change 167934 by jona at 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);
More information about the p4-projects
mailing list