forked from Minki/linux
e7310c9402
Different from selinux_inet_conn_established(), it also gives the
secid to asoc->peer_secid in selinux_sctp_assoc_established(),
as one UDP-type socket may have more than one asocs.
Note that peer_secid in asoc will save the peer secid for this
asoc connection, and peer_sid in sksec will just keep the peer
secid for the latest connection. So the right use should be do
peeloff for UDP-type socket if there will be multiple asocs in
one socket, so that the peeloff socket has the right label for
its asoc.
v1->v2:
- call selinux_inet_conn_established() to reduce some code
duplication in selinux_sctp_assoc_established(), as Ondrej
suggested.
- when doing peeloff, it calls sock_create() where it actually
gets secid for socket from socket_sockcreate_sid(). So reuse
SECSID_WILD to ensure the peeloff socket keeps using that
secid after calling selinux_sctp_sk_clone() for client side.
Fixes:
|
||
---|---|---|
.. | ||
include | ||
ss | ||
.gitignore | ||
avc.c | ||
hooks.c | ||
ibpkey.c | ||
ima.c | ||
Kconfig | ||
Makefile | ||
netif.c | ||
netlabel.c | ||
netlink.c | ||
netnode.c | ||
netport.c | ||
nlmsgtab.c | ||
selinuxfs.c | ||
status.c | ||
xfrm.c |