Lines Matching defs:asoc
5258 * Determines peer_secid for the asoc and updates socket's peer label
5261 static int selinux_sctp_process_new_assoc(struct sctp_association *asoc,
5264 struct sock *sk = asoc->base.sk;
5276 asoc->peer_secid = SECSID_NULL;
5281 err = selinux_skb_peerlbl_sid(skb, family, &asoc->peer_secid);
5285 if (asoc->peer_secid == SECSID_NULL)
5286 asoc->peer_secid = SECINITSID_UNLABELED;
5288 asoc->peer_secid = SECINITSID_UNLABELED;
5299 sksec->peer_sid = asoc->peer_secid;
5300 } else if (sksec->peer_sid != asoc->peer_secid) {
5304 ad_net_init_from_sk(&ad, &net, asoc->base.sk);
5305 err = avc_has_perm(sksec->peer_sid, asoc->peer_secid,
5318 static int selinux_sctp_assoc_request(struct sctp_association *asoc,
5321 struct sk_security_struct *sksec = asoc->base.sk->sk_security;
5328 err = selinux_sctp_process_new_assoc(asoc, skb);
5333 * the information in asoc. This will be used by SCTP TCP type
5338 err = selinux_conn_sid(sksec->sid, asoc->peer_secid, &conn_sid);
5342 asoc->secid = conn_sid;
5345 return selinux_netlbl_sctp_assoc_request(asoc, skb);
5351 static int selinux_sctp_assoc_established(struct sctp_association *asoc,
5354 struct sk_security_struct *sksec = asoc->base.sk->sk_security;
5363 asoc->secid = sksec->sid;
5365 return selinux_sctp_process_new_assoc(asoc, skb);
5450 static void selinux_sctp_sk_clone(struct sctp_association *asoc, struct sock *sk,
5462 newsksec->sid = asoc->secid;
5463 newsksec->peer_sid = asoc->peer_secid;