calipso: Allow request sockets to be relabelled by the lsm.

Request sockets need to have a label that takes into account the
incoming connection as well as their parent's label.  This is used
for the outgoing SYN-ACK and for their child full-socket.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Huw Davies
2016-06-27 15:05:29 -04:00
committed by Paul Moore
parent 56ac42bc94
commit e1adea9270
6 changed files with 163 additions and 8 deletions

View File

@@ -284,7 +284,7 @@ int selinux_netlbl_inet_conn_request(struct request_sock *req, u16 family)
int rc;
struct netlbl_lsm_secattr secattr;
if (family != PF_INET)
if (family != PF_INET && family != PF_INET6)
return 0;
netlbl_secattr_init(&secattr);