mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
SELinux: Return correct context for SO_PEERSEC
Fix SO_PEERSEC for tcp sockets to return the security context of the peer (as represented by the SA from the peer) as opposed to the SA used by the local/source socket. Signed-off-by: Venkat Yekkirala <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
c1a856c964
commit
6b877699c6
7 changed files with 50 additions and 48 deletions
|
|
@ -828,6 +828,11 @@ static inline void dummy_inet_csk_clone(struct sock *newsk,
|
|||
{
|
||||
}
|
||||
|
||||
static inline void dummy_inet_conn_established(struct sock *sk,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void dummy_req_classify_flow(const struct request_sock *req,
|
||||
struct flowi *fl)
|
||||
{
|
||||
|
|
@ -1108,6 +1113,7 @@ void security_fixup_ops (struct security_operations *ops)
|
|||
set_to_dummy_if_null(ops, sock_graft);
|
||||
set_to_dummy_if_null(ops, inet_conn_request);
|
||||
set_to_dummy_if_null(ops, inet_csk_clone);
|
||||
set_to_dummy_if_null(ops, inet_conn_established);
|
||||
set_to_dummy_if_null(ops, req_classify_flow);
|
||||
#endif /* CONFIG_SECURITY_NETWORK */
|
||||
#ifdef CONFIG_SECURITY_NETWORK_XFRM
|
||||
|
|
|
|||
Loading…
Reference in a new issue