Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
b9137d5f
Commit
b9137d5f
authored
8 months ago
by
Andrea Bolognani
Browse files
Options
Downloads
Patches
Plain Diff
patches: Drop old backports
parent
b74ac7a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!236
Prepare 10.8.0-1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/backport/apparmor-Don-t-check-for-existence-of-templates-upfront.patch
+0
-69
0 additions, 69 deletions
...rmor-Don-t-check-for-existence-of-templates-upfront.patch
debian/patches/series
+0
-1
0 additions, 1 deletion
debian/patches/series
with
0 additions
and
70 deletions
debian/patches/backport/apparmor-Don-t-check-for-existence-of-templates-upfront.patch
deleted
100644 → 0
+
0
−
69
View file @
b74ac7a1
From: Andrea Bolognani <abologna@redhat.com>
Date: Mon, 16 Sep 2024 16:39:11 +0200
Subject: apparmor: Don't check for existence of templates upfront
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Currently, if either template is missing AppArmor support is
completely disabled. This means that uninstalling the LXC
driver from a system results in QEMU domains being started
without AppArmor confinement, which obviously doesn't make any
sense.
The problematic scenario was impossible to hit in Debian until
very recently, because all AppArmor files were shipped as part
of the same package; now that the Debian package is much closer
to the Fedora one, and specifically ships the AppArmor files
together with the corresponding driver, it becomes trivial to
trigger it.
Drop the checks entirely. virt-aa-helper, which is responsible
for creating the per-domain profiles starting from the
driver-specific template, already fails if the latter is not
present, so they were always redundant.
https://bugs.debian.org/1081396
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit d622ca04f6525b90cfe6d8274efaf4bee043d8ba)
Forwarded: not-needed
Origin: https://gitlab.com/libvirt/libvirt/-/commit/d622ca04f6525b90cfe6d8274efaf4bee043d8ba
---
src/security/security_apparmor.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
index 27184ae..a62ec1b 100644
--- a/src/security/security_apparmor.c
+++ b/src/security/security_apparmor.c
@@ -318,27 +318,9 @@
AppArmorSetSecurityHostLabel(virSCSIVHostDevice *dev G_GNUC_UNUSED,
static virSecurityDriverStatus
AppArmorSecurityManagerProbe(const char *virtDriver G_GNUC_UNUSED)
{
- g_autofree char *template_qemu = NULL;
- g_autofree char *template_lxc = NULL;
-
if (use_apparmor() < 0)
return SECURITY_DRIVER_DISABLE;
- /* see if template file exists */
- template_qemu = g_strdup_printf("%s/TEMPLATE.qemu", APPARMOR_DIR "/libvirt");
- template_lxc = g_strdup_printf("%s/TEMPLATE.lxc", APPARMOR_DIR "/libvirt");
-
- if (!virFileExists(template_qemu)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("template \'%1$s\' does not exist"), template_qemu);
- return SECURITY_DRIVER_DISABLE;
- }
- if (!virFileExists(template_lxc)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("template \'%1$s\' does not exist"), template_lxc);
- return SECURITY_DRIVER_DISABLE;
- }
-
return SECURITY_DRIVER_ENABLE;
}
This diff is collapsed.
Click to expand it.
debian/patches/series
+
0
−
1
View file @
b9137d5f
backport/apparmor-Don-t-check-for-existence-of-templates-upfront.patch
forward/Reduce-udevadm-settle-timeout-to-10-seconds.patch
debian/Debianize-libvirt-guests.patch
debian/apparmor_profiles_local_include.patch
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment