Call setresuid() before openpty() to change the ownership
of the pseudo terminal to the user.