/security/selinux/ |
D | netlabel.c | 67 static struct netlbl_lsm_secattr *selinux_netlbl_sock_genattr(struct sock *sk) in selinux_netlbl_sock_genattr() argument 70 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sock_genattr() 100 const struct sock *sk, in selinux_netlbl_sock_getattr() argument 103 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sock_getattr() 232 struct sock *sk; in selinux_netlbl_skbuff_setsid() local 236 sk = skb_to_full_sk(skb); in selinux_netlbl_skbuff_setsid() 237 if (sk != NULL) { in selinux_netlbl_skbuff_setsid() 238 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_skbuff_setsid() 242 secattr = selinux_netlbl_sock_getattr(sk, sid); in selinux_netlbl_skbuff_setsid() 276 struct sk_security_struct *sksec = ep->base.sk->sk_security; in selinux_netlbl_sctp_assoc_request() [all …]
|
D | hooks.c | 4677 static int sock_has_perm(struct sock *sk, u32 perms) in sock_has_perm() argument 4679 struct sk_security_struct *sksec = sk->sk_security; in sock_has_perm() 4688 ad.u.net->sk = sk; in sock_has_perm() 4735 if (sock->sk) { in selinux_socket_post_create() 4736 sksec = sock->sk->sk_security; in selinux_socket_post_create() 4743 err = selinux_netlbl_socket_post_create(sock->sk, family); in selinux_socket_post_create() 4752 struct sk_security_struct *sksec_a = socka->sk->sk_security; in selinux_socket_socketpair() 4753 struct sk_security_struct *sksec_b = sockb->sk->sk_security; in selinux_socket_socketpair() 4767 struct sock *sk = sock->sk; in selinux_socket_bind() local 4768 struct sk_security_struct *sksec = sk->sk_security; in selinux_socket_bind() [all …]
|
/security/selinux/include/ |
D | netlabel.h | 45 void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family); 46 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk); 47 int selinux_netlbl_socket_post_create(struct sock *sk, u16 family); 55 int selinux_netlbl_socket_connect(struct sock *sk, struct sockaddr *addr); 56 int selinux_netlbl_socket_connect_locked(struct sock *sk, 111 static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone() argument 115 static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, in selinux_netlbl_sctp_sk_clone() argument 120 static inline int selinux_netlbl_socket_post_create(struct sock *sk, in selinux_netlbl_socket_post_create() argument 138 static inline int selinux_netlbl_socket_connect(struct sock *sk, in selinux_netlbl_socket_connect() argument 143 static inline int selinux_netlbl_socket_connect_locked(struct sock *sk, in selinux_netlbl_socket_connect_locked() argument
|
/security/smack/ |
D | smack_netfilter.c | 27 struct sock *sk = skb_to_full_sk(skb); in smack_ipv6_output() local 31 if (sk && sk->sk_security) { in smack_ipv6_output() 32 ssp = sk->sk_security; in smack_ipv6_output() 45 struct sock *sk = skb_to_full_sk(skb); in smack_ipv4_output() local 49 if (sk && sk->sk_security) { in smack_ipv4_output() 50 ssp = sk->sk_security; in smack_ipv4_output()
|
D | smack_lsm.c | 1453 if (sock == NULL || sock->sk == NULL) in smack_inode_getsecurity() 1456 ssp = sock->sk->sk_security; in smack_inode_getsecurity() 1843 ssp = sock->sk->sk_security; in smack_file_receive() 2261 static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) in smack_sk_alloc_security() argument 2282 sk->sk_security = ssp; in smack_sk_alloc_security() 2293 static void smack_sk_free_security(struct sock *sk) in smack_sk_free_security() argument 2298 if (sk->sk_family == PF_INET6) { in smack_sk_free_security() 2301 if (spp->smk_sock != sk) in smack_sk_free_security() 2309 kfree(sk->sk_security); in smack_sk_free_security() 2421 static int smack_netlbl_add(struct sock *sk) in smack_netlbl_add() argument [all …]
|
D | smack.h | 497 struct sock *sk) in smk_ad_setfield_u_net_sk() argument 499 a->a.u.net->sk = sk; in smk_ad_setfield_u_net_sk() 525 struct sock *sk) in smk_ad_setfield_u_net_sk() argument
|
/security/apparmor/ |
D | net.c | 146 struct sock *sk) in aa_label_sk_perm() argument 151 AA_BUG(!sk); in aa_label_sk_perm() 155 DEFINE_AUDIT_SK(sa, op, sk); in aa_label_sk_perm() 158 aa_profile_af_sk_perm(profile, &sa, request, sk)); in aa_label_sk_perm() 164 int aa_sk_perm(const char *op, u32 request, struct sock *sk) in aa_sk_perm() argument 169 AA_BUG(!sk); in aa_sk_perm() 174 error = aa_label_sk_perm(label, op, request, sk); in aa_sk_perm() 186 AA_BUG(!sock->sk); in aa_sock_file_perm() 188 return aa_label_sk_perm(label, op, request, sock->sk); in aa_sock_file_perm() 247 u32 secid, const struct sock *sk) in apparmor_secmark_check() argument [all …]
|
D | lsm.c | 781 static int apparmor_sk_alloc_security(struct sock *sk, int family, gfp_t flags) in apparmor_sk_alloc_security() argument 789 SK_CTX(sk) = ctx; in apparmor_sk_alloc_security() 797 static void apparmor_sk_free_security(struct sock *sk) in apparmor_sk_free_security() argument 799 struct aa_sk_ctx *ctx = SK_CTX(sk); in apparmor_sk_free_security() 801 SK_CTX(sk) = NULL; in apparmor_sk_free_security() 810 static void apparmor_sk_clone_security(const struct sock *sk, in apparmor_sk_clone_security() argument 813 struct aa_sk_ctx *ctx = SK_CTX(sk); in apparmor_sk_clone_security() 869 if (sock->sk) { in apparmor_socket_post_create() 870 struct aa_sk_ctx *ctx = SK_CTX(sock->sk); in apparmor_socket_post_create() 887 AA_BUG(!sock->sk); in apparmor_socket_bind() [all …]
|
/security/apparmor/include/ |
D | net.h | 57 struct lsm_network_audit NAME ## _net = { .sk = (SK), \ 99 struct sock *sk) in aa_profile_af_sk_perm() argument 101 return aa_profile_af_perm(profile, sa, request, sk->sk_family, in aa_profile_af_sk_perm() 102 sk->sk_type); in aa_profile_af_sk_perm() 104 int aa_sk_perm(const char *op, u32 request, struct sock *sk); 110 u32 secid, const struct sock *sk);
|
/security/ |
D | lsm_audit.c | 322 if (a->u.net->sk) { in dump_common_audit_data() 323 const struct sock *sk = a->u.net->sk; in dump_common_audit_data() local 329 switch (sk->sk_family) { in dump_common_audit_data() 331 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 343 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 345 print_ipv6_addr(ab, &sk->sk_v6_rcv_saddr, in dump_common_audit_data() 348 print_ipv6_addr(ab, &sk->sk_v6_daddr, in dump_common_audit_data() 355 u = unix_sk(sk); in dump_common_audit_data()
|
D | security.c | 2103 int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send() argument 2105 return call_int_hook(netlink_send, 0, sk, skb); in security_netlink_send() 2286 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in security_sock_rcv_skb() argument 2288 return call_int_hook(socket_sock_rcv_skb, 0, sk, skb); in security_sock_rcv_skb() 2306 int security_sk_alloc(struct sock *sk, int family, gfp_t priority) in security_sk_alloc() argument 2308 return call_int_hook(sk_alloc_security, 0, sk, family, priority); in security_sk_alloc() 2311 void security_sk_free(struct sock *sk) in security_sk_free() argument 2313 call_void_hook(sk_free_security, sk); in security_sk_free() 2316 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 2318 call_void_hook(sk_clone_security, sk, newsk); in security_sk_clone() [all …]
|
/security/tomoyo/ |
D | network.c | 626 static u8 tomoyo_sock_family(struct sock *sk) in tomoyo_sock_family() argument 632 family = sk->sk_family; in tomoyo_sock_family() 653 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_listen_permission() 690 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_connect_permission() 710 return tomoyo_check_inet_address(addr, addr_len, sock->sk->sk_protocol, in tomoyo_socket_connect_permission() 727 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_bind_permission() 745 return tomoyo_check_inet_address(addr, addr_len, sock->sk->sk_protocol, in tomoyo_socket_bind_permission() 762 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_sendmsg_permission() 776 sock->sk->sk_protocol, &address); in tomoyo_socket_sendmsg_permission()
|