Home
last modified time | relevance | path

Searched refs:secattr (Results 1 – 15 of 15) sorted by relevance

/Linux-v6.1/security/selinux/
Dnetlabel.c44 struct netlbl_lsm_secattr *secattr, in selinux_netlbl_sidlookup_cached() argument
49 rc = security_netlbl_secattr_to_sid(&selinux_state, secattr, sid); in selinux_netlbl_sidlookup_cached()
51 (secattr->flags & NETLBL_SECATTR_CACHEABLE) && in selinux_netlbl_sidlookup_cached()
52 (secattr->flags & NETLBL_SECATTR_CACHE)) in selinux_netlbl_sidlookup_cached()
53 netlbl_cache_add(skb, family, secattr); in selinux_netlbl_sidlookup_cached()
72 struct netlbl_lsm_secattr *secattr; in selinux_netlbl_sock_genattr() local
77 secattr = netlbl_secattr_alloc(GFP_ATOMIC); in selinux_netlbl_sock_genattr()
78 if (secattr == NULL) in selinux_netlbl_sock_genattr()
81 secattr); in selinux_netlbl_sock_genattr()
83 netlbl_secattr_free(secattr); in selinux_netlbl_sock_genattr()
[all …]
/Linux-v6.1/include/net/
Dnetlabel.h244 struct netlbl_lsm_secattr *secattr);
247 const struct netlbl_lsm_secattr *secattr);
251 const struct netlbl_lsm_secattr *secattr);
254 struct netlbl_lsm_secattr *secattr);
258 const struct netlbl_lsm_secattr *secattr);
262 const struct netlbl_lsm_secattr *secattr);
347 static inline void netlbl_secattr_init(struct netlbl_lsm_secattr *secattr) in netlbl_secattr_init() argument
349 memset(secattr, 0, sizeof(*secattr)); in netlbl_secattr_init()
361 static inline void netlbl_secattr_destroy(struct netlbl_lsm_secattr *secattr) in netlbl_secattr_destroy() argument
363 if (secattr->flags & NETLBL_SECATTR_FREE_DOMAIN) in netlbl_secattr_destroy()
[all …]
Dcipso_ipv4.h162 const struct netlbl_lsm_secattr *secattr);
170 const struct netlbl_lsm_secattr *secattr) in cipso_v4_cache_add() argument
183 struct netlbl_lsm_secattr *secattr);
186 const struct netlbl_lsm_secattr *secattr);
188 int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr);
191 const struct netlbl_lsm_secattr *secattr);
195 const struct netlbl_lsm_secattr *secattr);
198 struct netlbl_lsm_secattr *secattr);
210 struct netlbl_lsm_secattr *secattr) in cipso_v4_getattr() argument
217 const struct netlbl_lsm_secattr *secattr) in cipso_v4_sock_setattr() argument
[all …]
/Linux-v6.1/net/ipv4/
Dcipso_ipv4.c235 struct netlbl_lsm_secattr *secattr) in cipso_v4_cache_check() argument
254 secattr->cache = entry->lsm_data; in cipso_v4_cache_check()
255 secattr->flags |= NETLBL_SECATTR_CACHE; in cipso_v4_cache_check()
256 secattr->type = NETLBL_NLTYPE_CIPSOV4; in cipso_v4_cache_check()
297 const struct netlbl_lsm_secattr *secattr) in cipso_v4_cache_add() argument
321 refcount_inc(&secattr->cache->refcount); in cipso_v4_cache_add()
322 entry->lsm_data = secattr->cache; in cipso_v4_cache_add()
785 const struct netlbl_lsm_secattr *secattr, in cipso_v4_map_cat_rbm_hton() argument
802 host_spot = netlbl_catmap_walk(secattr->attr.mls.cat, in cipso_v4_map_cat_rbm_hton()
848 struct netlbl_lsm_secattr *secattr) in cipso_v4_map_cat_rbm_ntoh() argument
[all …]
/Linux-v6.1/security/selinux/ss/
Dmls.h70 struct netlbl_lsm_secattr *secattr);
73 struct netlbl_lsm_secattr *secattr);
76 struct netlbl_lsm_secattr *secattr);
79 struct netlbl_lsm_secattr *secattr);
83 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_lvl() argument
89 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_lvl() argument
95 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_cat() argument
101 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_cat() argument
Dmls.c566 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_lvl() argument
571 secattr->attr.mls.lvl = context->range.level[0].sens - 1; in mls_export_netlbl_lvl()
572 secattr->flags |= NETLBL_SECATTR_MLS_LVL; in mls_export_netlbl_lvl()
588 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_lvl() argument
593 context->range.level[0].sens = secattr->attr.mls.lvl + 1; in mls_import_netlbl_lvl()
610 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_cat() argument
618 &secattr->attr.mls.cat); in mls_export_netlbl_cat()
619 if (rc == 0 && secattr->attr.mls.cat != NULL) in mls_export_netlbl_cat()
620 secattr->flags |= NETLBL_SECATTR_MLS_CAT; in mls_export_netlbl_cat()
640 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_cat() argument
[all …]
Dservices.c3838 static void security_netlbl_cache_add(struct netlbl_lsm_secattr *secattr, in security_netlbl_cache_add() argument
3846 secattr->cache = netlbl_secattr_cache_alloc(GFP_ATOMIC); in security_netlbl_cache_add()
3847 if (secattr->cache == NULL) { in security_netlbl_cache_add()
3853 secattr->cache->free = kfree; in security_netlbl_cache_add()
3854 secattr->cache->data = sid_cache; in security_netlbl_cache_add()
3855 secattr->flags |= NETLBL_SECATTR_CACHE; in security_netlbl_cache_add()
3875 struct netlbl_lsm_secattr *secattr, in security_netlbl_secattr_to_sid() argument
3897 if (secattr->flags & NETLBL_SECATTR_CACHE) in security_netlbl_secattr_to_sid()
3898 *sid = *(u32 *)secattr->cache->data; in security_netlbl_secattr_to_sid()
3899 else if (secattr->flags & NETLBL_SECATTR_SECID) in security_netlbl_secattr_to_sid()
[all …]
/Linux-v6.1/net/ipv6/
Dcalipso.c201 struct netlbl_lsm_secattr *secattr) in calipso_cache_check() argument
220 secattr->cache = entry->lsm_data; in calipso_cache_check()
221 secattr->flags |= NETLBL_SECATTR_CACHE; in calipso_cache_check()
222 secattr->type = NETLBL_NLTYPE_CALIPSO; in calipso_cache_check()
265 const struct netlbl_lsm_secattr *secattr) in calipso_cache_add() argument
288 refcount_inc(&secattr->cache->refcount); in calipso_cache_add()
289 entry->lsm_data = secattr->cache; in calipso_cache_add()
609 const struct netlbl_lsm_secattr *secattr, in calipso_map_cat_hton() argument
618 spot = netlbl_catmap_walk(secattr->attr.mls.cat, in calipso_map_cat_hton()
649 struct netlbl_lsm_secattr *secattr) in calipso_map_cat_ntoh() argument
[all …]
/Linux-v6.1/net/netlabel/
Dnetlabel_calipso.h117 int calipso_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr);
120 const struct netlbl_lsm_secattr *secattr);
124 const struct netlbl_lsm_secattr *secattr);
128 struct netlbl_lsm_secattr *secattr);
131 const struct netlbl_lsm_secattr *secattr);
135 const struct netlbl_lsm_secattr *secattr);
Dnetlabel_kapi.c979 const struct netlbl_lsm_secattr *secattr) in netlbl_sock_setattr() argument
985 dom_entry = netlbl_domhsh_getentry(secattr->domain, family); in netlbl_sock_setattr()
999 secattr); in netlbl_sock_setattr()
1017 secattr); in netlbl_sock_setattr()
1072 struct netlbl_lsm_secattr *secattr) in netlbl_sock_getattr() argument
1078 ret_val = cipso_v4_sock_getattr(sk, secattr); in netlbl_sock_getattr()
1082 ret_val = calipso_sock_getattr(sk, secattr); in netlbl_sock_getattr()
1106 const struct netlbl_lsm_secattr *secattr) in netlbl_conn_setattr() argument
1119 entry = netlbl_domhsh_getentry_af4(secattr->domain, in netlbl_conn_setattr()
1128 entry->cipso, secattr); in netlbl_conn_setattr()
[all …]
Dnetlabel_calipso.c522 int calipso_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr) in calipso_sock_getattr() argument
528 ret_val = ops->sock_getattr(sk, secattr); in calipso_sock_getattr()
548 const struct netlbl_lsm_secattr *secattr) in calipso_sock_setattr() argument
554 ret_val = ops->sock_setattr(sk, doi_def, secattr); in calipso_sock_setattr()
588 const struct netlbl_lsm_secattr *secattr) in calipso_req_setattr() argument
594 ret_val = ops->req_setattr(req, doi_def, secattr); in calipso_req_setattr()
644 struct netlbl_lsm_secattr *secattr) in calipso_getattr() argument
650 ret_val = ops->opt_getattr(calipso, secattr); in calipso_getattr()
667 const struct netlbl_lsm_secattr *secattr) in calipso_skbuff_setattr() argument
673 ret_val = ops->skbuff_setattr(skb, doi_def, secattr); in calipso_skbuff_setattr()
[all …]
Dnetlabel_unlabeled.h226 struct netlbl_lsm_secattr *secattr);
Dnetlabel_unlabeled.c1460 struct netlbl_lsm_secattr *secattr) in netlbl_unlabel_getattr() argument
1490 secattr->attr.secid = netlbl_unlhsh_addr4_entry(addr4)->secid; in netlbl_unlabel_getattr()
1503 secattr->attr.secid = netlbl_unlhsh_addr6_entry(addr6)->secid; in netlbl_unlabel_getattr()
1512 secattr->flags |= NETLBL_SECATTR_SECID; in netlbl_unlabel_getattr()
1513 secattr->type = NETLBL_NLTYPE_UNLABELED; in netlbl_unlabel_getattr()
1520 secattr->type = NETLBL_NLTYPE_UNLABELED; in netlbl_unlabel_getattr()
/Linux-v6.1/security/selinux/include/
Dsecurity.h409 struct netlbl_lsm_secattr *secattr,
414 struct netlbl_lsm_secattr *secattr);
417 struct netlbl_lsm_secattr *secattr, in security_netlbl_secattr_to_sid() argument
425 struct netlbl_lsm_secattr *secattr) in security_netlbl_sid_to_secattr() argument
/Linux-v6.1/security/smack/
Dsmack_lsm.c3884 struct netlbl_lsm_secattr secattr; in smack_from_netlbl() local
3888 netlbl_secattr_init(&secattr); in smack_from_netlbl()
3893 if (netlbl_skbuff_getattr(skb, family, &secattr) == 0) { in smack_from_netlbl()
3894 skp = smack_from_secattr(&secattr, ssp); in smack_from_netlbl()
3895 if (secattr.flags & NETLBL_SECATTR_CACHEABLE) in smack_from_netlbl()
3899 netlbl_secattr_destroy(&secattr); in smack_from_netlbl()