All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge.hallyn@canonical.com>
To: Serge Hallyn <serge@hallyn.com>
Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com,
	ebiederm@xmission.com, containers@lists.linux-foundation.org,
	netdev@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH 10/14] net/core/scm.c: target capable() calls to user_ns owning the net_ns
Date: Thu, 4 Aug 2011 17:06:02 -0500	[thread overview]
Message-ID: <20110804220602.GA32347@sergelap> (raw)
In-Reply-To: <1311706717-7398-11-git-send-email-serge@hallyn.com>

Quoting Serge Hallyn (serge@hallyn.com):
> From: Serge E. Hallyn <serge.hallyn@canonical.com>
> 
> The uid/gid comparisons don't have to be pulled out.  This just seemed
> more easily proved correct.

The following needs to be folded into this patch:

From: Serge Hallyn <serge.hallyn@canonical.com>
Date: Thu, 4 Aug 2011 21:48:13 +0000
Subject: [PATCH 2/2] fold up - net/core/scm.c: cred is const

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
---
 net/core/scm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/scm.c b/net/core/scm.c
index 21b5d0b..528fa36 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -43,7 +43,7 @@
  *	setu(g)id.
  */
 
-static __inline__ bool uidequiv(struct cred *src, struct ucred *tgt,
+static __inline__ bool uidequiv(const struct cred *src, struct ucred *tgt,
 			       struct user_namespace *ns)
 {
 	if (src->user_ns != ns)
@@ -57,7 +57,7 @@ check_capable:
 	return false;
 }
 
-static __inline__ bool gidequiv(struct cred *src, struct ucred *tgt,
+static __inline__ bool gidequiv(const struct cred *src, struct ucred *tgt,
 			       struct user_namespace *ns)
 {
 	if (src->user_ns != ns)
-- 
1.7.5.4


  parent reply	other threads:[~2011-08-04 22:06 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 18:58 [PATCH 0/14] user namespaces v2: continue targetting capabilities Serge Hallyn
2011-07-26 18:58 ` [PATCH 01/14] add Documentation/namespaces/user_namespace.txt Serge Hallyn
     [not found]   ` <1311706717-7398-2-git-send-email-serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-07-26 20:22     ` Randy Dunlap
2011-07-26 20:22   ` Randy Dunlap
2011-07-26 20:29     ` David Howells
2011-07-29 17:25       ` [PATCH 01/14] add Documentation/namespaces/user_namespace.txt (v3) Serge E. Hallyn
     [not found]       ` <27437.1311712186-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-07-29 17:25         ` Serge E. Hallyn
2011-07-27 15:38     ` [PATCH 01/14] add Documentation/namespaces/user_namespace.txt Serge E. Hallyn
2011-07-27 16:02       ` Randy Dunlap
     [not found]       ` <20110727153848.GA17288-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-07-27 16:02         ` Randy Dunlap
     [not found]   ` <20110726132249.69533206.rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2011-07-26 20:29     ` David Howells
2011-07-27 15:38     ` Serge E. Hallyn
     [not found] ` <1311706717-7398-1-git-send-email-serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-07-26 18:58   ` Serge Hallyn
2011-07-26 18:58   ` [PATCH 02/14] allow root in container to copy namespaces Serge Hallyn
2011-07-26 18:58   ` [PATCH 03/14] keyctl: check capabilities against key's user_ns Serge Hallyn
2011-07-26 18:58   ` [PATCH 04/14] user_ns: convert fs/attr.c to targeted capabilities Serge Hallyn
2011-07-26 18:58   ` [PATCH 05/14] userns: clamp down users of cap_raised Serge Hallyn
2011-07-26 18:58   ` [PATCH 06/14] user namespace: make each net (net_ns) belong to a user_ns Serge Hallyn
2011-07-26 18:58   ` [PATCH 07/14] user namespace: use net->user_ns for some capable calls under net/ Serge Hallyn
2011-07-26 18:58   ` [PATCH 08/14] af_netlink.c: make netlink_capable userns-aware Serge Hallyn
2011-07-26 18:58   ` [PATCH 09/14] user ns: convert ipv6 to targeted capabilities Serge Hallyn
2011-07-26 18:58   ` [PATCH 10/14] net/core/scm.c: target capable() calls to user_ns owning the net_ns Serge Hallyn
2011-07-26 18:58   ` [PATCH 11/14] userns: make some net-sysfs capable calls targeted Serge Hallyn
2011-07-26 18:58   ` [PATCH 12/14] user_ns: target af_key capability check Serge Hallyn
2011-07-26 18:58   ` [PATCH 13/14] userns: net: make many network capable calls targeted Serge Hallyn
2011-07-26 18:58   ` [PATCH 14/14] net: pass user_ns to cap_netlink_recv() Serge Hallyn
2011-07-26 18:58 ` [PATCH 02/14] allow root in container to copy namespaces Serge Hallyn
2011-07-27 23:14   ` Eric W. Biederman
2011-07-28  2:13     ` Serge E. Hallyn
     [not found]     ` <m1hb67fh9l.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-07-28  2:13       ` Serge E. Hallyn
2011-07-29 17:27       ` [PATCH 02/14] allow root in container to copy namespaces (v3) Serge E. Hallyn
2011-07-29 17:27     ` Serge E. Hallyn
2011-08-01 22:25       ` Eric W. Biederman
     [not found]         ` <m1ei146a6t.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-08-02 14:08           ` Serge E. Hallyn
2011-08-02 14:08             ` Serge E. Hallyn
2011-08-02 22:03             ` Eric W. Biederman
2011-08-02 22:03             ` Eric W. Biederman
2011-08-04 22:01               ` Serge E. Hallyn
     [not found]               ` <m1oc074gkb.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-08-04 22:01                 ` Serge E. Hallyn
     [not found]       ` <20110729172748.GB18935-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-08-01 22:25         ` Eric W. Biederman
     [not found]   ` <1311706717-7398-3-git-send-email-serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-07-27 23:14     ` [PATCH 02/14] allow root in container to copy namespaces Eric W. Biederman
2011-07-26 18:58 ` [PATCH 03/14] keyctl: check capabilities against key's user_ns Serge Hallyn
2011-07-26 18:58 ` [PATCH 04/14] user_ns: convert fs/attr.c to targeted capabilities Serge Hallyn
2011-07-26 18:58 ` [PATCH 05/14] userns: clamp down users of cap_raised Serge Hallyn
     [not found]   ` <1311706717-7398-6-git-send-email-serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-07-28 23:23     ` Vasiliy Kulikov
2011-07-28 23:23   ` Vasiliy Kulikov
2011-07-28 23:51     ` Serge E. Hallyn
2011-07-28 23:51     ` Serge E. Hallyn
2011-07-26 18:58 ` [PATCH 06/14] user namespace: make each net (net_ns) belong to a user_ns Serge Hallyn
2011-07-26 18:58 ` [PATCH 07/14] user namespace: use net->user_ns for some capable calls under net/ Serge Hallyn
2011-07-26 18:58 ` [PATCH 08/14] af_netlink.c: make netlink_capable userns-aware Serge Hallyn
2011-07-26 18:58 ` [PATCH 09/14] user ns: convert ipv6 to targeted capabilities Serge Hallyn
2011-07-26 18:58 ` [PATCH 10/14] net/core/scm.c: target capable() calls to user_ns owning the net_ns Serge Hallyn
     [not found]   ` <1311706717-7398-11-git-send-email-serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2011-08-04 22:06     ` Serge E. Hallyn
2011-08-04 22:06   ` Serge E. Hallyn [this message]
2011-07-26 18:58 ` [PATCH 11/14] userns: make some net-sysfs capable calls targeted Serge Hallyn
2011-07-26 18:58 ` [PATCH 12/14] user_ns: target af_key capability check Serge Hallyn
2011-07-26 18:58 ` [PATCH 13/14] userns: net: make many network capable calls targeted Serge Hallyn
2011-07-26 18:58 ` [PATCH 14/14] net: pass user_ns to cap_netlink_recv() Serge Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110804220602.GA32347@sergelap \
    --to=serge.hallyn@canonical.com \
    --cc=akpm@osdl.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.