Re: [PATCH] Introduce BSD-style user credential [3/3]
From: Linus Torvalds <torvalds@transmeta.com>
Date: 2002-08-31 00:49:38
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