Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 976d0201 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

userns: Convert sock_i_uid to return a kuid_t

parent d04a48b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1668,7 +1668,7 @@ static inline void sock_graft(struct sock *sk, struct socket *parent)
	write_unlock_bh(&sk->sk_callback_lock);
	write_unlock_bh(&sk->sk_callback_lock);
}
}


extern int sock_i_uid(struct sock *sk);
extern kuid_t sock_i_uid(struct sock *sk);
extern unsigned long sock_i_ino(struct sock *sk);
extern unsigned long sock_i_ino(struct sock *sk);


static inline struct dst_entry *
static inline struct dst_entry *
+3 −3
Original line number Original line Diff line number Diff line
@@ -1526,12 +1526,12 @@ void sock_edemux(struct sk_buff *skb)
}
}
EXPORT_SYMBOL(sock_edemux);
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);
	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);
	read_unlock_bh(&sk->sk_callback_lock);
	return uid;
	return uid;
}
}