[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1obqm56w5.fsf@fess.ebiederm.org>
Date: Fri, 20 Apr 2012 16:18:50 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: "Serge E. Hallyn" <serge@...lyn.com>
Cc: linux-kernel@...r.kernel.org,
Linux Containers <containers@...ts.linux-foundation.org>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
linux-security-module@...r.kernel.org,
Al Viro <viro@...IV.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 22/43] userns: Convert capabilities related permsion checks
"Serge E. Hallyn" <serge@...lyn.com> writes:
> Quoting Eric W. Beiderman (ebiederm@...ssion.com):
>> From: Eric W. Biederman <ebiederm@...ssion.com>
>>
>> - Use uid_eq when comparing kuids
>> Use gid_eq when comparing kgids
>> - Use __make_kuid(user_ns, 0) to talk about the user_namespace root uid
>> Use __make_kgid(user_ns, 0) to talk about the user_namespace root gid
>>
>> Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
>
> Acked-by: Serge Hallyn <serge.hallyn@...onical.com>
>
> though, nit,
>
>> ---
>> fs/open.c | 3 ++-
>> security/commoncap.c | 43 ++++++++++++++++++++++++++++---------------
>> 2 files changed, 30 insertions(+), 16 deletions(-)
>>
>> diff --git a/security/commoncap.c b/security/commoncap.c
>> index dbd465a..9bf8df8 100644
>> --- a/security/commoncap.c
>> +++ b/security/commoncap.c
>> @@ -472,19 +472,24 @@ int cap_bprm_set_creds(struct linux_binprm *bprm)
>> struct cred *new = bprm->cred;
>> bool effective, has_cap = false;
>> int ret;
>> + kuid_t root_uid;
>> + kgid_t root_gid;
>
> the root_gid is assigned but never used.
Thanks snipped. It doesn't look like there will ever be a use for it.
>>
>> effective = false;
>> ret = get_file_caps(bprm, &effective, &has_cap);
>> if (ret < 0)
>> return ret;
>>
>> + root_uid = make_kuid(new->user_ns, 0);
>> + root_gid = make_kgid(new->user_ns, 0);
>> +
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists