mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
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:
parent
1455fd2638
commit
4a5216a6dc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183970
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user