/security/selinux/ |
D | netlabel.c | 81 static struct netlbl_lsm_secattr *selinux_netlbl_sock_genattr(struct sock *sk) in selinux_netlbl_sock_genattr() argument 84 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_sock_genattr() 218 struct sock *sk; in selinux_netlbl_skbuff_setsid() local 222 sk = skb->sk; in selinux_netlbl_skbuff_setsid() 223 if (sk != NULL) { in selinux_netlbl_skbuff_setsid() 224 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_skbuff_setsid() 284 void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone() argument 286 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_inet_csk_clone() 304 int selinux_netlbl_socket_post_create(struct sock *sk, u16 family) in selinux_netlbl_socket_post_create() argument 307 struct sk_security_struct *sksec = sk->sk_security; in selinux_netlbl_socket_post_create() [all …]
|
D | hooks.c | 3931 static int sock_has_perm(struct task_struct *task, struct sock *sk, u32 perms) in sock_has_perm() argument 3933 struct sk_security_struct *sksec = sk->sk_security; in sock_has_perm() 3943 ad.u.net->sk = sk; in sock_has_perm() 3987 if (sock->sk) { in selinux_socket_post_create() 3988 sksec = sock->sk->sk_security; in selinux_socket_post_create() 3991 err = selinux_netlbl_socket_post_create(sock->sk, family); in selinux_socket_post_create() 4003 struct sock *sk = sock->sk; in selinux_socket_bind() local 4007 err = sock_has_perm(current, sk, SOCKET__BIND); in selinux_socket_bind() 4016 family = sk->sk_family; in selinux_socket_bind() 4019 struct sk_security_struct *sksec = sk->sk_security; in selinux_socket_bind() [all …]
|
/security/selinux/include/ |
D | netlabel.h | 57 void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family); 58 int selinux_netlbl_socket_post_create(struct sock *sk, u16 family); 66 int selinux_netlbl_socket_connect(struct sock *sk, struct sockaddr *addr); 109 static inline int selinux_netlbl_conn_setsid(struct sock *sk, in selinux_netlbl_conn_setsid() argument 120 static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone() argument 124 static inline int selinux_netlbl_socket_post_create(struct sock *sk, in selinux_netlbl_socket_post_create() argument 142 static inline int selinux_netlbl_socket_connect(struct sock *sk, in selinux_netlbl_socket_connect() argument
|
D | xfrm.h | 29 static inline struct inode_security_struct *get_sock_isec(struct sock *sk) in get_sock_isec() argument 31 if (!sk->sk_socket) in get_sock_isec() 34 return SOCK_INODE(sk->sk_socket)->i_security; in get_sock_isec()
|
/security/smack/ |
D | smack_lsm.c | 985 if (sock == NULL || sock->sk == NULL) in smack_inode_getsecurity() 988 ssp = sock->sk->sk_security; in smack_inode_getsecurity() 1730 static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) in smack_sk_alloc_security() argument 1743 sk->sk_security = ssp; in smack_sk_alloc_security() 1754 static void smack_sk_free_security(struct sock *sk) in smack_sk_free_security() argument 1756 kfree(sk->sk_security); in smack_sk_free_security() 1806 static int smack_netlabel(struct sock *sk, int labeled) in smack_netlabel() argument 1809 struct socket_smack *ssp = sk->sk_security; in smack_netlabel() 1821 bh_lock_sock_nested(sk); in smack_netlabel() 1825 netlbl_sock_delattr(sk); in smack_netlabel() [all …]
|
D | smack.h | 349 struct sock *sk) in smk_ad_setfield_u_net_sk() argument 351 a->a.u.net->sk = sk; in smk_ad_setfield_u_net_sk() 381 struct sock *sk) in smk_ad_setfield_u_net_sk() argument
|
/security/tomoyo/ |
D | realpath.c | 224 struct sock *sk = sock ? sock->sk : NULL; in tomoyo_get_socket_name() local 225 if (sk) { in tomoyo_get_socket_name() 227 "protocol=%u]", sk->sk_family, sk->sk_type, in tomoyo_get_socket_name() 228 sk->sk_protocol); in tomoyo_get_socket_name()
|
D | network.c | 621 static u8 tomoyo_sock_family(struct sock *sk) in tomoyo_sock_family() argument 627 family = sk->sk_family; in tomoyo_sock_family() 648 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_listen_permission() 684 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_connect_permission() 704 return tomoyo_check_inet_address(addr, addr_len, sock->sk->sk_protocol, in tomoyo_socket_connect_permission() 721 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_bind_permission() 739 return tomoyo_check_inet_address(addr, addr_len, sock->sk->sk_protocol, in tomoyo_socket_bind_permission() 756 const u8 family = tomoyo_sock_family(sock->sk); in tomoyo_socket_sendmsg_permission() 770 sock->sk->sk_protocol, &address); in tomoyo_socket_sendmsg_permission()
|
/security/ |
D | security.c | 1065 int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send() argument 1067 return security_ops->netlink_send(sk, skb); in security_netlink_send() 1188 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in security_sock_rcv_skb() argument 1190 return security_ops->socket_sock_rcv_skb(sk, skb); in security_sock_rcv_skb() 1206 int security_sk_alloc(struct sock *sk, int family, gfp_t priority) in security_sk_alloc() argument 1208 return security_ops->sk_alloc_security(sk, family, priority); in security_sk_alloc() 1211 void security_sk_free(struct sock *sk) in security_sk_free() argument 1213 security_ops->sk_free_security(sk); in security_sk_free() 1216 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 1218 security_ops->sk_clone_security(sk, newsk); in security_sk_clone() [all …]
|
D | lsm_audit.c | 302 if (a->u.net->sk) { in dump_common_audit_data() 303 struct sock *sk = a->u.net->sk; in dump_common_audit_data() local 308 switch (sk->sk_family) { in dump_common_audit_data() 310 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 321 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() 322 struct ipv6_pinfo *inet6 = inet6_sk(sk); in dump_common_audit_data() 333 u = unix_sk(sk); in dump_common_audit_data()
|
D | capability.c | 661 static int cap_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in cap_socket_sock_rcv_skb() argument 679 static int cap_sk_alloc_security(struct sock *sk, int family, gfp_t priority) in cap_sk_alloc_security() argument 684 static void cap_sk_free_security(struct sock *sk) in cap_sk_free_security() argument 688 static void cap_sk_clone_security(const struct sock *sk, struct sock *newsk) in cap_sk_clone_security() argument 692 static void cap_sk_getsecid(struct sock *sk, u32 *secid) in cap_sk_getsecid() argument 696 static void cap_sock_graft(struct sock *sk, struct socket *parent) in cap_sock_graft() argument 700 static int cap_inet_conn_request(struct sock *sk, struct sk_buff *skb, in cap_inet_conn_request() argument 711 static void cap_inet_conn_established(struct sock *sk, struct sk_buff *skb) in cap_inet_conn_established() argument 752 static int cap_tun_dev_attach(struct sock *sk, void *security) in cap_tun_dev_attach() argument 762 static void cap_skb_owned_by(struct sk_buff *skb, struct sock *sk) in cap_skb_owned_by() argument
|
D | commoncap.c | 60 int cap_netlink_send(struct sock *sk, struct sk_buff *skb) in cap_netlink_send() argument
|