aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/msec/config.py1
-rw-r--r--src/msec/plugins/apparmor.py27
2 files changed, 27 insertions, 1 deletions
diff --git a/src/msec/config.py b/src/msec/config.py
index c6df685..2b98c84 100644
--- a/src/msec/config.py
+++ b/src/msec/config.py
@@ -100,7 +100,6 @@ SETTINGS = {'BASE_LEVEL': ("libmsec.base_level",
'ENABLE_SUDO': ("libmsec.enable_sudo", ['yes', 'no', 'wheel']),
'ENABLE_PAM_WHEEL_FOR_SU': ("libmsec.enable_pam_wheel_for_su", ['yes', 'no']),
'ENABLE_SULOGIN': ("libmsec.enable_sulogin", ['yes', 'no']),
- 'ENABLE_APPARMOR': ("libmsec.enable_apparmor", ['yes', 'no']),
'ENABLE_POLICYKIT': ("libmsec.enable_policykit", ['yes', 'no']),
# password stuff
'ENABLE_PASSWORD': ("libmsec.enable_password", ['yes', 'no']),
diff --git a/src/msec/plugins/apparmor.py b/src/msec/plugins/apparmor.py
new file mode 100644
index 0000000..40fd969
--- /dev/null
+++ b/src/msec/plugins/apparmor.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+"""AppArmor plugin for msec """
+
+# main plugin class name
+PLUGIN = "apparmor"
+
+import os
+
+# configuration
+import config
+
+class apparmor:
+ def __init__(self, log=None, configfiles=None, root=None):
+ # initializing plugin
+ self.log = log
+ self.configfiles = configfiles
+ self.root = root
+
+ # configuring entry in global settings
+ param = 'ENABLE_APPARMOR'
+ callback = "apparmor.enable_apparmor"
+ valid_values = ['yes', 'no']
+ config.SETTINGS[param] = (callback, valid_values)
+
+ def enable_apparmor(self, params):
+ if self.log:
+ self.log.info("AppArmor plugin: not implemented yet!")