Date: Mon, 23 Dec 2002 17:25:51 -0500 From: Ryan Younce <ryany@pobox.com> To: freebsd-standards@freebsd.org Subject: grantpt(3) Message-ID: <200212231725.51831.ryany@pobox.com>
next in thread | raw e-mail | index | archive | help
I'm currently working on the POSIX pseudo-terminal functions, and I=20 wanted to get some opinions on grantpt() [IEEE p579]. POSIX states grantpt() is to change the ownership of the slave device=20 to the real user ID of the calling process, as well as setting access=20 modes of the slave to S_IRUSR | S_IWUSR | S_IWGRP. There's obviously=20 going to be a problem if the calling process does not have superuser=20 privileges. Solaris actually seems to allow this for any process by wrapping the=20 permission and ownership manipulation into a setuid program called by=20 the library. This seems to be a rather undesirable approach. If anybody could give page 579 a read through and indicate their=20 thoughts on it, I would greatly appreciate it. Specifically, POSIX=20 says the function "shall" change the ownership and "shall" change the=20 permissions, but I'm wondering if it is allowed to fail if sufficient=20 privileges do not exist, and if this is the right approach, or should=20 grantpt(3) always succeed regardless of permissions. POSIX does state the function "may" fail if the corresponding slave=20 could not be accessed, but this seems vague at best. Thanks. =09Ryan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212231725.51831.ryany>