summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-10-09 21:40:30 +0000
committerrwatson <rwatson@FreeBSD.org>2001-10-09 21:40:30 +0000
commitf51eaee62f1741aa1e1ae2c617c4219ef53e3cd8 (patch)
tree27edf05b443ffb7ba251232e556388f4f7b779ec /sys/kern/uipc_socket.c
parentb80c438c9dcc5c4280cd8aa405c772bbef095f61 (diff)
downloadFreeBSD-src-f51eaee62f1741aa1e1ae2c617c4219ef53e3cd8.zip
FreeBSD-src-f51eaee62f1741aa1e1ae2c617c4219ef53e3cd8.tar.gz
- Combine kern.ps_showallprocs and kern.ipc.showallsockets into
a single kern.security.seeotheruids_permitted, describes as: "Unprivileged processes may see subjects/objects with different real uid" NOTE: kern.ps_showallprocs exists in -STABLE, and therefore there is an API change. kern.ipc.showallsockets does not. - Check kern.security.seeotheruids_permitted in cr_cansee(). - Replace visibility calls to socheckuid() with cr_cansee() (retain the change to socheckuid() in ipfw, where it is used for rule-matching). - Remove prison_unpcb() and make use of cr_cansee() against the UNIX domain socket credential instead of comparing root vnodes for the UDS and the process. This allows multiple jails to share the same chroot() and not see each others UNIX domain sockets. - Remove unused socheckproc(). Now that cr_cansee() is used universally for socket visibility, a variety of policies are more consistently enforced, including uid-based restrictions and jail-based restrictions. This also better-supports the introduction of additional MAC models. Reviewed by: ps, billf Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 94b6b00..65ef837 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -92,10 +92,6 @@ static int somaxconn = SOMAXCONN;
SYSCTL_INT(_kern_ipc, KIPC_SOMAXCONN, somaxconn, CTLFLAG_RW,
&somaxconn, 0, "Maximum pending socket connection queue size");
-int showallsockets = 1;
-SYSCTL_INT(_kern_ipc, OID_AUTO, showallsockets, CTLFLAG_RW, &showallsockets,
- 0, "show users all other users pcb data");
-
/*
* Socket operation routines.
* These routines are called by the routines in
@@ -1659,18 +1655,3 @@ socheckuid(struct socket *so, uid_t uid)
return (0);
return (EPERM);
}
-
-int
-socheckproc(struct socket *so, struct proc *p)
-{
-
- if (p == NULL)
- return (ESRCH);
- if (socheckuid(so, p->p_ucred->cr_ruid) == 0)
- return (0);
- if (socheckuid(so, p->p_ucred->cr_uid) == 0)
- return (0);
- if (!suser_xxx(0, p, PRISON_ROOT))
- return (0);
- return (EPERM);
-}
OpenPOWER on IntegriCloud