<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/pt_chown, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove the now unneeded pt_chown utility.</title>
<updated>2008-08-24T10:01:22+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-08-24T10:01:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=878f530ff87ec2342cacade0a24e29dba63af248'/>
<id>878f530ff87ec2342cacade0a24e29dba63af248</id>
<content type='text'>
Before we had a posix_openpt() that allocated PTY's with proper
permissions in place, we used this set-uid utility to change the
ownership of PTY slave devices to the real user ID of the process. This
utility was used to implement grantpt().

In my first designs of the MPSAFE TTY layer, I replaced this by adding
an ioctl() called TIOCGRANTPT, which was used to change the ownership.
I left the pt_chown utility, because older C libraries needed it to work
properly.

After some discussions back in June I changed the PTY code to set
permissions properly upon creation. Fortunately the previous grantpt()
implementation changed permissions by hand when pt_chown is not
installed, which always succeeds. This means grantpt() still works
properly, even though the set-uid utility is missing.

I've done tests with FreeBSD 5.2.1, FreeBSD 6.3 and FreeBSD 7.0 jails.
All of them still work if I remove pt_chown.

Reviewed by:	philip (ex-mentor)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before we had a posix_openpt() that allocated PTY's with proper
permissions in place, we used this set-uid utility to change the
ownership of PTY slave devices to the real user ID of the process. This
utility was used to implement grantpt().

In my first designs of the MPSAFE TTY layer, I replaced this by adding
an ioctl() called TIOCGRANTPT, which was used to change the ownership.
I left the pt_chown utility, because older C libraries needed it to work
properly.

After some discussions back in June I changed the PTY code to set
permissions properly upon creation. Fortunately the previous grantpt()
implementation changed permissions by hand when pt_chown is not
installed, which always succeeds. This means grantpt() still works
properly, even though the set-uid utility is missing.

I've done tests with FreeBSD 5.2.1, FreeBSD 6.3 and FreeBSD 7.0 jails.
All of them still work if I remove pt_chown.

Reviewed by:	philip (ex-mentor)
</pre>
</div>
</content>
</entry>
<entry>
<title>Let bsd.prog.mk set SRCS and MAN to their default values.</title>
<updated>2005-01-28T16:08:11+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2005-01-28T16:08:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=254dd1666eaa21b0f7ecf37507e4ee0d44284abe'/>
<id>254dd1666eaa21b0f7ecf37507e4ee0d44284abe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Start the dreaded NOFOO -&gt; NO_FOO conversion.</title>
<updated>2004-12-21T08:47:35+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2004-12-21T08:47:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e653b48c80fb85b2a10372d664a4b55dbdc51dae'/>
<id>e653b48c80fb85b2a10372d664a4b55dbdc51dae</id>
<content type='text'>
OK'ed by:	core
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OK'ed by:	core
</pre>
</div>
</content>
</entry>
<entry>
<title>For variables that are only checked with defined(), don't provide</title>
<updated>2004-10-24T15:33:08+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2004-10-24T15:33:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a35d88931c87cfe6bd38f01d7bad22140b3b38f3'/>
<id>a35d88931c87cfe6bd38f01d7bad22140b3b38f3</id>
<content type='text'>
any fake value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
any fake value.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akin</title>
<updated>2003-01-02T20:44:41+00:00</updated>
<author>
<name>Juli Mallett</name>
<email>jmallett@FreeBSD.org</email>
</author>
<published>2003-01-02T20:44:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d3951ad162da9d90d752eab5527b608e9e90624e'/>
<id>d3951ad162da9d90d752eab5527b608e9e90624e</id>
<content type='text'>
to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes
to the user being granted the pty.

Submitted by:	Ryan Younce &lt;ryany@pobox.com&gt;
Reviewed by:	security-officer@, standards@, mike@
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes
to the user being granted the pty.

Submitted by:	Ryan Younce &lt;ryany@pobox.com&gt;
Reviewed by:	security-officer@, standards@, mike@
</pre>
</div>
</content>
</entry>
</feed>
