PERFORCE change 42899 for review
Robert Watson
rwatson at FreeBSD.org
Fri Nov 21 19:39:44 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=42899
Change 42899 by rwatson at rwatson_tislabs on 2003/11/21 11:39:43
Apply cvance's fix to the MAC and SEBSD branches to the SEDarwin
branch: correct logic in the event that a userspace process
requests externalization of multiple optional labels, and
we satisfy only one. Otherwise, there's an extra leading
comma.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_mac.c#32 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_mac.c#32 (text+ko) ====
@@ -446,10 +446,9 @@
} else \
ignorenotfound = 0; \
savedlen = sbuf_len(&sb); \
- if (first) { \
+ if (first) \
error = sbuf_printf(&sb, "%s/", element_name); \
- first = 0; \
- } else \
+ else \
error = sbuf_printf(&sb, ",%s/", element_name); \
if (error == -1) { \
error = ENOMEM; /* XXX: E2BIG? */ \
@@ -466,7 +465,9 @@
} else if (claimed != 1) { \
error = ENOENT; /* XXX: ENOLABEL? */ \
break; \
- } \
+ } else { \
+ first = 0; \
+ } \
} \
sbuf_finish(&sb); \
} while (0)
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