/* * 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" #include "policy_ns.h" #define cred_ctx(X) ((X)->security) #define current_ctx() cred_ctx(current_cred()) /* struct aa_file_ctx - the AppArmor context the file was opened in * @perms: the permission the file was opened with * * The file_ctx could currently be directly stored in file->f_security * as the profile reference is now stored in the f_cred. However the * ctx struct will expand in the future so we keep the struct. */ struct aa_file_ctx { u16 allow; }; /** * aa_alloc_file_context - allocate file_ctx * @gfp: gfp flags for allocation * * Returns: file_ctx or NULL on failure */
static inline struct aa_file_ctx *aa_alloc_file_context(gfp_t gfp) { return kzalloc(sizeof(struct aa_file_ctx), gfp); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 24 | 100.00% | 2 | 100.00% |
Total | 24 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 21 | 100.00% | 2 | 100.00% |
Total | 21 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 41 | 100.00% | 4 | 100.00% |
Total | 41 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 23 | 100.00% | 2 | 100.00% |
Total | 23 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 22 | 100.00% | 2 | 100.00% |
Total | 22 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 76 | 100.00% | 4 | 100.00% |
Total | 76 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 44 | 100.00% | 2 | 100.00% |
Total | 44 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
John Johansen | 448 | 100.00% | 8 | 100.00% |
Total | 448 | 100.00% | 8 | 100.00% |