Subject: Re: Addition to force open to open only regular files
To: Warner Losh <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 11/28/2000 18:56:43
On Wed, 22 Nov 2000, Warner Losh wrote:
> There are two reasons. First, we have no knowledge of the saved uid
> in userland. There's no way to know what it is.
Why don't we just add a getsid(&uid_t, &gid_t) syscall?
We've been running around with all sorts of suggestions and arguments, and
we're getting no where in a dizzying hurry, with much vehemence (sp?).
The point is that we would like library routines to be able to use
environment variables passed in from the initial user, but we don't want
to trust those variables farther than the privilege of the user who set
them. We'd like to access files they refer to with the privileges of that
One of the security models we impliment (mainly to be compatible with
other systems), setre[gu]id(), makes recovering this info hard as it
overwrites the variables we'd want to look at to see what that ID was.
So why not just make things easy and add a syscall to get it???
Sounds a lot easier than re-writing the syscall interfaces....