Lines Matching refs:rc
46 int rc; in selinux_netlbl_sidlookup_cached() local
48 rc = security_netlbl_secattr_to_sid(&selinux_state, secattr, sid); in selinux_netlbl_sidlookup_cached()
49 if (rc == 0 && in selinux_netlbl_sidlookup_cached()
54 return rc; in selinux_netlbl_sidlookup_cached()
69 int rc; in selinux_netlbl_sock_genattr() local
79 rc = security_netlbl_sid_to_secattr(&selinux_state, sksec->sid, in selinux_netlbl_sock_genattr()
81 if (rc != 0) { in selinux_netlbl_sock_genattr()
193 int rc; in selinux_netlbl_skbuff_getsid() local
202 rc = netlbl_skbuff_getattr(skb, family, &secattr); in selinux_netlbl_skbuff_getsid()
203 if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE) in selinux_netlbl_skbuff_getsid()
204 rc = selinux_netlbl_sidlookup_cached(skb, family, in selinux_netlbl_skbuff_getsid()
211 return rc; in selinux_netlbl_skbuff_getsid()
229 int rc; in selinux_netlbl_skbuff_setsid() local
247 rc = security_netlbl_sid_to_secattr(&selinux_state, sid, in selinux_netlbl_skbuff_setsid()
249 if (rc != 0) in selinux_netlbl_skbuff_setsid()
253 rc = netlbl_skbuff_setattr(skb, family, secattr); in selinux_netlbl_skbuff_setsid()
258 return rc; in selinux_netlbl_skbuff_setsid()
274 int rc; in selinux_netlbl_sctp_assoc_request() local
285 rc = security_netlbl_sid_to_secattr(&selinux_state, in selinux_netlbl_sctp_assoc_request()
287 if (rc != 0) in selinux_netlbl_sctp_assoc_request()
296 rc = netlbl_conn_setattr(ep->base.sk, (void *)&addr4, &secattr); in selinux_netlbl_sctp_assoc_request()
300 rc = netlbl_conn_setattr(ep->base.sk, (void *)&addr6, &secattr); in selinux_netlbl_sctp_assoc_request()
302 rc = -EAFNOSUPPORT; in selinux_netlbl_sctp_assoc_request()
305 if (rc == 0) in selinux_netlbl_sctp_assoc_request()
310 return rc; in selinux_netlbl_sctp_assoc_request()
326 int rc; in selinux_netlbl_inet_conn_request() local
333 rc = security_netlbl_sid_to_secattr(&selinux_state, req->secid, in selinux_netlbl_inet_conn_request()
335 if (rc != 0) in selinux_netlbl_inet_conn_request()
337 rc = netlbl_req_setattr(req, &secattr); in selinux_netlbl_inet_conn_request()
340 return rc; in selinux_netlbl_inet_conn_request()
391 int rc; in selinux_netlbl_socket_post_create() local
401 rc = netlbl_sock_setattr(sk, family, secattr); in selinux_netlbl_socket_post_create()
402 switch (rc) { in selinux_netlbl_socket_post_create()
408 rc = 0; in selinux_netlbl_socket_post_create()
412 return rc; in selinux_netlbl_socket_post_create()
433 int rc; in selinux_netlbl_sock_rcv_skb() local
442 rc = netlbl_skbuff_getattr(skb, family, &secattr); in selinux_netlbl_sock_rcv_skb()
443 if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE) in selinux_netlbl_sock_rcv_skb()
444 rc = selinux_netlbl_sidlookup_cached(skb, family, in selinux_netlbl_sock_rcv_skb()
449 if (rc != 0) in selinux_netlbl_sock_rcv_skb()
450 return rc; in selinux_netlbl_sock_rcv_skb()
463 rc = avc_has_perm(&selinux_state, in selinux_netlbl_sock_rcv_skb()
465 if (rc == 0) in selinux_netlbl_sock_rcv_skb()
469 netlbl_skbuff_err(skb, family, rc, 0); in selinux_netlbl_sock_rcv_skb()
470 return rc; in selinux_netlbl_sock_rcv_skb()
505 int rc = 0; in selinux_netlbl_socket_setsockopt() local
518 rc = netlbl_sock_getattr(sk, &secattr); in selinux_netlbl_socket_setsockopt()
520 if (rc == 0) in selinux_netlbl_socket_setsockopt()
521 rc = -EACCES; in selinux_netlbl_socket_setsockopt()
522 else if (rc == -ENOMSG) in selinux_netlbl_socket_setsockopt()
523 rc = 0; in selinux_netlbl_socket_setsockopt()
527 return rc; in selinux_netlbl_socket_setsockopt()
544 int rc; in selinux_netlbl_socket_connect_helper() local
554 rc = 0; in selinux_netlbl_socket_connect_helper()
555 return rc; in selinux_netlbl_socket_connect_helper()
559 rc = -ENOMEM; in selinux_netlbl_socket_connect_helper()
560 return rc; in selinux_netlbl_socket_connect_helper()
562 rc = netlbl_conn_setattr(sk, addr, secattr); in selinux_netlbl_socket_connect_helper()
563 if (rc == 0) in selinux_netlbl_socket_connect_helper()
566 return rc; in selinux_netlbl_socket_connect_helper()
605 int rc; in selinux_netlbl_socket_connect() local
608 rc = selinux_netlbl_socket_connect_locked(sk, addr); in selinux_netlbl_socket_connect()
611 return rc; in selinux_netlbl_socket_connect()