cvs commit: src src/libexec Makefile src/libexec/pt_chown Makefile pt_chown.c

Ed Schouten ed at
Sun Aug 24 16:01:29 UTC 2008

* Robert Watson <rwatson at> wrote:
> Do you plan to provide updated compat libs for 4.x, 5.x, 6.x, 7.x, to 
> replace libc/libutil code that expects to be able to execute the pt_chown 
> binary? What happens if that code can't find the pt_chown binary it 
> expects?

I thought my commit message already explained this:

> 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.

There is no need for compat libraries, because the existing ones already
do this:

- Try to run pt_chown.
- If that fails, try to chmod/chown the slave device by hand.
- If that fails, return an error.

Because the PTY that openpty() obtains already has the proper
permissions in place, the second step won't fail.

 Ed Schouten <ed at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url :

More information about the cvs-all mailing list