Skip site navigation (1)Skip section navigation (2)
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 
wanted to get some opinions on grantpt() [IEEE p579].

POSIX states grantpt() is to change the ownership of the slave device 
to the real user ID of the calling process, as well as setting access 
modes of the slave to S_IRUSR | S_IWUSR | S_IWGRP.  There's obviously 
going to be a problem if the calling process does not have superuser 
privileges.

Solaris actually seems to allow this for any process by wrapping the 
permission and ownership manipulation into a setuid program called by 
the library.  This seems to be a rather undesirable approach.

If anybody could give page 579 a read through and indicate their 
thoughts on it, I would greatly appreciate it.  Specifically, POSIX 
says the function "shall" change the ownership and "shall" change the 
permissions, but I'm wondering if it is allowed to fail if sufficient 
privileges do not exist, and if this is the right approach, or should 
grantpt(3) always succeed regardless of permissions.

POSIX does state the function "may" fail if the corresponding slave 
could not be accessed, but this seems vague at best.

Thanks.

	Ryan

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>