summaryrefslogtreecommitdiff
path: root/src/core/smack-setup.h
diff options
context:
space:
mode:
authorNathaniel Chen <nathaniel.chen@intel.com>2013-03-07 11:06:58 -0800
committerLennart Poettering <lennart@poettering.net>2013-03-07 20:53:14 +0100
commitffbd2c4d45787ba5ba85a32db6551efba66a1ee6 (patch)
treedf4c6083913ff2a020cecbe98cd80ff0b4fc981f /src/core/smack-setup.h
parent8f838d8aab0c5480664de04dce0171de4f4c7b00 (diff)
core: mount and initialize Smack
SMACK is the Simple Mandatory Access Control Kernel, a minimal approach to Access Control implemented as a kernel LSM. The kernel exposes the smackfs filesystem API through which access rules can be loaded. At boot time, we want to load the access rules as early as possible to ensure all early boot steps are checked by Smack. This patch mounts smackfs at the new location at /sys/fs/smackfs for kernels 3.8 and above. The /smack mountpoint is not supported. After mounting smackfs, rules are loaded from the usual location. For more information about Smack see: http://www.kernel.org/doc/Documentation/security/Smack.txt
Diffstat (limited to 'src/core/smack-setup.h')
-rw-r--r--src/core/smack-setup.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/smack-setup.h b/src/core/smack-setup.h
new file mode 100644
index 000000000..ffe91843c
--- /dev/null
+++ b/src/core/smack-setup.h
@@ -0,0 +1,26 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+ This file is part of systemd.
+
+ Copyright (C) 2013 Intel Corporation
+ Authors:
+ Nathaniel Chen <nathaniel.chen@intel.com>
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License,
+ or (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+int smack_setup(void);