summaryrefslogtreecommitdiff
path: root/src/ima-setup.h
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@polito.it>2012-03-15 19:06:11 +0100
committerLennart Poettering <lennart@poettering.net>2012-03-22 00:20:58 +0100
commit816115863962548a9a0d9fbfe429c7f8e685beac (patch)
tree2751984a95d834da101c8cdb3d7da0df6871e5ea /src/ima-setup.h
parent160481f68d0a5f26f75c04fb576fb854fd5416a5 (diff)
main: added support for loading IMA custom policies
This is an S/MIME signed message The new function ima_setup() loads an IMA custom policy from a file in the default location '/etc/ima/ima-policy', if present, and writes it to the path 'ima/policy' in the security filesystem. This function is executed at early stage in order to avoid that some file operations are not measured by IMA and it is placed after the initialization of SELinux because IMA needs the latter (or other security modules) to understand LSM-specific rules. This feature is enabled by default and can be disabled by providing the option '--disable-ima' to the configure script. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Acked-by: Gianluca Ramunno <ramunno@polito.it>
Diffstat (limited to 'src/ima-setup.h')
-rw-r--r--src/ima-setup.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ima-setup.h b/src/ima-setup.h
new file mode 100644
index 0000000000..7d677cf852
--- /dev/null
+++ b/src/ima-setup.h
@@ -0,0 +1,29 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#ifndef fooimasetuphfoo
+#define fooimasetuphfoo
+
+/***
+ This file is part of systemd.
+
+ Copyright 2010 Lennart Poettering
+ Copyright (C) 2012 Roberto Sassu - Politecnico di Torino, Italy
+ TORSEC group -- http://security.polito.it
+
+ systemd 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; either version 2 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+int ima_setup(void);
+
+#endif