[NetLabel]: correct improper handling of non-NetLabel peer contexts
Fix a problem where NetLabel would always set the value of sk_security_struct->peer_sid in selinux_netlbl_sock_graft() to the context of the socket, causing problems when users would query the context of the connection. This patch fixes this so that the value in sk_security_struct->peer_sid is only set when the connection is NetLabel based, otherwise the value is untouched. Signed-off-by:Paul Moore <paul.moore@hp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/cipso_ipv4.h 7 additions, 0 deletionsinclude/net/cipso_ipv4.h
- include/net/netlabel.h 8 additions, 0 deletionsinclude/net/netlabel.h
- net/ipv4/cipso_ipv4.c 33 additions, 15 deletionsnet/ipv4/cipso_ipv4.c
- net/netlabel/netlabel_kapi.c 23 additions, 0 deletionsnet/netlabel/netlabel_kapi.c
- security/selinux/ss/services.c 11 additions, 1 deletionsecurity/selinux/ss/services.c
Please register or sign in to comment