Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
This is an initial merge in of Eric Biederman's work to start adding user namespace support to the networking. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -868,8 +868,8 @@ void cred_to_ucred(struct pid *pid, const struct cred *cred,
|
||||
if (cred) {
|
||||
struct user_namespace *current_ns = current_user_ns();
|
||||
|
||||
ucred->uid = from_kuid(current_ns, cred->euid);
|
||||
ucred->gid = from_kgid(current_ns, cred->egid);
|
||||
ucred->uid = from_kuid_munged(current_ns, cred->euid);
|
||||
ucred->gid = from_kgid_munged(current_ns, cred->egid);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cred_to_ucred);
|
||||
@@ -1527,12 +1527,12 @@ void sock_edemux(struct sk_buff *skb)
|
||||
}
|
||||
EXPORT_SYMBOL(sock_edemux);
|
||||
|
||||
int sock_i_uid(struct sock *sk)
|
||||
kuid_t sock_i_uid(struct sock *sk)
|
||||
{
|
||||
int uid;
|
||||
kuid_t uid;
|
||||
|
||||
read_lock_bh(&sk->sk_callback_lock);
|
||||
uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : 0;
|
||||
uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : GLOBAL_ROOT_UID;
|
||||
read_unlock_bh(&sk->sk_callback_lock);
|
||||
return uid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user