Date: Sat, 31 May 2008 14:06:37 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/fs/devfs devfs_vnops.c Message-ID: <200805311406.m4VE6iJJ013006@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
ed 2008-05-31 14:06:44 UTC
FreeBSD src repository
Modified files:
sys/fs/devfs devfs_vnops.c
Log:
SVN rev 179457 on 2008-05-31 14:06:37Z by ed
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)
Revision Changes Path
1.160 +6 -6 src/sys/fs/devfs/devfs_vnops.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805311406.m4VE6iJJ013006>
