Re: [PATCH] Introduce BSD-style user credential [3/3]

Linus Torvalds (torvalds@transmeta.com)
Fri, 30 Aug 2002 17:49:38 -0700 (PDT)


On Sat, 31 Aug 2002, Trond Myklebust wrote:
>
> task->ucred is not the unit for implementing shared creds between
> threads.

Fair enough, but some solution to this has to be found. I do not want to
apply something that simply cannot work sanely, and I want to have at
least a _plan_ on the table.

> struct pcred {
> atomic_t count;
> uid_t uid, euid, suid;
> gid_t gid, egid, sgid;
> struct ucred *cred;
> kernel_cap_t ... capabilities ...
> struct user_struct *user;
> };

Ok, that sounds reasonable, except the naming just has to go. Yes, things
like "pcred/ucred" may be what BSD uses, but BSD uses things like "uarea"
too, which just isn't the Linux way. The names should make sense _without_
having to have single-letter differences.

This really ties in with the patches Dave has done (which are equivalent
to your "pcred"), and I'd like to see them work together in practice.

(I would suggest calling the FS credentials "struct vfs_cred", while the
regular user credentials might just be "struct cred". Other suggestions?)

Linus

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