Add apparmor=1 security=apparmor to kernelopts if apparmor feature is set

This commit is contained in:
herypt 2020-09-02 15:09:13 +02:00
parent 80ecee51db
commit 67faa7c1f9
No known key found for this signature in database
GPG Key ID: BF96198750F33955

View File

@ -49,6 +49,8 @@
{% if vm.kernel %}
{% if vm.features.check_with_template('no-default-kernelopts', False) -%}
<cmdline>{{ vm.kernelopts }}</cmdline>
{% elif vm.features.check_with_template('apparmor', '0') == '1' -%}
<cmdline>{{ vm.kernelopts_common }}{{ vm.kernelopts }} apparmor=1 security=apparmor</cmdline>
{% else -%}
<cmdline>{{ vm.kernelopts_common }}{{ vm.kernelopts }}</cmdline>
{% endif -%}