minix/etc
David van Moolenbroek da21d85025 Add PTYFS, Unix98 pseudo terminal support
This patch adds support for Unix98 pseudo terminals, that is,
posix_openpt(3), grantpt(3), unlockpt(3), /dev/ptmx, and /dev/pts/.
The latter is implemented with a new pseudo file system, PTYFS.

In effect, this patch adds secure support for unprivileged pseudo
terminal allocation, allowing programs such as tmux(1) to be used by
non-root users as well.  Test77 has been extended with new tests, and
no longer needs to run as root.

The new functionality is optional.  To revert to the old behavior,
remove the "ptyfs" entry from /etc/fstab.

Technical nodes:

o The reason for not implementing the NetBSD /dev/ptm approach is that
  implementing the corresponding ioctl (TIOCPTMGET) would require
  adding a number of extremely hairy exceptions to VFS, including the
  PTY driver having to create new file descriptors for its own device
  nodes.

o PTYFS is required for Unix98 PTYs in order to avoid that the PTY
  driver has to be aware of old-style PTY naming schemes and even has
  to call chmod(2) on a disk-backed file system.  PTY cannot be its
  own PTYFS since a character driver may currently not also be a file
  system.  However, PTYFS may be subsumed into a DEVFS in the future.

o The Unix98 PTY behavior differs somewhat from NetBSD's, in that
  slave nodes are created on ptyfs only upon the first call to
  grantpt(3).  This approach obviates the need to revoke access as
  part of the grantpt(3) call.

o Shutting down PTY may leave slave nodes on PTYFS, but once PTY is
  restarted, these leftover slave nodes will be removed before they
  create a security risk.  Unmounting PTYFS will make existing PTY
  slaves permanently unavailable, and absence of PTYFS will block
  allocation of new Unix98 PTYs until PTYFS is (re)mounted.

Change-Id: I822b43ba32707c8815fd0f7d5bb7a438f51421c1
2015-06-23 17:43:46 +00:00
..
defaults Move all services to /service 2014-07-31 16:00:31 +02:00
devmand Much USB code for ARM USB support 2014-08-29 18:52:49 +02:00
fonts support for ukranian (charse koi8-u) contributed by Roman Ignatov. 2010-06-08 01:04:52 +00:00
mtree Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
rc.capes Move all services to /service 2014-07-31 16:00:31 +02:00
root Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
skel Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
usr Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
boot.cfg.default some small changes 2014-08-28 18:49:03 +02:00
crontab version /usr/lib/crontab too 2007-04-02 16:18:46 +00:00
csh.cshrc Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
csh.login Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
csh.logout Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
gettytab big <utmp.h>-inspired netbsd switch 2014-03-01 09:05:02 +01:00
group Switch to NetBSD passwd format 2011-11-14 14:47:42 +00:00
hostname.file Made things a little more boot-cd friendly (specifically readonly /usr). 2005-05-03 08:56:01 +00:00
inet.conf Initial revision 2005-04-21 14:53:53 +00:00
Makefile Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
Makefile.params Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
man.conf Update whatis/apropos database configuration 2015-03-23 11:11:49 +01:00
master.passwd Removing /home/bin 2014-08-07 14:01:30 +02:00
mk.conf mk.conf: workaround for pkgin sourcing it 2013-05-16 11:13:00 +00:00
motd Set the motd to point to a wiki page. 2014-09-13 23:56:50 +02:00
newfstab.sh mainstream-format fstab format 2011-11-14 14:47:28 +00:00
profile Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
protocols Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
rc Services move to /service fixes 2014-08-08 17:56:05 +02:00
rc.cd Don't do this here too 2006-04-05 11:27:25 +00:00
rc.conf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
rc.daemons.dist Importing libexec/fingerd 2013-06-02 08:14:05 -04:00
rc.shutdown big <utmp.h>-inspired netbsd switch 2014-03-01 09:05:02 +01:00
rc.subr Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
resolv.conf add /etc/resolv.conf pointing to minix nonamed 2011-07-26 18:03:04 +02:00
rs.inet Move all services to /service 2014-07-31 16:00:31 +02:00
rs.single Removed args debugging line 2007-02-16 15:58:05 +00:00
services Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC) 2014-07-28 17:05:06 +02:00
shells Add /bin/false to /etc/shells 2014-07-28 17:05:22 +02:00
shrc Import NetBSD shell environment files 2014-11-10 16:48:56 +01:00
syslog.conf syslog.conf: correct PID file path in comments. 2013-05-28 23:04:50 +02:00
system.conf Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
termcap Remove revision IDs from files 2010-11-04 01:13:59 +00:00
termcap.big Remove revision IDs from files 2010-11-04 01:13:59 +00:00
ttys big <utmp.h>-inspired netbsd switch 2014-03-01 09:05:02 +01:00
utmp Initial revision 2005-04-21 14:53:53 +00:00