diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2010-06-13 03:34:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-16 14:58:16 -0700 |
commit | 7361c36c5224519b258219fe3d0e8abc865d8134 (patch) | |
tree | 7987367633b4729dff0afa2180862a2ce919f3cb /include/net | |
parent | 257b5358b32f17e0603b6ff57b13610b0e02348f (diff) | |
download | op-kernel-dev-7361c36c5224519b258219fe3d0e8abc865d8134.zip op-kernel-dev-7361c36c5224519b258219fe3d0e8abc865d8134.tar.gz |
af_unix: Allow credentials to work across user and pid namespaces.
In unix_skb_parms store pointers to struct pid and struct cred instead
of raw uid, gid, and pid values, then translate the credentials on
reception into values that are meaningful in the receiving processes
namespaces.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/af_unix.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 20725e2..90c9e28 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h @@ -23,7 +23,8 @@ struct unix_address { }; struct unix_skb_parms { - struct ucred creds; /* Skb credentials */ + struct pid *pid; /* Skb credentials */ + const struct cred *cred; struct scm_fp_list *fp; /* Passed files */ #ifdef CONFIG_SECURITY_NETWORK u32 secid; /* Security ID */ @@ -31,7 +32,6 @@ struct unix_skb_parms { }; #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) -#define UNIXCREDS(skb) (&UNIXCB((skb)).creds) #define UNIXSID(skb) (&UNIXCB((skb)).secid) #define unix_state_lock(s) spin_lock(&unix_sk(s)->lock) |