Home
last modified time | relevance | path

Searched refs:secmark (Results 1 – 20 of 20) sorted by relevance

/linux/net/netfilter/
H A Dxt_CONNSECMARK.c34 if (skb->secmark) { in secmark_save()
39 if (ct && !ct->secmark) { in secmark_save()
40 ct->secmark = skb->secmark; in secmark_save()
52 if (!skb->secmark) { in secmark_restore()
57 if (ct && ct->secmark) in secmark_restore()
58 skb->secmark = ct->secmark; in secmark_restore()
H A Dxt_SECMARK.c29 u32 secmark = 0; in secmark_tg() local
33 secmark = info->secid; in secmark_tg()
39 skb->secmark = secmark; in secmark_tg()
H A Dnft_ct_fast.c52 *dest = ct->secmark; in nft_ct_get_fast_eval()
H A Dnft_meta.c362 *dest = skb->secmark; in nft_meta_get_eval()
450 skb->secmark = value; in nft_meta_set_eval()
942 skb->secmark = priv->secid; in nft_secmark_obj_eval()
H A Dnft_ct.c96 *dest = ct->secmark; in nft_ct_get_eval()
299 if (ct->secmark != value) { in nft_ct_set_eval()
300 ct->secmark = value; in nft_ct_set_eval()
H A Dnfnetlink_queue.c482 if (skb->secmark) in nfqnl_get_sk_secctx()
483 security_secid_to_secctx(skb->secmark, secdata, &seclen); in nfqnl_get_sk_secctx()
H A Dnf_conntrack_netlink.c363 ret = security_secid_to_secctx(ct->secmark, &secctx, &len); in ctnetlink_dump_secctx()
668 ret = security_secid_to_secctx(ct->secmark, NULL, &len); in ctnetlink_secctx_size()
816 if ((events & (1 << IPCT_SECMARK) || ct->secmark) in ctnetlink_conntrack_event()
2723 if (ct->secmark && ctnetlink_dump_secctx(skb, ct) < 0) in __ctnetlink_glue_build()
H A Dnf_conntrack_standalone.c179 ret = security_secid_to_secctx(ct->secmark, &secctx, &len); in ct_show_secctx()
H A Dnf_conntrack_core.c1819 ct->secmark = exp->master->secmark; in init_conntrack()
/linux/security/apparmor/
H A Dnet.c200 static int apparmor_secmark_init(struct aa_secmark *secmark) in apparmor_secmark_init() argument
204 if (secmark->label[0] == '*') { in apparmor_secmark_init()
205 secmark->secid = AA_SECID_WILDCARD; in apparmor_secmark_init()
210 secmark->label, strlen(secmark->label), in apparmor_secmark_init()
216 secmark->secid = label->secid; in apparmor_secmark_init()
233 if (!rules->secmark[i].secid) { in aa_secmark_perm()
234 ret = apparmor_secmark_init(&rules->secmark[i]); in aa_secmark_perm()
239 if (rules->secmark[i].secid == secid || in aa_secmark_perm()
240 rules->secmark[i].secid == AA_SECID_WILDCARD) { in aa_secmark_perm()
241 if (rules->secmark[i].deny) in aa_secmark_perm()
[all …]
H A Dpolicy_unpack.c571 if (aa_unpack_nameX(e, AA_STRUCT, "secmark")) { in unpack_secmark()
575 rules->secmark = kcalloc(size, sizeof(struct aa_secmark), in unpack_secmark()
577 if (!rules->secmark) in unpack_secmark()
583 if (!unpack_u8(e, &rules->secmark[i].audit, NULL)) in unpack_secmark()
585 if (!unpack_u8(e, &rules->secmark[i].deny, NULL)) in unpack_secmark()
587 if (!aa_unpack_strdup(e, &rules->secmark[i].label, NULL)) in unpack_secmark()
599 if (rules->secmark) { in unpack_secmark()
601 kfree(rules->secmark[i].label); in unpack_secmark()
602 kfree(rules->secmark); in unpack_secmark()
604 rules->secmark in unpack_secmark()
[all...]
H A Dlsm.c1293 if (!skb->secmark) in apparmor_socket_sock_rcv_skb()
1304 skb->secmark, sk); in apparmor_socket_sock_rcv_skb()
1409 if (!skb->secmark) in apparmor_inet_conn_request()
1413 skb->secmark, sk); in apparmor_inet_conn_request()
2086 if (!skb->secmark) in apparmor_ip_postroute()
2095 skb->secmark, sk)) in apparmor_ip_postroute()
H A Dpolicy.c252 kfree_sensitive(rules->secmark[i].label); in free_ruleset()
253 kfree_sensitive(rules->secmark); in free_ruleset()
/linux/security/smack/
H A Dsmack_netfilter.c32 skb->secmark = skp->smk_secid; in smack_ip_output()
H A Dsmack_lsm.c4120 if (skb == NULL || skb->secmark == 0) in smack_from_skb()
4123 return smack_from_secid(skb->secmark); in smack_from_skb()
/linux/security/apparmor/include/
H A Dpolicy.h159 * @secmark_count: number of secmark entries
160 * @secmark: secmark label match info
175 struct aa_secmark *secmark; member
/linux/include/net/netfilter/
H A Dnf_conntrack.h118 u_int32_t secmark; member
/linux/include/linux/
H A Dskbuff.h1045 __u32 secmark;
4965 to->secmark = from->secmark; in skb_copy_secmark()
4970 skb->secmark = 0; in skb_init_secmark()
/linux/security/selinux/
H A Dhooks.c5109 err = avc_has_perm(sk_sid, skb->secmark, SECCLASS_PACKET, in selinux_sock_rcv_skb_compat()
5178 err = avc_has_perm(sk_sid, skb->secmark, SECCLASS_PACKET, in selinux_socket_sock_rcv_skb()
5714 if (avc_has_perm(peer_sid, skb->secmark, in selinux_ip_forward()
5791 if (avc_has_perm(sksec->sid, skb->secmark, in selinux_ip_postroute_compat()
5913 if (avc_has_perm(peer_sid, skb->secmark, in selinux_ip_postroute()
/linux/net/core/
H A Dskbuff.c1560 CHECK_SKB_FIELD(secmark); in __copy_skb_header()