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 <vyekkirala@TrustedCS.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
committed by
David S. Miller
parent
c1a856c964
commit
6b877699c6
@@ -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
|
||||
|
Reference in New Issue
Block a user