[virt-tools-list] [virt-bootstrap PATCHv2 1/3] safe-untar: Inherit SElinux context

Radostin Stoyanov rstoyanov1 at gmail.com
Thu Jul 4 20:59:10 UTC 2019


Allow virt-sandbox to inherit the SElinux context of virt-bootstrap.

https://bugzilla.redhat.com/show_bug.cgi?id=1655305
https://bugzilla.redhat.com/show_bug.cgi?id=1671794

Reviewed-by: Cole Robinson <crobinso at redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 src/virtBootstrap/utils.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
index cd03a93..792b4d2 100644
--- a/src/virtBootstrap/utils.py
+++ b/src/virtBootstrap/utils.py
@@ -269,6 +269,7 @@ def safe_untar(src, dest):
     Extract tarball within LXC container for safety.
     """
     virt_sandbox = ['virt-sandbox',
+                    '--security=inherit',
                     '-c', LIBVIRT_CONN,
                     '--name=bootstrap_%s' % os.getpid(),
                     '-m', 'host-bind:/mnt=' + dest]  # Bind destination folder
-- 
2.21.0




More information about the virt-tools-list mailing list