Re: problems with changing UID/GID

Dave McCracken (dmccr@us.ibm.com)
Wed, 28 Aug 2002 09:24:23 -0500


--On Wednesday, August 28, 2002 12:09:03 AM +0200 Trond Myklebust
<trond.myklebust@fys.uio.no> wrote:

> FYI a BSD ucred is basically a structure of the form
>
> struct ucred {
> int counter; /* Reference counter */
> uid_t uid; /* task->fsuid */
> gid_t gid; /* task->fsgid */
> int ngroups; /* task->ngroups */
> gid_t *groups; /* task->groups */
> };

Shouldn't the Linux cred structure include the capabilities, as well? What
about places that want to see both uid and euid? Shouldn't euid/egid also
be in the structure? I realize that for file operations they're not
strictly necessary, but we should make the structure useful across all
parts of the kernel that want to see credentials.

BTW, you've convinced me that your approach is the right way to go. I'll
make another stab at CLONE_CRED after the VFS changes are made, which will
make it a 2.7 item, I'm sure.

Dave McCracken

======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059

-
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/