PERFORCE change 42495 for review
Robert Watson
rwatson at FreeBSD.org
Sun Nov 16 00:06:05 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=42495
Change 42495 by rwatson at rwatson_tislabs on 2003/11/15 16:05:47
For getsockopt() to retrieve MAC labels, we must copy in the
struct mac so we know what labels to externalize. This
appears to fix SO_LABEL but not SO_PEERLABEL for reason I
am still working on figuring out.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/kern/uipc_socket.c#55 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/kern/uipc_socket.c#55 (text+ko) ====
@@ -1599,6 +1599,10 @@
break;
case SO_LABEL:
#ifdef MAC
+ error = sooptcopyin(sopt, &extmac, sizeof(extmac),
+ sizeof(extmac));
+ if (error)
+ return (error);
error = mac_getsockopt_label_get(
sopt->sopt_td->td_ucred, so, &extmac);
if (error)
@@ -1610,6 +1614,10 @@
break;
case SO_PEERLABEL:
#ifdef MAC
+ error = sooptcopyin(sopt, &extmac, sizeof(extmac),
+ sizeof(extmac));
+ if (error)
+ return (error);
error = mac_getsockopt_peerlabel_get(
sopt->sopt_td->td_ucred, so, &extmac);
if (error)
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