From 9de9cb5c7c5a9dd117de703ed7b4c80a8b3eb2b3 Mon Sep 17 00:00:00 2001 From: Joe Talbott Date: Mon, 29 Nov 2010 21:03:20 -0500 Subject: [PATCH] unp_connect() - Use euid/egid for access checks via VOP_EACCESS(). Fixes socket access for set[ug]id applications by using the euid/egid rather than the uid/gid. Reported-By: Tim Darby --- sys/kern/uipc_usrreq.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 3421e0c..b3c9986 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -868,7 +868,7 @@ unp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) error = ENOTSOCK; goto bad; } - error = VOP_ACCESS(vp, VWRITE, p->p_ucred); + error = VOP_EACCESS(vp, VWRITE, p->p_ucred); if (error) goto bad; so2 = vp->v_socket; -- 1.7.7.2