minix/minix/tests
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
..
blocktest minix/ changes for arm llvm build 2014-12-03 23:40:56 +01:00
ddekit merge libminlib with libc 2014-08-28 18:49:19 +02:00
ds merge libminlib with libc 2014-08-28 18:49:19 +02:00
fbdtest Move all services to /service 2014-07-31 16:00:31 +02:00
ipc New sources layout 2014-07-31 16:00:30 +02:00
kernel merge libminlib with libc 2014-08-28 18:49:19 +02:00
safecopy merge libminlib with libc 2014-08-28 18:49:19 +02:00
check-install /usr/tests/minix-posix/check-install 2014-08-13 16:42:57 +02:00
common.c New sources layout 2014-07-31 16:00:30 +02:00
common.h New sources layout 2014-07-31 16:00:30 +02:00
magic.h New sources layout 2014-07-31 16:00:30 +02:00
Makefile Restart policies: Add testing and ProcFS DB 2014-12-10 23:11:25 +01:00
Makefile.inc New sources layout 2014-07-31 16:00:30 +02:00
mod.c New sources layout 2014-07-31 16:00:30 +02:00
run Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
t10a.c New sources layout 2014-07-31 16:00:30 +02:00
t11a.c New sources layout 2014-07-31 16:00:30 +02:00
t11b.c New sources layout 2014-07-31 16:00:30 +02:00
t40a.c New sources layout 2014-07-31 16:00:30 +02:00
t40b.c New sources layout 2014-07-31 16:00:30 +02:00
t40c.c New sources layout 2014-07-31 16:00:30 +02:00
t40d.c New sources layout 2014-07-31 16:00:30 +02:00
t40e.c New sources layout 2014-07-31 16:00:30 +02:00
t40f.c New sources layout 2014-07-31 16:00:30 +02:00
t40g.c New sources layout 2014-07-31 16:00:30 +02:00
t60a.c New sources layout 2014-07-31 16:00:30 +02:00
t60b.c New sources layout 2014-07-31 16:00:30 +02:00
t67a.c New sources layout 2014-07-31 16:00:30 +02:00
t67b.c New sources layout 2014-07-31 16:00:30 +02:00
t68a.c New sources layout 2014-07-31 16:00:30 +02:00
t68b.c New sources layout 2014-07-31 16:00:30 +02:00
test1.c New sources layout 2014-07-31 16:00:30 +02:00
test2.c New sources layout 2014-07-31 16:00:30 +02:00
test3.c New sources layout 2014-07-31 16:00:30 +02:00
test4.c New sources layout 2014-07-31 16:00:30 +02:00
test5.c New sources layout 2014-07-31 16:00:30 +02:00
test6.c New sources layout 2014-07-31 16:00:30 +02:00
test7.c New sources layout 2014-07-31 16:00:30 +02:00
test8.c New sources layout 2014-07-31 16:00:30 +02:00
test9.c New sources layout 2014-07-31 16:00:30 +02:00
test10.c New sources layout 2014-07-31 16:00:30 +02:00
test11.c New sources layout 2014-07-31 16:00:30 +02:00
test12.c New sources layout 2014-07-31 16:00:30 +02:00
test13.c New sources layout 2014-07-31 16:00:30 +02:00
test14.c New sources layout 2014-07-31 16:00:30 +02:00
test15.c New sources layout 2014-07-31 16:00:30 +02:00
test16.c New sources layout 2014-07-31 16:00:30 +02:00
test17.c New sources layout 2014-07-31 16:00:30 +02:00
test18.c New sources layout 2014-07-31 16:00:30 +02:00
test19.c New sources layout 2014-07-31 16:00:30 +02:00
test20.c New sources layout 2014-07-31 16:00:30 +02:00
test21.c New sources layout 2014-07-31 16:00:30 +02:00
test22.c New sources layout 2014-07-31 16:00:30 +02:00
test23.c New sources layout 2014-07-31 16:00:30 +02:00
test24.c New sources layout 2014-07-31 16:00:30 +02:00
test25.c New sources layout 2014-07-31 16:00:30 +02:00
test26.c New sources layout 2014-07-31 16:00:30 +02:00
test27.c New sources layout 2014-07-31 16:00:30 +02:00
test28.c New sources layout 2014-07-31 16:00:30 +02:00
test29.c New sources layout 2014-07-31 16:00:30 +02:00
test30.c New sources layout 2014-07-31 16:00:30 +02:00
test31.c New sources layout 2014-07-31 16:00:30 +02:00
test32.c New sources layout 2014-07-31 16:00:30 +02:00
test33.c New sources layout 2014-07-31 16:00:30 +02:00
test34.c tests: fix clang warnings 2014-09-29 16:16:32 +00:00
test35.c tests: fix clang warnings 2014-09-29 16:16:32 +00:00
test36.c New sources layout 2014-07-31 16:00:30 +02:00
test37.c tests: fix clang warnings 2014-09-29 16:16:32 +00:00
test38.c New sources layout 2014-07-31 16:00:30 +02:00
test39.c New sources layout 2014-07-31 16:00:30 +02:00
test40.c New sources layout 2014-07-31 16:00:30 +02:00
test41.c New sources layout 2014-07-31 16:00:30 +02:00
test42.c tests: fix clang warnings 2014-09-29 16:16:32 +00:00
test43.c New sources layout 2014-07-31 16:00:30 +02:00
test44.c New sources layout 2014-07-31 16:00:30 +02:00
test45.c New sources layout 2014-07-31 16:00:30 +02:00
test45.h New sources layout 2014-07-31 16:00:30 +02:00
test46.c tests: fix clang warnings 2014-09-29 16:16:32 +00:00
test47.c New sources layout 2014-07-31 16:00:30 +02:00
test48.c fix test48 - minix3.org.xyz resolves now 2014-08-22 12:38:09 +02:00
test49.c New sources layout 2014-07-31 16:00:30 +02:00
test50.c New sources layout 2014-07-31 16:00:30 +02:00
test51.c tests: fix clang warnings 2014-09-29 16:16:32 +00:00
test52.c New sources layout 2014-07-31 16:00:30 +02:00
test53.c New sources layout 2014-07-31 16:00:30 +02:00
test54.c New sources layout 2014-07-31 16:00:30 +02:00
test55.c New sources layout 2014-07-31 16:00:30 +02:00
test56.c test56: fix race condition 2014-09-29 16:16:36 +00:00
test57.c New sources layout 2014-07-31 16:00:30 +02:00
test57loop.S New sources layout 2014-07-31 16:00:30 +02:00
test58.c New sources layout 2014-07-31 16:00:30 +02:00
test59.c test59: fix status type for mthread_join call 2014-08-24 09:22:35 +00:00
test60.c New sources layout 2014-07-31 16:00:30 +02:00
test61.c New sources layout 2014-07-31 16:00:30 +02:00
test62.c New sources layout 2014-07-31 16:00:30 +02:00
test63.c New sources layout 2014-07-31 16:00:30 +02:00
test64.c New sources layout 2014-07-31 16:00:30 +02:00
test65.c New sources layout 2014-07-31 16:00:30 +02:00
test66.c New sources layout 2014-07-31 16:00:30 +02:00
test66expected.h New sources layout 2014-07-31 16:00:30 +02:00
test67.c New sources layout 2014-07-31 16:00:30 +02:00
test68.c VFS: fix error behavior for partial pipe writes 2015-06-05 18:40:57 +00:00
test69.c New sources layout 2014-07-31 16:00:30 +02:00
test70.c New sources layout 2014-07-31 16:00:30 +02:00
test71.c New sources layout 2014-07-31 16:00:30 +02:00
test72.c libfsdriver: support mmap on FSes with no device 2014-11-15 11:19:52 +00:00
test73.c libminixfs: add block I/O routines 2014-09-18 12:46:25 +00:00
test74.c VM: fix for handling one-shot page memory 2015-02-10 13:47:27 +00:00
test75.c New sources layout 2014-07-31 16:00:30 +02:00
test76.c Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
test77.c Add PTYFS, Unix98 pseudo terminal support 2015-06-23 17:43:46 +00:00
test78.c New sources layout 2014-07-31 16:00:30 +02:00
test79.c New sources layout 2014-07-31 16:00:30 +02:00
testcache.c New sources layout 2014-07-31 16:00:30 +02:00
testcache.h New sources layout 2014-07-31 16:00:30 +02:00
testinterp.sh New sources layout 2014-07-31 16:00:30 +02:00
testisofs.sh tests: reenable testisofs 2014-09-18 13:01:13 +00:00
testkyua.sh New sources layout 2014-07-31 16:00:30 +02:00
testmfs.sh New sources layout 2014-07-31 16:00:30 +02:00
testrelpol.sh Restart policies: Add testing and ProcFS DB 2014-12-10 23:11:25 +01:00
testsh1.sh Porting uuencode/uudecode from NetBSD 2014-09-08 19:51:28 +02:00
testsh2.sh New sources layout 2014-07-31 16:00:30 +02:00
testvm.c libfsdriver: support mmap on FSes with no device 2014-11-15 11:19:52 +00:00
testvm.conf New sources layout 2014-07-31 16:00:30 +02:00
testvm.h New sources layout 2014-07-31 16:00:30 +02:00
testvnd.sh Importing bin/sh 2014-08-29 12:56:04 -04:00
tvnd.c New sources layout 2014-07-31 16:00:30 +02:00