Use the label from the socket credential rather than the

solabel which was not set by the mac_partition policy.

Spotted by:	rwatson
Reviewed by:	rwatson
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2008-10-17 08:58:33 +00:00
parent 1455fd2638
commit 4a5216a6dc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183970

View File

@ -51,6 +51,7 @@
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/socketvar.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
@ -248,7 +249,7 @@ partition_socket_check_visible(struct ucred *cred, struct socket *so,
{
int error;
error = label_on_label(cred->cr_label, solabel);
error = label_on_label(cred->cr_label, so->so_cred->cr_label);
return (error ? ENOENT : 0);
}