diff options
author | John Johansen <john.johansen@canonical.com> | 2017-01-16 00:42:17 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-01-16 00:42:17 -0800 |
commit | 121d4a91e3c12ddfb167edafb9aa64cc5cc3a406 (patch) | |
tree | 2eac91ce9be962bd2c2d7600f9f86f464767d1e3 /security/apparmor/sid.c | |
parent | 98849dff90e270af3b34889b9e08252544f40b5b (diff) | |
download | linux-121d4a91e3c12ddfb167edafb9aa64cc5cc3a406.tar.bz2 |
apparmor: rename sid to secid
Move to common terminology with other LSMs and kernel infrastucture
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/sid.c')
-rw-r--r-- | security/apparmor/sid.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/security/apparmor/sid.c b/security/apparmor/sid.c deleted file mode 100644 index f0b34f76ebef..000000000000 --- a/security/apparmor/sid.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * AppArmor security module - * - * This file contains AppArmor security identifier (sid) manipulation fns - * - * 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. - * - * - * AppArmor allocates a unique sid for every profile loaded. If a profile - * is replaced it receives the sid of the profile it is replacing. - * - * The sid value of 0 is invalid. - */ - -#include <linux/spinlock.h> -#include <linux/errno.h> -#include <linux/err.h> - -#include "include/sid.h" - -/* global counter from which sids are allocated */ -static u32 global_sid; -static DEFINE_SPINLOCK(sid_lock); - -/* TODO FIXME: add sid to profile mapping, and sid recycling */ - -/** - * aa_alloc_sid - allocate a new sid for a profile - */ -u32 aa_alloc_sid(void) -{ - u32 sid; - - /* - * TODO FIXME: sid recycling - part of profile mapping table - */ - spin_lock(&sid_lock); - sid = (++global_sid); - spin_unlock(&sid_lock); - return sid; -} - -/** - * aa_free_sid - free a sid - * @sid: sid to free - */ -void aa_free_sid(u32 sid) -{ - ; /* NOP ATM */ -} |