Re: problems with changing UID/GID

Trond Myklebust (trond.myklebust@fys.uio.no)
26 Aug 2002 20:47:02 +0200


>>>>> " " == Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> On Mon, 2002-08-26 at 15:58, Thunder from the hill wrote:
>> I personally like the task->cred->cr_uid, etc. approach. Helps
>> a lot.

> It changes the whole semantics of every security test in Linux,
> and breaks most of them totally. Our syscalls know the uid is
> constant during the call

Right. Most people appear to prefer to make a lunge straight for
CLONE_CRED.

One of the first steps should rather be to build up support for a
copy-on-write BSD-style 'ucred' struct that can be passed around the
VFS.
Without the latter there is no way to ensure that the compound VFS
operations such as, say, lookup(), followed by a call to permission()
followed by a call to dentry_open(), ->readpage(), etc. all use the
same creds. This they *have* to do irrespective of whether or not the
process is using CLONE_CRED, or you might end up using one set of
privileges for the security checks and a different set for the actual
file/device ops...

Once those VFS changes have been done and audited, then one can start
to add support for 'pcreds' a.k.a. process credentials and then
finally CLONE_CRED...

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/