Date: Fri, 21 Nov 2003 11:39:44 -0800 (PST) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 42899 for review Message-ID: <200311211939.hALJdi5r005133@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=42899 Change 42899 by rwatson@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311211939.hALJdi5r005133>