Thread (23 messages) 23 messages, 5 authors, 2011-08-04

Re: [PATCH 10/14] net/core/scm.c: target capable() calls to user_ns owning the net_ns

From: Serge E. Hallyn <hidden>
Date: 2011-08-04 22:06:13
Also in: lkml
Subsystem: networking [general], networking [sockets], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kuniyuki Iwashima, Willem de Bruijn, Linus Torvalds

Quoting Serge Hallyn (serge@hallyn.com):
From: Serge E. Hallyn <redacted>

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 <redacted>
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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help