diff --git a/sys/security/mac_partition/mac_partition.c b/sys/security/mac_partition/mac_partition.c index 255e776f6a9..6a455a80b3d 100644 --- a/sys/security/mac_partition/mac_partition.c +++ b/sys/security/mac_partition/mac_partition.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -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); }