• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/security/selinux/ss/

Lines Matching refs:secattr

2979  * @secattr: the NetLabel packet security attributes
2984 * @skb, in the NetLabel subsystem cache. This function assumes @secattr has
2988 static void security_netlbl_cache_add(struct netlbl_lsm_secattr *secattr,
2996 secattr->cache = netlbl_secattr_cache_alloc(GFP_ATOMIC);
2997 if (secattr->cache == NULL) {
3003 secattr->cache->free = kfree;
3004 secattr->cache->data = sid_cache;
3005 secattr->flags |= NETLBL_SECATTR_CACHE;
3009 * security_netlbl_secattr_to_sid - Convert a NetLabel secattr to a SELinux SID
3010 * @secattr: the NetLabel packet security attributes
3014 * Convert the given NetLabel security attributes in @secattr into a
3015 * SELinux SID. If the @secattr field does not contain a full SELinux
3017 * 'cache' field of @secattr is set and the CACHE flag is set; this is to
3018 * allow the @secattr to be used by NetLabel to cache the secattr to SID
3023 int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr,
3037 if (secattr->flags & NETLBL_SECATTR_CACHE) {
3038 *sid = *(u32 *)secattr->cache->data;
3040 } else if (secattr->flags & NETLBL_SECATTR_SECID) {
3041 *sid = secattr->attr.secid;
3043 } else if (secattr->flags & NETLBL_SECATTR_MLS_LVL) {
3052 mls_import_netlbl_lvl(&ctx_new, secattr);
3053 if (secattr->flags & NETLBL_SECATTR_MLS_CAT) {
3055 secattr->attr.mls.cat) != 0)
3068 security_netlbl_cache_add(secattr, *sid);
3085 * security_netlbl_sid_to_secattr - Convert a SELinux SID to a NetLabel secattr
3087 * @secattr: the NetLabel packet security attributes
3094 int security_netlbl_sid_to_secattr(u32 sid, struct netlbl_lsm_secattr *secattr)
3108 secattr->domain = kstrdup(policydb.p_type_val_to_name[ctx->type - 1],
3110 if (secattr->domain == NULL) {
3114 secattr->attr.secid = sid;
3115 secattr->flags |= NETLBL_SECATTR_DOMAIN_CPY | NETLBL_SECATTR_SECID;
3116 mls_export_netlbl_lvl(ctx, secattr);
3117 rc = mls_export_netlbl_cat(ctx, secattr);