Add an additional MAC check to the UNIX domain socket connect path:
check that the subject has read/write access to the vnode using the vnode MAC check. MFC after: 3 weeks Submitted by: Spencer Minear <spencer_minear at securecomputing dot com> Obtained from: TrustedBSD Project
This commit is contained in:
parent
0cd31a0d75
commit
6fac927ccc
@ -965,6 +965,11 @@ unp_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
|
||||
error = ENOTSOCK;
|
||||
goto bad;
|
||||
}
|
||||
#ifdef MAC
|
||||
error = mac_check_vnode_open(td->td_ucred, vp, VWRITE | VREAD);
|
||||
if (error)
|
||||
goto bad;
|
||||
#endif
|
||||
error = VOP_ACCESS(vp, VWRITE, td->td_ucred, td);
|
||||
if (error)
|
||||
goto bad;
|
||||
|
Loading…
Reference in New Issue
Block a user