aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index c82538a4b1a4..6f637d2678ac 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3921,18 +3921,18 @@ static int selinux_socket_shutdown(struct socket *sock, int how)
3921 return sock_has_perm(current, sock->sk, SOCKET__SHUTDOWN); 3921 return sock_has_perm(current, sock->sk, SOCKET__SHUTDOWN);
3922} 3922}
3923 3923
3924static int selinux_socket_unix_stream_connect(struct socket *sock, 3924static int selinux_socket_unix_stream_connect(struct sock *sock,
3925 struct socket *other, 3925 struct sock *other,
3926 struct sock *newsk) 3926 struct sock *newsk)
3927{ 3927{
3928 struct sk_security_struct *sksec_sock = sock->sk->sk_security; 3928 struct sk_security_struct *sksec_sock = sock->sk_security;
3929 struct sk_security_struct *sksec_other = other->sk->sk_security; 3929 struct sk_security_struct *sksec_other = other->sk_security;
3930 struct sk_security_struct *sksec_new = newsk->sk_security; 3930 struct sk_security_struct *sksec_new = newsk->sk_security;
3931 struct common_audit_data ad; 3931 struct common_audit_data ad;
3932 int err; 3932 int err;
3933 3933
3934 COMMON_AUDIT_DATA_INIT(&ad, NET); 3934 COMMON_AUDIT_DATA_INIT(&ad, NET);
3935 ad.u.net.sk = other->sk; 3935 ad.u.net.sk = other;
3936 3936
3937 err = avc_has_perm(sksec_sock->sid, sksec_other->sid, 3937 err = avc_has_perm(sksec_sock->sid, sksec_other->sid,
3938 sksec_other->sclass, 3938 sksec_other->sclass,