mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
userns: Store uid and gid values in struct cred with kuid_t and kgid_t types
cred.h and a few trivial users of struct cred are changed. The rest of the users of struct cred are left for other patches as there are too many changes to make in one go and leave the change reviewable. If the user namespace is disabled and CONFIG_UIDGID_STRICT_TYPE_CHECKS are disabled the code will contiue to compile and behave correctly. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
parent
ae2975bc34
commit
078de5f706
10 changed files with 59 additions and 62 deletions
|
@ -36,8 +36,8 @@ static bool new_idmap_permitted(struct user_namespace *ns, int cap_setid,
|
|||
int create_user_ns(struct cred *new)
|
||||
{
|
||||
struct user_namespace *ns, *parent_ns = new->user_ns;
|
||||
kuid_t owner = make_kuid(new->user_ns, new->euid);
|
||||
kgid_t group = make_kgid(new->user_ns, new->egid);
|
||||
kuid_t owner = new->euid;
|
||||
kgid_t group = new->egid;
|
||||
|
||||
/* The creator needs a mapping in the parent user namespace
|
||||
* or else we won't be able to reasonably tell userspace who
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue