summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>1998-11-11 10:04:13 +0000
committertruckman <truckman@FreeBSD.org>1998-11-11 10:04:13 +0000
commitde184682fa22833c7b18a96a136bc031ae786434 (patch)
treeb9b62a0e361f25bc4ed8f9636cce5f2fd2f12423 /sys/kern/uipc_socket.c
parent225b2f25416b4a11b425250105d4acbfc5bd5638 (diff)
downloadFreeBSD-src-de184682fa22833c7b18a96a136bc031ae786434.zip
FreeBSD-src-de184682fa22833c7b18a96a136bc031ae786434.tar.gz
Installed the second patch attached to kern/7899 with some changes suggested
by bde, a few other tweaks to get the patch to apply cleanly again and some improvements to the comments. This change closes some fairly minor security holes associated with F_SETOWN, fixes a few bugs, and removes some limitations that F_SETOWN had on tty devices. For more details, see the description on the PR. Because this patch increases the size of the proc and pgrp structures, it is necessary to re-install the includes and recompile libkvm, the vinum lkm, fstat, gcore, gdb, ipfilter, ps, top, and w. PR: kern/7899 Reviewed by: bde, elvind
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 05d312f..275e94b 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94
- * $Id: uipc_socket.c,v 1.44 1998/08/31 15:34:55 wollman Exp $
+ * $Id: uipc_socket.c,v 1.45 1998/08/31 18:07:23 wollman Exp $
*/
#include <sys/param.h>
@@ -218,6 +218,7 @@ soclose(so)
int s = splnet(); /* conservative */
int error = 0;
+ funsetown(so->so_sigio);
if (so->so_options & SO_ACCEPTCONN) {
struct socket *sp, *sonext;
@@ -1182,10 +1183,8 @@ sohasoutofband(so)
{
struct proc *p;
- if (so->so_pgid < 0)
- gsignal(-so->so_pgid, SIGURG);
- else if (so->so_pgid > 0 && (p = pfind(so->so_pgid)) != 0)
- psignal(p, SIGURG);
+ if (so->so_sigio != NULL)
+ pgsigio(so->so_sigio, SIGURG, 0);
selwakeup(&so->so_rcv.sb_sel);
}
OpenPOWER on IntegriCloud