summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2015-12-03 18:21:00 +0000
committerblambert <blambert@openbsd.org>2015-12-03 18:21:00 +0000
commita124695af7aed58cdb85508ea9c9ca48ed674de9 (patch)
treecacd5c6233add9090115208c5b41bddb63ca1676
parenttweak previous; (diff)
downloadwireguard-openbsd-a124695af7aed58cdb85508ea9c9ca48ed674de9.tar.xz
wireguard-openbsd-a124695af7aed58cdb85508ea9c9ca48ed674de9.zip
remove code that's been #ifdef'ed out for 20 years
ok deraadt@
-rw-r--r--sys/kern/tty_tty.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 577d7a34eed..343fd722b9a 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_tty.c,v 1.15 2015/05/01 01:30:58 millert Exp $ */
+/* $OpenBSD: tty_tty.c,v 1.16 2015/12/03 18:21:00 blambert Exp $ */
/* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */
/*-
@@ -59,20 +59,7 @@ cttyopen(dev_t dev, int flag, int mode, struct proc *p)
if (ttyvp == NULL)
return (ENXIO);
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
-#ifdef PARANOID
- /*
- * Since group is tty and mode is 620 on most terminal lines
- * and since sessions protect terminals from processes outside
- * your session, this check is probably no longer necessary.
- * Since it inhibits setuid root programs that later switch
- * to another user from accessing /dev/tty, we have decided
- * to delete this test. (mckusick 5/93)
- */
- error = VOP_ACCESS(ttyvp,
- (flag&FREAD ? VREAD : 0) | (flag&FWRITE ? VWRITE : 0), p->p_ucred, p);
- if (!error)
-#endif /* PARANOID */
- error = VOP_OPEN(ttyvp, flag, NOCRED, p);
+ error = VOP_OPEN(ttyvp, flag, NOCRED, p);
VOP_UNLOCK(ttyvp, 0, p);
return (error);
}