Home
last modified time | relevance | path

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

/linux-6.12.1/security/selinux/
Dnetlabel.c45 struct netlbl_lsm_secattr *secattr, in selinux_netlbl_sidlookup_cached() argument
50 rc = security_netlbl_secattr_to_sid(secattr, sid); in selinux_netlbl_sidlookup_cached()
52 (secattr->flags & NETLBL_SECATTR_CACHEABLE) && in selinux_netlbl_sidlookup_cached()
53 (secattr->flags & NETLBL_SECATTR_CACHE)) in selinux_netlbl_sidlookup_cached()
54 netlbl_cache_add(skb, family, secattr); in selinux_netlbl_sidlookup_cached()
73 struct netlbl_lsm_secattr *secattr; in selinux_netlbl_sock_genattr() local
78 secattr = netlbl_secattr_alloc(GFP_ATOMIC); in selinux_netlbl_sock_genattr()
79 if (secattr == NULL) in selinux_netlbl_sock_genattr()
82 rc = security_netlbl_sid_to_secattr(sksec->sid, secattr); in selinux_netlbl_sock_genattr()
84 netlbl_secattr_free(secattr); in selinux_netlbl_sock_genattr()
[all …]
/linux-6.12.1/include/net/
Dnetlabel.h243 struct netlbl_lsm_secattr *secattr);
246 const struct netlbl_lsm_secattr *secattr);
250 const struct netlbl_lsm_secattr *secattr);
253 struct netlbl_lsm_secattr *secattr);
257 const struct netlbl_lsm_secattr *secattr);
261 const struct netlbl_lsm_secattr *secattr);
349 static inline void netlbl_secattr_init(struct netlbl_lsm_secattr *secattr) in netlbl_secattr_init() argument
351 memset(secattr, 0, sizeof(*secattr)); in netlbl_secattr_init()
363 static inline void netlbl_secattr_destroy(struct netlbl_lsm_secattr *secattr) in netlbl_secattr_destroy() argument
365 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,
189 int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr);
192 const struct netlbl_lsm_secattr *secattr);
196 const struct netlbl_lsm_secattr *secattr);
199 struct netlbl_lsm_secattr *secattr);
211 struct netlbl_lsm_secattr *secattr) in cipso_v4_getattr() argument
218 const struct netlbl_lsm_secattr *secattr, in cipso_v4_sock_setattr() argument
[all …]
/linux-6.12.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-6.12.1/security/selinux/ss/
Dmls.h54 struct netlbl_lsm_secattr *secattr);
56 struct netlbl_lsm_secattr *secattr);
58 struct netlbl_lsm_secattr *secattr);
60 struct netlbl_lsm_secattr *secattr);
64 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_lvl() argument
70 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_lvl() argument
76 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_cat() argument
82 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_cat() argument
Dmls.c554 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_lvl() argument
559 secattr->attr.mls.lvl = context->range.level[0].sens - 1; in mls_export_netlbl_lvl()
560 secattr->flags |= NETLBL_SECATTR_MLS_LVL; in mls_export_netlbl_lvl()
575 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_lvl() argument
580 context->range.level[0].sens = secattr->attr.mls.lvl + 1; in mls_import_netlbl_lvl()
596 struct netlbl_lsm_secattr *secattr) in mls_export_netlbl_cat() argument
604 &secattr->attr.mls.cat); in mls_export_netlbl_cat()
605 if (rc == 0 && secattr->attr.mls.cat != NULL) in mls_export_netlbl_cat()
606 secattr->flags |= NETLBL_SECATTR_MLS_CAT; in mls_export_netlbl_cat()
625 struct netlbl_lsm_secattr *secattr) in mls_import_netlbl_cat() argument
[all …]
Dservices.c3783 static void security_netlbl_cache_add(struct netlbl_lsm_secattr *secattr, in security_netlbl_cache_add() argument
3791 secattr->cache = netlbl_secattr_cache_alloc(GFP_ATOMIC); in security_netlbl_cache_add()
3792 if (secattr->cache == NULL) { in security_netlbl_cache_add()
3798 secattr->cache->free = kfree; in security_netlbl_cache_add()
3799 secattr->cache->data = sid_cache; in security_netlbl_cache_add()
3800 secattr->flags |= NETLBL_SECATTR_CACHE; in security_netlbl_cache_add()
3818 int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr, in security_netlbl_secattr_to_sid() argument
3840 if (secattr->flags & NETLBL_SECATTR_CACHE) in security_netlbl_secattr_to_sid()
3841 *sid = *(u32 *)secattr->cache->data; in security_netlbl_secattr_to_sid()
3842 else if (secattr->flags & NETLBL_SECATTR_SECID) in security_netlbl_secattr_to_sid()
[all …]
/linux-6.12.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-6.12.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.c981 const struct netlbl_lsm_secattr *secattr, in netlbl_sock_setattr() argument
988 dom_entry = netlbl_domhsh_getentry(secattr->domain, family); in netlbl_sock_setattr()
1002 secattr, sk_locked); in netlbl_sock_setattr()
1020 secattr); in netlbl_sock_setattr()
1075 struct netlbl_lsm_secattr *secattr) in netlbl_sock_getattr() argument
1081 ret_val = cipso_v4_sock_getattr(sk, secattr); in netlbl_sock_getattr()
1085 ret_val = calipso_sock_getattr(sk, secattr); in netlbl_sock_getattr()
1131 const struct netlbl_lsm_secattr *secattr) in netlbl_conn_setattr() argument
1144 entry = netlbl_domhsh_getentry_af4(secattr->domain, in netlbl_conn_setattr()
1153 entry->cipso, secattr, in netlbl_conn_setattr()
[all …]
Dnetlabel_calipso.c525 int calipso_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr) in calipso_sock_getattr() argument
531 ret_val = ops->sock_getattr(sk, secattr); in calipso_sock_getattr()
551 const struct netlbl_lsm_secattr *secattr) in calipso_sock_setattr() argument
557 ret_val = ops->sock_setattr(sk, doi_def, secattr); in calipso_sock_setattr()
591 const struct netlbl_lsm_secattr *secattr) in calipso_req_setattr() argument
597 ret_val = ops->req_setattr(req, doi_def, secattr); in calipso_req_setattr()
647 struct netlbl_lsm_secattr *secattr) in calipso_getattr() argument
653 ret_val = ops->opt_getattr(calipso, secattr); in calipso_getattr()
670 const struct netlbl_lsm_secattr *secattr) in calipso_skbuff_setattr() argument
676 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-6.12.1/security/selinux/include/
Dsecurity.h336 int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr,
339 int security_netlbl_sid_to_secattr(u32 sid, struct netlbl_lsm_secattr *secattr);
342 security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr, u32 *sid) in security_netlbl_secattr_to_sid() argument
348 security_netlbl_sid_to_secattr(u32 sid, struct netlbl_lsm_secattr *secattr) in security_netlbl_sid_to_secattr() argument
/linux-6.12.1/security/smack/
Dsmack_lsm.c4137 struct netlbl_lsm_secattr secattr; in smack_from_netlbl() local
4141 netlbl_secattr_init(&secattr); in smack_from_netlbl()
4146 if (netlbl_skbuff_getattr(skb, family, &secattr) == 0) { in smack_from_netlbl()
4147 skp = smack_from_secattr(&secattr, ssp); in smack_from_netlbl()
4148 if (secattr.flags & NETLBL_SECATTR_CACHEABLE) in smack_from_netlbl()
4152 netlbl_secattr_destroy(&secattr); in smack_from_netlbl()