summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2018-02-19 08:59:52 +0000
committermpi <mpi@openbsd.org>2018-02-19 08:59:52 +0000
commit3e6763994aeb80a553b07ba51b1db2c4725c5c88 (patch)
tree7c22e72ae7c90d9bbd118efba70226239e57d9a6 /sys/kern/tty.c
parentIn x509.h rev. 1.29 2018/02/17 15:50:42, jsing@ provided (diff)
downloadwireguard-openbsd-3e6763994aeb80a553b07ba51b1db2c4725c5c88.tar.xz
wireguard-openbsd-3e6763994aeb80a553b07ba51b1db2c4725c5c88.zip
Remove almost unused `flags' argument of suser().
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 51eb2b3c71b..b9fec5b6bb9 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.136 2018/02/06 01:24:31 tedu Exp $ */
+/* $OpenBSD: tty.c,v 1.137 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -829,7 +829,7 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
splx(s);
break;
case TIOCGPGRP: /* get pgrp of tty */
- if (!isctty(pr, tp) && suser(p, 0))
+ if (!isctty(pr, tp) && suser(p))
return (ENOTTY);
*(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
break;