/security/selinux/ |
D | netlabel.c | 82 static struct netlbl_lsm_secattr *selinux_netlbl_sock_genattr(struct sock *sk) in selinux_netlbl_sock_genattr() argument 85 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sock_genattr() 114 const struct sock *sk, in selinux_netlbl_sock_getattr() argument 117 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sock_getattr() 246 struct sock *sk; in selinux_netlbl_skbuff_setsid() local 250 sk = skb_to_full_sk(skb); in selinux_netlbl_skbuff_setsid() 251 if (sk != NULL) { in selinux_netlbl_skbuff_setsid() 252 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_skbuff_setsid() 255 secattr = selinux_netlbl_sock_getattr(sk, sid); in selinux_netlbl_skbuff_setsid() 312 void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone() argument [all …]
|
D | hooks.c | 4377 static int sock_has_perm(struct sock *sk, u32 perms) in sock_has_perm() argument 4379 struct sk_security_struct *sksec = sk->sk_security; in sock_has_perm() 4388 ad.u.net->sk = sk; in sock_has_perm() 4433 if (sock->sk) { in selinux_socket_post_create() 4434 sksec = sock->sk->sk_security; in selinux_socket_post_create() 4437 err = selinux_netlbl_socket_post_create(sock->sk, family); in selinux_socket_post_create() 4449 struct sock *sk = sock->sk; in selinux_socket_bind() local 4453 err = sock_has_perm(sk, SOCKET__BIND); in selinux_socket_bind() 4462 family = sk->sk_family; in selinux_socket_bind() 4465 struct sk_security_struct *sksec = sk->sk_security; in selinux_socket_bind() [all …]
|
/security/smack/ |
D | smack_netfilter.c | 30 struct sock *sk = skb_to_full_sk(skb); in smack_ipv6_output() local 34 if (sk && sk->sk_security) { in smack_ipv6_output() 35 ssp = sk->sk_security; in smack_ipv6_output() 48 struct sock *sk = skb_to_full_sk(skb); in smack_ipv4_output() local 52 if (sk && sk->sk_security) { in smack_ipv4_output() 53 ssp = sk->sk_security; in smack_ipv4_output()
|
D | smack_lsm.c | 1502 if (sock == NULL || sock->sk == NULL) in smack_inode_getsecurity() 1505 ssp = sock->sk->sk_security; in smack_inode_getsecurity() 1890 ssp = sock->sk->sk_security; in smack_file_receive() 2302 static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) in smack_sk_alloc_security() argument 2323 sk->sk_security = ssp; in smack_sk_alloc_security() 2334 static void smack_sk_free_security(struct sock *sk) in smack_sk_free_security() argument 2339 if (sk->sk_family == PF_INET6) { in smack_sk_free_security() 2342 if (spp->smk_sock != sk) in smack_sk_free_security() 2350 kfree(sk->sk_security); in smack_sk_free_security() 2466 static int smack_netlabel(struct sock *sk, int labeled) in smack_netlabel() argument [all …]
|
D | smack.h | 466 struct sock *sk) in smk_ad_setfield_u_net_sk() argument 468 a->a.u.net->sk = sk; in smk_ad_setfield_u_net_sk() 498 struct sock *sk) in smk_ad_setfield_u_net_sk() argument
|
/security/selinux/include/ |
D | netlabel.h | 58 void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family); 59 int selinux_netlbl_socket_post_create(struct sock *sk, u16 family); 67 int selinux_netlbl_socket_connect(struct sock *sk, struct sockaddr *addr); 111 static inline int selinux_netlbl_conn_setsid(struct sock *sk, in selinux_netlbl_conn_setsid() argument 122 static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone() argument 126 static inline int selinux_netlbl_socket_post_create(struct sock *sk, in selinux_netlbl_socket_post_create() argument 144 static inline int selinux_netlbl_socket_connect(struct sock *sk, in selinux_netlbl_socket_connect() argument
|
/security/tomoyo/ |
D | realpath.c | 225 struct sock *sk = sock ? sock->sk : NULL; in tomoyo_get_socket_name() local 226 if (sk) { in tomoyo_get_socket_name() 228 "protocol=%u]", sk->sk_family, sk->sk_type, in tomoyo_get_socket_name() 229 sk->sk_protocol); in tomoyo_get_socket_name()
|
D | network.c | 622 static u8 tomoyo_sock_family(struct sock *sk) in tomoyo_sock_family() argument 628 family = sk->sk_family; in tomoyo_sock_family() 649 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_listen_permission() 685 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_connect_permission() 705 return tomoyo_check_inet_address(addr, addr_len, sock->sk->sk_protocol, in tomoyo_socket_connect_permission() 722 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_bind_permission() 740 return tomoyo_check_inet_address(addr, addr_len, sock->sk->sk_protocol, in tomoyo_socket_bind_permission() 757 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_sendmsg_permission() 771 sock->sk->sk_protocol, &address); in tomoyo_socket_sendmsg_permission()
|
/security/ |
D | lsm_audit.c | 321 if (a->u.net->sk) { in dump_common_audit_data() 322 struct sock *sk = a->u.net->sk; in dump_common_audit_data() local 328 switch (sk->sk_family) { in dump_common_audit_data() 330 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 342 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 344 print_ipv6_addr(ab, &sk->sk_v6_rcv_saddr, in dump_common_audit_data() 347 print_ipv6_addr(ab, &sk->sk_v6_daddr, in dump_common_audit_data() 354 u = unix_sk(sk); in dump_common_audit_data()
|
D | security.c | 1277 int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send() argument 1279 return call_int_hook(netlink_send, 0, sk, skb); in security_netlink_send() 1414 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in security_sock_rcv_skb() argument 1416 return call_int_hook(socket_sock_rcv_skb, 0, sk, skb); in security_sock_rcv_skb() 1434 int security_sk_alloc(struct sock *sk, int family, gfp_t priority) in security_sk_alloc() argument 1436 return call_int_hook(sk_alloc_security, 0, sk, family, priority); in security_sk_alloc() 1439 void security_sk_free(struct sock *sk) in security_sk_free() argument 1441 call_void_hook(sk_free_security, sk); in security_sk_free() 1444 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 1446 call_void_hook(sk_clone_security, sk, newsk); in security_sk_clone() [all …]
|