core: Add AppArmor profile switching

This permit to switch to a specific apparmor profile when starting a daemon. This
will result in a non operation if apparmor is disabled.
It also add a new build requirement on libapparmor for using this feature.
This commit is contained in:
Michael Scherer
2014-02-21 03:44:20 +01:00
committed by Lennart Poettering
parent 37f78db2f4
commit eef65bf3ee
12 changed files with 144 additions and 5 deletions
+3
View File
@@ -136,6 +136,9 @@ const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) {
case EXIT_PERSONALITY:
return "PERSONALITY";
case EXIT_APPARMOR_PROFILE:
return "APPARMOR";
}
}
+2 -1
View File
@@ -69,7 +69,8 @@ typedef enum ExitStatus {
EXIT_NO_NEW_PRIVILEGES,
EXIT_SECCOMP,
EXIT_SELINUX_CONTEXT,
EXIT_PERSONALITY /* 230 */
EXIT_PERSONALITY, /* 230 */
EXIT_APPARMOR_PROFILE
} ExitStatus;
typedef enum ExitStatusLevel {