Lines Matching refs:asoc
5286 * Determines peer_secid for the asoc and updates socket's peer label
5289 static int selinux_sctp_process_new_assoc(struct sctp_association *asoc,
5292 struct sock *sk = asoc->base.sk;
5304 asoc->peer_secid = SECSID_NULL;
5309 err = selinux_skb_peerlbl_sid(skb, family, &asoc->peer_secid);
5313 if (asoc->peer_secid == SECSID_NULL)
5314 asoc->peer_secid = SECINITSID_UNLABELED;
5316 asoc->peer_secid = SECINITSID_UNLABELED;
5327 sksec->peer_sid = asoc->peer_secid;
5328 } else if (sksec->peer_sid != asoc->peer_secid) {
5332 ad_net_init_from_sk(&ad, &net, asoc->base.sk);
5333 err = avc_has_perm(sksec->peer_sid, asoc->peer_secid,
5346 static int selinux_sctp_assoc_request(struct sctp_association *asoc,
5349 struct sk_security_struct *sksec = asoc->base.sk->sk_security;
5356 err = selinux_sctp_process_new_assoc(asoc, skb);
5361 * the information in asoc. This will be used by SCTP TCP type
5366 err = selinux_conn_sid(sksec->sid, asoc->peer_secid, &conn_sid);
5370 asoc->secid = conn_sid;
5373 return selinux_netlbl_sctp_assoc_request(asoc, skb);
5379 static int selinux_sctp_assoc_established(struct sctp_association *asoc,
5382 struct sk_security_struct *sksec = asoc->base.sk->sk_security;
5391 asoc->secid = sksec->sid;
5393 return selinux_sctp_process_new_assoc(asoc, skb);
5478 static void selinux_sctp_sk_clone(struct sctp_association *asoc, struct sock *sk,
5490 newsksec->sid = asoc->secid;
5491 newsksec->peer_sid = asoc->peer_secid;