/* * AppArmor security module * * This file contains AppArmor contexts used to associate "labels" to objects. * * Copyright (C) 1998-2008 Novell/SUSE * Copyright 2009-2010 Canonical Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2 of the * License. */ #ifndef __AA_CONTEXT_H #define __AA_CONTEXT_H #include <linux/cred.h> #include <linux/slab.h> #include <linux/sched.h> #include "policy.h" #define cred_cxt(X) (X)->security #define current_cxt() cred_cxt(current_cred()) /* struct aa_file_cxt - the AppArmor context the file was opened in * @perms: the permission the file was opened with * * The file_cxt could currently be directly stored in file->f_security * as the profile reference is now stored in the f_cred. However the * cxt struct will expand in the future so we keep the struct. */ struct aa_file_cxt { u16 allow; }; /** * aa_alloc_file_context - allocate file_cxt * @gfp: gfp flags for allocation * * Returns: file_cxt or NULL on failure */
static inline struct aa_file_cxt *aa_alloc_file_context(gfp_t gfp) { return kzalloc(sizeof(struct aa_file_cxt), gfp); }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 24 | 100.00% | 1 | 100.00% |
Total | 24 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 21 | 100.00% | 1 | 100.00% |
Total | 21 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 41 | 100.00% | 3 | 100.00% |
Total | 41 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 23 | 100.00% | 2 | 100.00% |
Total | 23 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 22 | 100.00% | 2 | 100.00% |
Total | 22 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 76 | 100.00% | 3 | 100.00% |
Total | 76 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 44 | 100.00% | 1 | 100.00% |
Total | 44 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
john johansen | john johansen | 425 | 100.00% | 5 | 100.00% |
Total | 425 | 100.00% | 5 | 100.00% |