/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 | 4472 static int sock_has_perm(struct sock *sk, u32 perms) in sock_has_perm() argument 4474 struct sk_security_struct *sksec = sk->sk_security; in sock_has_perm() 4483 ad.u.net->sk = sk; in sock_has_perm() 4530 if (sock->sk) { in selinux_socket_post_create() 4531 sksec = sock->sk->sk_security; in selinux_socket_post_create() 4538 err = selinux_netlbl_socket_post_create(sock->sk, family); in selinux_socket_post_create() 4547 struct sk_security_struct *sksec_a = socka->sk->sk_security; in selinux_socket_socketpair() 4548 struct sk_security_struct *sksec_b = sockb->sk->sk_security; in selinux_socket_socketpair() 4562 struct sock *sk = sock->sk; in selinux_socket_bind() local 4563 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, 101 static inline int selinux_netlbl_conn_setsid(struct sock *sk, in selinux_netlbl_conn_setsid() argument 117 static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone() argument 121 static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, in selinux_netlbl_sctp_sk_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 [all …]
|
/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 | 1457 if (sock == NULL || sock->sk == NULL) in smack_inode_getsecurity() 1460 ssp = sock->sk->sk_security; in smack_inode_getsecurity() 1842 ssp = sock->sk->sk_security; in smack_file_receive() 2246 static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) in smack_sk_alloc_security() argument 2267 sk->sk_security = ssp; in smack_sk_alloc_security() 2278 static void smack_sk_free_security(struct sock *sk) in smack_sk_free_security() argument 2283 if (sk->sk_family == PF_INET6) { in smack_sk_free_security() 2286 if (spp->smk_sock != sk) in smack_sk_free_security() 2294 kfree(sk->sk_security); in smack_sk_free_security() 2410 static int smack_netlabel(struct sock *sk, int labeled) in smack_netlabel() argument [all …]
|
D | smack.h | 489 struct sock *sk) in smk_ad_setfield_u_net_sk() argument 491 a->a.u.net->sk = sk; in smk_ad_setfield_u_net_sk() 521 struct sock *sk) in smk_ad_setfield_u_net_sk() argument
|
/security/apparmor/ |
D | net.c | 144 struct sock *sk) in aa_label_sk_perm() argument 149 AA_BUG(!sk); in aa_label_sk_perm() 153 DEFINE_AUDIT_SK(sa, op, sk); in aa_label_sk_perm() 156 aa_profile_af_sk_perm(profile, &sa, request, sk)); in aa_label_sk_perm() 162 int aa_sk_perm(const char *op, u32 request, struct sock *sk) in aa_sk_perm() argument 167 AA_BUG(!sk); in aa_sk_perm() 172 error = aa_label_sk_perm(label, op, request, sk); in aa_sk_perm() 184 AA_BUG(!sock->sk); in aa_sock_file_perm() 186 return aa_label_sk_perm(label, op, request, sock->sk); in aa_sock_file_perm() 212 struct common_audit_data *sa, struct sock *sk) in aa_secmark_perm() argument [all …]
|
D | lsm.c | 759 static int apparmor_sk_alloc_security(struct sock *sk, int family, gfp_t flags) in apparmor_sk_alloc_security() argument 767 SK_CTX(sk) = ctx; in apparmor_sk_alloc_security() 775 static void apparmor_sk_free_security(struct sock *sk) in apparmor_sk_free_security() argument 777 struct aa_sk_ctx *ctx = SK_CTX(sk); in apparmor_sk_free_security() 779 SK_CTX(sk) = NULL; in apparmor_sk_free_security() 788 static void apparmor_sk_clone_security(const struct sock *sk, in apparmor_sk_clone_security() argument 791 struct aa_sk_ctx *ctx = SK_CTX(sk); in apparmor_sk_clone_security() 842 if (sock->sk) { in apparmor_socket_post_create() 843 struct aa_sk_ctx *ctx = SK_CTX(sock->sk); in apparmor_socket_post_create() 860 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, struct sock *sk);
|
/security/ |
D | lsm_audit.c | 318 if (a->u.net->sk) { in dump_common_audit_data() 319 struct sock *sk = a->u.net->sk; in dump_common_audit_data() local 325 switch (sk->sk_family) { in dump_common_audit_data() 327 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 339 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 341 print_ipv6_addr(ab, &sk->sk_v6_rcv_saddr, in dump_common_audit_data() 344 print_ipv6_addr(ab, &sk->sk_v6_daddr, in dump_common_audit_data() 351 u = unix_sk(sk); in dump_common_audit_data()
|
D | security.c | 1905 int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send() argument 1907 return call_int_hook(netlink_send, 0, sk, skb); in security_netlink_send() 2048 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in security_sock_rcv_skb() argument 2050 return call_int_hook(socket_sock_rcv_skb, 0, sk, skb); in security_sock_rcv_skb() 2068 int security_sk_alloc(struct sock *sk, int family, gfp_t priority) in security_sk_alloc() argument 2070 return call_int_hook(sk_alloc_security, 0, sk, family, priority); in security_sk_alloc() 2073 void security_sk_free(struct sock *sk) in security_sk_free() argument 2075 call_void_hook(sk_free_security, sk); in security_sk_free() 2078 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 2080 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()
|