summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_socket.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-08-31 20:42:01 +0000
committerderaadt <deraadt@openbsd.org>1997-08-31 20:42:01 +0000
commit31e15491b0ac1938de22018ee666cadb4f082315 (patch)
tree580db7b1abf7a7be9250a8b15b6b2dcf8c63308f /sys/kern/sys_socket.c
parentonly check for ftp bounce in tcp, duh. for nonreserved ports, do not (diff)
downloadwireguard-openbsd-31e15491b0ac1938de22018ee666cadb4f082315.tar.xz
wireguard-openbsd-31e15491b0ac1938de22018ee666cadb4f082315.zip
for non-tty TIOCSPGRP/F_SETOWN/FIOSETOWN pgid setting calls, store uid
and euid as well, then deliver them using new csignal() interface which ensures that pgid setting process is permitted to signal the pgid process(es). Thanks to newsham@aloha.net for extensive help and discussion.
Diffstat (limited to 'sys/kern/sys_socket.c')
-rw-r--r--sys/kern/sys_socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c
index b0a67f398ce..f25e4b5d445 100644
--- a/sys/kern/sys_socket.c
+++ b/sys/kern/sys_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_socket.c,v 1.2 1997/02/24 14:19:59 niklas Exp $ */
+/* $OpenBSD: sys_socket.c,v 1.3 1997/08/31 20:42:23 deraadt Exp $ */
/* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */
/*
@@ -39,6 +39,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/file.h>
+#include <sys/proc.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
@@ -112,6 +113,8 @@ soo_ioctl(fp, cmd, data, p)
case SIOCSPGRP:
so->so_pgid = *(int *)data;
+ so->so_siguid = p->p_cred->p_ruid;
+ so->so_sigeuid = p->p_ucred->cr_uid;
return (0);
case SIOCGPGRP: