Lines Matching refs:secattr
235 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
885 ret_val = netlbl_catmap_setbit(&secattr->attr.mls.cat, in cipso_v4_map_cat_rbm_ntoh()
943 const struct netlbl_lsm_secattr *secattr, in cipso_v4_map_cat_enum_hton() argument
951 cat = netlbl_catmap_walk(secattr->attr.mls.cat, cat + 1); in cipso_v4_map_cat_enum_hton()
980 struct netlbl_lsm_secattr *secattr) in cipso_v4_map_cat_enum_ntoh() argument
986 ret_val = netlbl_catmap_setbit(&secattr->attr.mls.cat, in cipso_v4_map_cat_enum_ntoh()
1051 const struct netlbl_lsm_secattr *secattr, in cipso_v4_map_cat_rng_hton() argument
1066 iter = netlbl_catmap_walk(secattr->attr.mls.cat, iter + 1); in cipso_v4_map_cat_rng_hton()
1074 iter = netlbl_catmap_walkrng(secattr->attr.mls.cat, iter); in cipso_v4_map_cat_rng_hton()
1112 struct netlbl_lsm_secattr *secattr) in cipso_v4_map_cat_rng_ntoh() argument
1126 ret_val = netlbl_catmap_setrng(&secattr->attr.mls.cat, in cipso_v4_map_cat_rng_ntoh()
1175 const struct netlbl_lsm_secattr *secattr, in cipso_v4_gentag_rbm() argument
1183 if ((secattr->flags & NETLBL_SECATTR_MLS_LVL) == 0) in cipso_v4_gentag_rbm()
1187 secattr->attr.mls.lvl, in cipso_v4_gentag_rbm()
1192 if (secattr->flags & NETLBL_SECATTR_MLS_CAT) { in cipso_v4_gentag_rbm()
1194 secattr, in cipso_v4_gentag_rbm()
1232 struct netlbl_lsm_secattr *secattr) in cipso_v4_parsetag_rbm() argument
1241 secattr->attr.mls.lvl = level; in cipso_v4_parsetag_rbm()
1242 secattr->flags |= NETLBL_SECATTR_MLS_LVL; in cipso_v4_parsetag_rbm()
1248 secattr); in cipso_v4_parsetag_rbm()
1250 netlbl_catmap_free(secattr->attr.mls.cat); in cipso_v4_parsetag_rbm()
1254 if (secattr->attr.mls.cat) in cipso_v4_parsetag_rbm()
1255 secattr->flags |= NETLBL_SECATTR_MLS_CAT; in cipso_v4_parsetag_rbm()
1274 const struct netlbl_lsm_secattr *secattr, in cipso_v4_gentag_enum() argument
1282 if (!(secattr->flags & NETLBL_SECATTR_MLS_LVL)) in cipso_v4_gentag_enum()
1286 secattr->attr.mls.lvl, in cipso_v4_gentag_enum()
1291 if (secattr->flags & NETLBL_SECATTR_MLS_CAT) { in cipso_v4_gentag_enum()
1293 secattr, in cipso_v4_gentag_enum()
1324 struct netlbl_lsm_secattr *secattr) in cipso_v4_parsetag_enum() argument
1333 secattr->attr.mls.lvl = level; in cipso_v4_parsetag_enum()
1334 secattr->flags |= NETLBL_SECATTR_MLS_LVL; in cipso_v4_parsetag_enum()
1340 secattr); in cipso_v4_parsetag_enum()
1342 netlbl_catmap_free(secattr->attr.mls.cat); in cipso_v4_parsetag_enum()
1346 secattr->flags |= NETLBL_SECATTR_MLS_CAT; in cipso_v4_parsetag_enum()
1365 const struct netlbl_lsm_secattr *secattr, in cipso_v4_gentag_rng() argument
1373 if (!(secattr->flags & NETLBL_SECATTR_MLS_LVL)) in cipso_v4_gentag_rng()
1377 secattr->attr.mls.lvl, in cipso_v4_gentag_rng()
1382 if (secattr->flags & NETLBL_SECATTR_MLS_CAT) { in cipso_v4_gentag_rng()
1384 secattr, in cipso_v4_gentag_rng()
1414 struct netlbl_lsm_secattr *secattr) in cipso_v4_parsetag_rng() argument
1423 secattr->attr.mls.lvl = level; in cipso_v4_parsetag_rng()
1424 secattr->flags |= NETLBL_SECATTR_MLS_LVL; in cipso_v4_parsetag_rng()
1430 secattr); in cipso_v4_parsetag_rng()
1432 netlbl_catmap_free(secattr->attr.mls.cat); in cipso_v4_parsetag_rng()
1436 if (secattr->attr.mls.cat) in cipso_v4_parsetag_rng()
1437 secattr->flags |= NETLBL_SECATTR_MLS_CAT; in cipso_v4_parsetag_rng()
1456 const struct netlbl_lsm_secattr *secattr, in cipso_v4_gentag_loc() argument
1460 if (!(secattr->flags & NETLBL_SECATTR_SECID)) in cipso_v4_gentag_loc()
1465 *(u32 *)&buffer[2] = secattr->attr.secid; in cipso_v4_gentag_loc()
1483 struct netlbl_lsm_secattr *secattr) in cipso_v4_parsetag_loc() argument
1485 secattr->attr.secid = *(u32 *)&tag[2]; in cipso_v4_parsetag_loc()
1486 secattr->flags |= NETLBL_SECATTR_SECID; in cipso_v4_parsetag_loc()
1763 const struct netlbl_lsm_secattr *secattr) in cipso_v4_genopt() argument
1780 secattr, in cipso_v4_genopt()
1786 secattr, in cipso_v4_genopt()
1792 secattr, in cipso_v4_genopt()
1798 secattr, in cipso_v4_genopt()
1832 const struct netlbl_lsm_secattr *secattr) in cipso_v4_sock_setattr() argument
1859 ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); in cipso_v4_sock_setattr()
1917 const struct netlbl_lsm_secattr *secattr) in cipso_v4_req_setattr() argument
1936 ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); in cipso_v4_req_setattr()
2085 struct netlbl_lsm_secattr *secattr) in cipso_v4_getattr() argument
2091 if (cipso_v4_cache_check(cipso, cipso[1], secattr) == 0) in cipso_v4_getattr()
2104 ret_val = cipso_v4_parsetag_rbm(doi_def, &cipso[6], secattr); in cipso_v4_getattr()
2107 ret_val = cipso_v4_parsetag_enum(doi_def, &cipso[6], secattr); in cipso_v4_getattr()
2110 ret_val = cipso_v4_parsetag_rng(doi_def, &cipso[6], secattr); in cipso_v4_getattr()
2113 ret_val = cipso_v4_parsetag_loc(doi_def, &cipso[6], secattr); in cipso_v4_getattr()
2117 secattr->type = NETLBL_NLTYPE_CIPSOV4; in cipso_v4_getattr()
2136 int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr) in cipso_v4_sock_getattr() argument
2147 secattr); in cipso_v4_sock_getattr()
2165 const struct netlbl_lsm_secattr *secattr) in cipso_v4_skbuff_setattr() argument
2175 ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); in cipso_v4_skbuff_setattr()