summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-02-10 01:31:22 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-02-10 01:31:22 +0000
commit85848b86166719fe7164148608daa490bf9bfcdb (patch)
tree669ff49bb8253462e9b1fb75ac23bdbc1e344261 /sys/arch/i386
parent92344befec63515228572bc04de856dfae3b3c00 (diff)
Add the ptm device to pty(4). By opening /dev/ptm and using the PTMGET
ioctl(2), an unprivileged process may allocate a pty and have its owner and mode set appropriately. This means that programs such as xterm and screen no longer need to be setuid. Programs using the openpty() function require zero changes and will "just work". Designed by beck@ and deraadt@; changes by beck@ with cleanup (and a rewrite of the vnode bits) by art@ and tweaks/bugfixes by me. Tested by many.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/conf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index 1f611b60029..25198bf2ebb 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.105 2003/11/03 03:35:40 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.106 2004/02/10 01:31:21 millert Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
@@ -308,7 +308,8 @@ struct cdevsw cdevsw[] =
cdev_usbdev_init(NUSCANNER,uscanner), /* 77: USB scanners */
cdev_systrace_init(NSYSTRACE,systrace), /* 78: system call tracing */
cdev_oci_init(NBIO,bio), /* 79: ioctl tunnel */
- cdev_ch_init(NGPR,gpr) /* 80: GPR400 SmartCard reader */
+ cdev_ch_init(NGPR,gpr), /* 80: GPR400 SmartCard reader */
+ cdev_ptm_init(NPTY,ptm), /* 81: pseudo-tty ptm device */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);