Lines Matching refs:sksec

70 	struct sk_security_struct *sksec = sk->sk_security;  in selinux_netlbl_sock_genattr()  local
73 if (sksec->nlbl_secattr != NULL) in selinux_netlbl_sock_genattr()
74 return sksec->nlbl_secattr; in selinux_netlbl_sock_genattr()
79 rc = security_netlbl_sid_to_secattr(&selinux_state, sksec->sid, in selinux_netlbl_sock_genattr()
85 sksec->nlbl_secattr = secattr; in selinux_netlbl_sock_genattr()
103 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sock_getattr() local
104 struct netlbl_lsm_secattr *secattr = sksec->nlbl_secattr; in selinux_netlbl_sock_getattr()
154 void selinux_netlbl_sk_security_free(struct sk_security_struct *sksec) in selinux_netlbl_sk_security_free() argument
156 if (sksec->nlbl_secattr != NULL) in selinux_netlbl_sk_security_free()
157 netlbl_secattr_free(sksec->nlbl_secattr); in selinux_netlbl_sk_security_free()
170 void selinux_netlbl_sk_security_reset(struct sk_security_struct *sksec) in selinux_netlbl_sk_security_reset() argument
172 sksec->nlbl_state = NLBL_UNSET; in selinux_netlbl_sk_security_reset()
238 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_skbuff_setsid() local
240 if (sksec->nlbl_state != NLBL_REQSKB) in selinux_netlbl_skbuff_setsid()
276 struct sk_security_struct *sksec = ep->base.sk->sk_security; in selinux_netlbl_sctp_assoc_request() local
306 sksec->nlbl_state = NLBL_LABELED; in selinux_netlbl_sctp_assoc_request()
355 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_inet_csk_clone() local
358 sksec->nlbl_state = NLBL_LABELED; in selinux_netlbl_inet_csk_clone()
360 sksec->nlbl_state = NLBL_UNSET; in selinux_netlbl_inet_csk_clone()
373 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sctp_sk_clone() local
376 newsksec->nlbl_state = sksec->nlbl_state; in selinux_netlbl_sctp_sk_clone()
392 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_socket_post_create() local
404 sksec->nlbl_state = NLBL_LABELED; in selinux_netlbl_socket_post_create()
407 sksec->nlbl_state = NLBL_REQSKB; in selinux_netlbl_socket_post_create()
428 int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, in selinux_netlbl_sock_rcv_skb() argument
452 switch (sksec->sclass) { in selinux_netlbl_sock_rcv_skb()
464 sksec->sid, nlbl_sid, sksec->sclass, perm, ad); in selinux_netlbl_sock_rcv_skb()
507 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_socket_setsockopt() local
511 (sksec->nlbl_state == NLBL_LABELED || in selinux_netlbl_socket_setsockopt()
512 sksec->nlbl_state == NLBL_CONNLABELED)) { in selinux_netlbl_socket_setsockopt()
545 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_socket_connect_helper() local
553 sksec->nlbl_state = NLBL_REQSKB; in selinux_netlbl_socket_connect_helper()
564 sksec->nlbl_state = NLBL_CONNLABELED; in selinux_netlbl_socket_connect_helper()
584 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_socket_connect_locked() local
586 if (sksec->nlbl_state != NLBL_REQSKB && in selinux_netlbl_socket_connect_locked()
587 sksec->nlbl_state != NLBL_CONNLABELED) in selinux_netlbl_socket_connect_locked()