summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-05-31 14:06:37 +0000
committered <ed@FreeBSD.org>2008-05-31 14:06:37 +0000
commit06518ce4b19ccd4762d5985970b0e06b71280b56 (patch)
treedb7b3591ac664c72d0ddaef84bd702e5fa57bd58 /games
parentfc25cc1566017a673e82ccb9a80634f5a486c405 (diff)
downloadFreeBSD-src-06518ce4b19ccd4762d5985970b0e06b71280b56.zip
FreeBSD-src-06518ce4b19ccd4762d5985970b0e06b71280b56.tar.gz
Merge back devfs changes from the mpsafetty branch.
In the mpsafetty branch, PTY's are allocated through the posix_openpt() system call. The controller side of a PTY now uses its own file descriptor type (just like sockets, vnodes, pipes, etc). To remain compatible with existing FreeBSD and Linux C libraries, we can still create PTY's by opening /dev/ptmx or /dev/ptyXX. These nodes implement d_fdopen(). Devfs has been slightly changed here, to allow finit() to be called from d_fdopen(). The routine grantpt() has also been moved into the kernel. This routine is a little odd, because it needs to bypass standard UNIX permissions. It needs to change the owner/group/mode of the slave device node, which may often not be possible. The old implementation solved this by spawning a setuid utility. When VOP_SETATTR() is called with NOCRED, devfs_setattr() dereferences ap->a_cred, causing a kernel panic. Change the de_{uid,gid,mode} code to allow changes when a->a_cred is set to NOCRED. Approved by: philip (mentor)
Diffstat (limited to 'games')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud