diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-31 20:42:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-31 20:42:33 +0000 |
commit | a92a8621636869003cc7fada3282dabf8e2908d8 (patch) | |
tree | 021ef70139e06dead02f634e58755fca23983d72 /sys/net/bpf.c | |
parent | 05848e415adc11c00256a98bcdc331082dfef00a (diff) |
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/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 7a447e1f6ac..a3e4f17c32a 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.9 1997/03/17 16:29:37 niklas Exp $ */ +/* $OpenBSD: bpf.c,v 1.10 1997/08/31 20:42:29 deraadt Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -522,14 +522,10 @@ static __inline void bpf_wakeup(d) register struct bpf_d *d; { - struct proc *p; - wakeup((caddr_t)d); if (d->bd_async && d->bd_sig) - if (d->bd_pgid > 0) - gsignal (d->bd_pgid, d->bd_sig); - else if ((p = pfind (-d->bd_pgid)) != NULL) - psignal (p, d->bd_sig); + csignal(d->bd_pgid, d->bd_sig, + d->bd_siguid, d->bd_sigeuid); #if BSD >= 199103 selwakeup(&d->bd_sel); @@ -822,6 +818,8 @@ bpfioctl(dev, cmd, addr, flag, p) */ case TIOCSPGRP: /* Process or group to send signals to */ d->bd_pgid = *(int *)addr; + d->bd_siguid = p->p_cred->p_ruid; + d->bd_sigeuid = p->p_ucred->cr_uid; break; case TIOCGPGRP: |