Re: [libvirt] RFC: sVirt disk isolation with network based storage

2014-08-21 Thread Daniel J Walsh
On 08/20/2014 11:17 AM, Daniel P. Berrange wrote: As everyone knows sVirt is our nice solution to isolating guest resources from other (malicious) guests through SELinux labelling of the appropriate files / device nodes. This has been pretty effective since we introduced it to libvirt. In

Re: [libvirt] RFC: sVirt disk isolation with network based storage

2014-08-20 Thread Daniel J Walsh
Adding Paul Moore since he is the labelled networking expert. On 08/20/2014 11:17 AM, Daniel P. Berrange wrote: As everyone knows sVirt is our nice solution to isolating guest resources from other (malicious) guests through SELinux labelling of the appropriate files / device nodes. This has

Re: [libvirt] [PATCH 2/2] virt-login-shell joins users into lxc container.

2014-01-02 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/23/2013 05:44 PM, Eric Blake wrote: On 12/23/2013 03:17 PM, Eric Blake wrote: +if (!(conf = virConfReadFile(login_shell_path, 0))) + goto cleanup; ...and non-root invariably fails here, since login_shell_path

Re: [libvirt] [PATCH] Be more clever and verbose about localization-initialization.

2013-11-04 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/04/2013 04:11 PM, Eric Blake wrote: On 10/08/2013 01:35 AM, Fuchs, Andreas wrote: I'd argue _for_ starting up libvirtd in case of errorous LC_* info. Since it is not a user-facing application but a system daemon, I think the impact of wrong

Re: [libvirt] [sandbox PATCH] virt-sandbox patch to launch containers with proper label

2013-09-30 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/30/2013 08:07 AM, Daniel P. Berrange wrote: On Wed, Sep 25, 2013 at 04:50:23PM -0400, Dan Walsh wrote: virt-sandbox should be launching containers based off the lxc_context file from selinux-policy. I changed the hard coded paths to match

Re: [libvirt] [sandbox PATCH 1/2] Add virt-sandbox -s inherit, to execute the sandbox from the parent.

2013-08-15 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/15/2013 04:48 AM, Daniel P. Berrange wrote: On Tue, Aug 13, 2013 at 01:10:11PM -0400, Dan Walsh wrote: This will allow us to run sandbox as the calling process, If I am running a shell as staff_u:unconfined_r:unconfined_t:s0, and I execute

[libvirt] Patch set to add virt-sandbox -s inherit and fixes for man pages.

2013-08-02 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 for some reason my git-sendmail keeps failing. [sandbox PATCH 1/3] Add virt-sandbox -s inherit, to execute the [sandbox PATCH 2/3] Add comment about LIBVIRT_DEFAULT_URI to [sandbox PATCH 3/3] virt-sandbox-service.pod did not mention upgrade

[libvirt] Updated patch for virt-login-shell for joing libvirt lxc containers.

2013-08-02 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 THis patch fixes all of Eric's and Daniels comments. [PATCH] virt-login-shell joins users into lxc container. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

Re: [libvirt] Patch set to add virt-sandbox -s inherit and fixes for man pages.

2013-08-02 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/02/2013 11:51 AM, Daniel P. Berrange wrote: On Fri, Aug 02, 2013 at 11:20:16AM -0400, Daniel J Walsh wrote: for some reason my git-sendmail keeps failing. Here's the wrapper script I used for that $ cat $HOME/usr/bin/git-spam #!/bin/sh

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-26 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I can't seem to get the error reporting to turn on, what am I doing wrong., if (virInitialize() 0) { fprintf(stderr, _(Failed to initialize libvirt)); return EXIT_FAILURE; } if (virErrorInitialize() 0) {

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-26 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/26/2013 07:40 AM, Daniel P. Berrange wrote: On Fri, Jul 26, 2013 at 07:38:31AM -0400, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I can't seem to get the error reporting to turn on, what am I doing wrong

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-25 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/25/2013 01:23 PM, Eric Blake wrote: On 07/25/2013 11:09 AM, Eric Blake wrote: ACK to this patch. Technically since we're post freeze we shouldn't commit this until 1.1.2, but since this is an entirely new program perhaps we could make

Re: [libvirt] [PATCH 2/2] libvirt patch to write a mcs translation file to /run/setrans directory

2013-05-17 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/17/2013 05:52 AM, Daniel P. Berrange wrote: On Wed, May 15, 2013 at 02:36:32PM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com mcstransd is a translation tool that can translate MCS Labels into human understandable code.

Re: [libvirt] [PATCH] Change label of fusefs mounted at /proc/meminfo in lxc containers

2013-05-16 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/16/2013 12:09 PM, Daniel P. Berrange wrote: On Thu, May 16, 2013 at 05:04:06PM +0100, Daniel P. Berrange wrote: On Wed, May 15, 2013 at 10:35:48AM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com We do not want to allow

Re: [libvirt] Reworked patch set to add UID/GID support for containers

2013-04-19 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/19/2013 05:58 AM, Daniel P. Berrange wrote: On Thu, Apr 18, 2013 at 02:34:49PM -0400, dwa...@redhat.com wrote: Combined all UID/GID patches, taken into account Dan Berrange feedback. Now UID will be based off the current UID. Sandbox

Re: [libvirt] [sandbox PATCH 11/15] Refactor Container class into Container and ServiceContainer Class.

2013-04-06 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/05/2013 07:10 AM, Daniel P. Berrange wrote: On Wed, Apr 03, 2013 at 07:17:29PM -0400, Dan Walsh wrote: This way we can share common methods between the ServiceContainer and the InteractiveContainer (Patch to be added) ---

Re: [libvirt] [PATCH 07/16] Change all internal functions that use __METHOD to use _METHOD. __METHOD's.

2013-04-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 07:28 AM, Daniel P. Berrange wrote: On Tue, Apr 02, 2013 at 06:11:23PM -0400, Dan Walsh wrote: Python makes assumptions about __METHOD names that will break some of the other patches that I am adding, involving inheritance of classes.

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 08:47 AM, Daniel P. Berrange wrote: On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: Differentiating on which kind of container to create based off of the --command == InteractiveContainer --unitfile == ServiceContainer

[libvirt] This patch adds the label to lxc-enter-namespace

2013-03-07 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 lxc-enter-namespace allows a process from outside a container to start a process inside a container. One problem with the current code is the process running within the container would run with the label of the process that created it. For example

Re: [libvirt] This patch adds the label to lxc-enter-namespace

2013-02-01 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/25/2013 02:39 PM, Daniel J Walsh wrote: (2nd pass) lxc-enter-namespace allows a process from outside a container to start a process inside a container. One problem with the current code is the process running within the container

[libvirt] These patches needed to mount the securityfs in containers.

2013-02-01 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simple patch to make sure /sys/kernel/security is mounted inside the container. Systemd attempts to use/mount this file system if it is not present. One of these days I will figure out how to merge patches. securityfs has to be mounted after

[libvirt] This patch adds the label to lxc-enter-namespace

2013-01-25 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (2nd pass) lxc-enter-namespace allows a process from outside a container to start a process inside a container. One problem with the current code is the process running within the container would run with the label of the process that created it.

[libvirt] This patch adds the label to lxc-enter-namespace

2013-01-24 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (Resend to the correct list) lxc-enter-namespace allows a process from outside a container to start a process inside a container. One problem with the current code is the process running within the container would run with the label of the process

Re: [libvirt] [PATCH] Log an audit message with the LXC init pid

2012-11-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/20/2012 12:52 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC driver logs audit messages when a container is started or stopped. These audit messages, however, contain the PID of the libvirt_lxc

Re: [libvirt] [virt-devel] This patch removes the mknod capability from Linux Containers.

2012-11-01 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/01/2012 04:07 PM, Eric Blake wrote: [originally posted to the wrong list] On 11/01/2012 12:57 PM, Daniel J Walsh wrote: 0001-Linux-Containers-are-not-allowed-to-create-device-no.patch From 3913ef4148728430cc9df79b84d5ec44130f4ac8 Mon

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-24 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/23/2012 10:55 AM, Cole Robinson wrote: On 10/23/2012 06:56 AM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2012 04:13 PM, Cole Robinson wrote: On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2012 04:13 PM, Cole Robinson wrote: On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44 PM, Cole Robinson wrote: When restoring selinux labels after a VM is stopped, any non-standard path that doesn't have a default selinux

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2012 04:13 PM, Cole Robinson wrote: On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44 PM, Cole Robinson wrote: When restoring selinux labels after a VM is stopped, any non-standard path that doesn't have a default selinux

[libvirt] Patch to default selinuxfs mount point to /sys/fs/selinux

2012-09-28 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there. I believe this is causing a bug in libvirt-lxc when

Re: [libvirt] [PATCH 0/8] Honour current process label when generating SELinux labels

2012-08-16 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/16/2012 11:41 AM, Viktor Mihajlovski wrote: On 08/10/2012 03:47 PM, Daniel P. Berrange wrote: This patch series makes a number of changes to the SELinux label generation code. This is intended to make it fully honour the current process

[libvirt] I missed this tmpfs when I built the previous patch

2012-07-18 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 We are mounting a tmpfs before mounting the cgroup file systems, we need to make sure this tmpfs is labeled correctly. This patch fixes the problem, Hopefully formatted correctly, it did pass the syntax check. -BEGIN PGP SIGNATURE- Version:

[libvirt] We need this patch to mount all tmpfs file systems with the correct context.

2012-07-17 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Basically within a Secure Linux Container (virt-sandbox) we want all content that the process within the container can write to be labeled the same. We are labeling the physical disk correctly but when we create RAM based file systems libvirt is not

Re: [libvirt] This patch creates a mount point for libvirt-lxc containers to mount on the destination system if it does not exist.

2012-06-25 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/25/2012 05:56 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 09:59:58AM -0400, Daniel J Walsh wrote: Currently libvirt-lxc checks to see if the destination exists and is a directory. If it is not a directory then the mount fails

Re: [libvirt] [PATCH 3/6] Use private data struct in SELinux driver

2012-05-12 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/11/2012 10:43 PM, Stefan Berger wrote: On 05/11/2012 06:10 AM, Daniel P. Berrange wrote: From: Daniel Walshdwa...@redhat.com Currently the SELinux driver stores its state in a set of global variables. This switches it to use a private

Re: [libvirt] [PATCH] Mount fresh instance of sysfs in LXC

2012-05-10 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/2012 04:25 PM, Eric Blake wrote: On 05/10/2012 10:17 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently to make sysfs readonly, we remount the existing instance and then bind it readonly. Unfortunately

Re: [libvirt] [PATCH] Add support for RAM filesystems for LXC

2012-05-09 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/2012 11:49 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Introduce a new syntax for filesystems to allow use of a RAM filesystem filesystem type='ram' source usage='1024'/ target dir='/mnt'/ /filesystem

[libvirt] This patch mounts tmpfs on /run iff /run directory exists in libvirt-lxc containers.

2012-05-04 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 We do not want to share /run with containers in order to prevent information leakage and applications within the containers attempting to communicate with applications outside of the container. It uses the same mount options used for /dev. We also

[libvirt] These two machines look like they have dontaudit rules disabled.

2012-03-13 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 audit_log-ex-std-node22.prod.rhcloud.com-2012-03-12 audit_log-ex-std-node24.prod.rhcloud.com-2012-03-12 semodule -B Will turn dontaudit rules back on. 22:31:32.791:507663) : avc: denied { siginh } for pid=15258 comm=trap-user

[libvirt] Postgresql binding to other localhosts by libra instances.

2012-03-13 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I see several postgresql instances trying to bind to 127.0.0.1 audit_log-ex-lg-node4.prod.rhcloud.com-2012-03-12 audit_log-ex-std-node18.prod.rhcloud.com-2012-03-12 audit_log-ex-std-node5.prod.rhcloud.com-2012-03-12

Re: [libvirt] [PATCH 0/3] Improve flexibility of SELinux labelling

2011-06-28 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/27/2011 08:20 AM, Daniel P. Berrange wrote: This patch series adds two new features - The ability to override 'system_u:system_r:svirt_t:s0' from /etc/selinux/targeted/contexts/virtual_domain_context using the guest XML - The

Re: [libvirt] [PATCH 0/3] Improve flexibility of SELinux labelling

2011-06-28 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/28/2011 08:23 AM, Daniel P. Berrange wrote: On Tue, Jun 28, 2011 at 07:29:28AM -0400, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/27/2011 08:20 AM, Daniel P. Berrange wrote: This patch series adds two new

Re: [libvirt] RFC: extending sVirt to confine host apps which talk to libvirtd

2011-06-09 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/08/2011 06:34 AM, Daniel P. Berrange wrote: On Mon, Jun 06, 2011 at 02:51:15PM -0400, Daniel J Walsh wrote: On 06/06/2011 10:41 AM, Daniel P. Berrange wrote: Technical Notes / Issues 1. Adding new SELinux security

Re: [libvirt] RFC: extending sVirt to confine host apps which talk to libvirtd

2011-06-06 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/06/2011 10:41 AM, Daniel P. Berrange wrote: What follows is a document outlining some thoughts I've been having on extending sVirt to allow confinement of applications which talk to libvirtd on the host, primarily focusing on use of SELinux,

Re: [libvirt] [PATCH 6/6] Try much harder to restore disk file labels

2009-09-07 Thread Daniel J Walsh
On 09/01/2009 02:20 PM, Stephen Smalley wrote: On Tue, 2009-09-01 at 13:33 -0400, Stephen Smalley wrote: On Tue, 2009-09-01 at 18:10 +0100, Daniel P. Berrange wrote: On Tue, Sep 01, 2009 at 01:00:13PM -0400, Stephen Smalley wrote: On Tue, 2009-09-01 at 16:28 +0100, Daniel P. Berrange wrote: *

Re: [libvirt] [PATCH] Make SELinuxSecurityDriverProbe() fail on Fedora 10

2009-04-16 Thread Daniel J Walsh
On 04/16/2009 06:54 AM, Daniel P. Berrange wrote: On Thu, Apr 16, 2009 at 11:44:48AM +0100, Mark McLoughlin wrote: Running make check on F10, I get: libvir: Security Labeling error : SELinuxInitialize: cannot open SELinux virtual domain context file

Re: [libvirt] Thoughts on svirt configuration files.

2009-04-08 Thread Daniel J Walsh
On 04/07/2009 03:27 PM, Daniel P. Berrange wrote: On Mon, Apr 06, 2009 at 03:05:57PM -0400, Daniel J Walsh wrote: Currently we do not want to hard code virtual image names into libvirt, so libvirt and virtual-manager can use libselinux to get the default image label and process label. svirt_t

[libvirt] Thoughts on svirt configuration files.

2009-04-06 Thread Daniel J Walsh
Currently we do not want to hard code virtual image names into libvirt, so libvirt and virtual-manager can use libselinux to get the default image label and process label. svirt_t and svirt_image_t. The idea was one policy writer might want his virtual images labeled differently than

[libvirt] Reworked the XML verification patch for svirt

2009-04-01 Thread Daniel J Walsh
Main goal of this patch it to verify data being written to xml and inform the user when he makes a mistake. Only able to verify static/dynamic in domain_conf. Added verify code to qemu_driver.c for model and potentially label. diff --git a/src/Makefile.am b/src/Makefile.am index

[libvirt] Added seclabeltest to run under test suite.

2009-04-01 Thread Daniel J Walsh
diff --git a/tests/.gitignore b/tests/.gitignore index 9d809c9..4f33d0b 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -15,6 +15,7 @@ nodedevxml2xmltest nodeinfotest statstest qparamtest +seclabeltest *.gcda *.gcno *.exe diff --git a/tests/Makefile.am b/tests/Makefile.am index

Re: [libvirt] Reworked the XML verification patch for svirt

2009-04-01 Thread Daniel J Walsh
On 04/01/2009 12:50 PM, Daniel P. Berrange wrote: On Wed, Apr 01, 2009 at 10:33:56AM -0400, Daniel J Walsh wrote: Main goal of this patch it to verify data being written to xml and inform the user when he makes a mistake. Only able to verify static/dynamic in domain_conf. Added verify code

[libvirt] Patch to allow setting of svirt XML.

2009-03-26 Thread Daniel J Walsh
This patch fixes the seclabel handling in domain_conf.c to allow virt-manager to set the seclabel model, type and label. Also adds missing error messages when the xml is incorrect. How much verification should we be doing on this? I have another patch that verifies the model as being a known

[libvirt] svirt fix for schema on domain.rng

2009-03-18 Thread Daniel J Walsh
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 107215c..21bd2b2 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -34,6 +34,12 @@ attribute name='model' text/ /attribute + attribute name='type' +choice +

Re: [libvirt] I have no idea why the current version of libvirt works for anyone in enforcing mode.

2009-03-17 Thread Daniel J Walsh
On 03/17/2009 11:52 AM, Daniel P. Berrange wrote: On Fri, Mar 13, 2009 at 10:19:44AM +, Daniel P. Berrange wrote: On Thu, Mar 12, 2009 at 01:39:13PM -0400, Daniel J Walsh wrote: Libvirt is executing qemu requiring it to execute pulseaudio which would require the folowing permissions

Re: [libvirt] Problem with the current svirt patch

2009-03-16 Thread Daniel J Walsh
On 03/13/2009 11:45 AM, Daniel P. Berrange wrote: On Fri, Mar 13, 2009 at 11:03:26AM -0400, Daniel J Walsh wrote: The current svirt patch relabels all disk to the image_t:MCS, which is incorrect. Read Only Disks and Sharable Disks should not be labeled. Also when libvirt is completed running

[libvirt] The gui should drop the connection if libvirt stops for any reason like service libvirt stop.

2009-03-16 Thread Daniel J Walsh
diff -u virtManager/engine.py~ virtManager/engine.py --- virtManager/engine.py~ 2009-03-16 14:49:16.0 -0400 +++ virtManager/engine.py 2009-03-16 14:58:05.0 -0400 @@ -158,6 +158,7 @@ logging.error((Could not refresh connection %s\n % (uri)) +

Re: [libvirt] I have no idea why the current version of libvirt works for anyone in enforcing mode.

2009-03-13 Thread Daniel J Walsh
On 03/13/2009 06:19 AM, Daniel P. Berrange wrote: On Thu, Mar 12, 2009 at 01:39:13PM -0400, Daniel J Walsh wrote: Libvirt is executing qemu requiring it to execute pulseaudio which would require the folowing permissions, #= svirt_t == allow svirt_t admin_home_t:dir

[libvirt] Problem with the current svirt patch

2009-03-13 Thread Daniel J Walsh
The current svirt patch relabels all disk to the image_t:MCS, which is incorrect. Read Only Disks and Sharable Disks should not be labeled. Also when libvirt is completed running the image it needs to relabel the image back to something sane. Right now it is labeling everything

Re: [libvirt] I have no idea why the current version of libvirt works for anyone in enforcing mode.

2009-03-13 Thread Daniel J Walsh
On 03/13/2009 11:16 AM, Cole Robinson wrote: Daniel J Walsh wrote: On 03/13/2009 09:49 AM, Daniel P. Berrange wrote: On Fri, Mar 13, 2009 at 09:44:15AM -0400, Daniel J Walsh wrote: On 03/13/2009 06:19 AM, Daniel P. Berrange wrote: On Thu, Mar 12, 2009 at 01:39:13PM -0400, Daniel J Walsh

[libvirt] I have no idea why the current version of libvirt works for anyone in enforcing mode.

2009-03-12 Thread Daniel J Walsh
Libvirt is executing qemu requiring it to execute pulseaudio which would require the folowing permissions, #= svirt_t == allow svirt_t admin_home_t:dir setattr; allow svirt_t admin_home_t:file { read write }; allow svirt_t pulseaudio_port_t:tcp_socket name_connect; allow

Re: [libvirt] Updated James Morris patch to apply to libvirt-0.6.0 version

2009-03-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Fri, Feb 27, 2009 at 03:37:55PM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Another patch off latest repository. This patch does not require the XML to include a label, although

[libvirt] Re: PATCH: Mark seclabel as dynamic generated, or statically pre-defined

2009-03-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: This patch implements the behaviour I was refering to earlier, whereby the domain XML explicitly says whether the security label is a statically pre-defined one, or dynamically generated on VM boot by libvirtd So when

Re: [libvirt] Updated James Morris patch to apply to libvirt-0.6.0 version

2009-02-27 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Another patch off latest repository. This patch does not require the XML to include a label, although this is still supported. Implemented most of the comments from Jim. make check and make syntax-check passes, Added seclabeltest.c to run in tests,

Re: [libvirt] Playing around with libvirt/virt-manager.

2009-02-24 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Mon, Feb 23, 2009 at 05:46:36PM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Tue, Feb 17, 2009 at 04:52:08PM -0500, Daniel J Walsh wrote: -BEGIN PGP

Re: [libvirt] Patch to python-virtinst to allow it to choose svirt labels

2009-02-24 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Fri, Feb 20, 2009 at 01:52:31PM -0500, Daniel J Walsh wrote: +def _default_seclabels(self): +try: +fd = open(selinux.selinux_virtual_domain_context_path(), 'r') +except OSError

Re: [libvirt] Updated James Morris patch to apply to libvirt-0.6.0 version

2009-02-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Meyering wrote: Daniel P. Berrange wrote: Just spotted one serious problem we need to address. The method 'qemudStartVMDaemon' quoted here is where we set the security label: ... Good catch. To use this, we'd make qemudStartVM() pass in

[libvirt] Re: Patch to python-virtinst to allow it to choose svirt labels

2009-02-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Cole Robinson wrote: Daniel J Walsh wrote: The patch didn't apply to latest upstream (there has been a lot of code movement recently). I rediffed the patch to apply against current tip, and made a few minor changes that don't change the overall

Re: [libvirt] Playing around with libvirt/virt-manager.

2009-02-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Tue, Feb 17, 2009 at 04:52:08PM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Looks like qemu launched from libvirt wants to create pulseaudito files under /root/.pulse directory. Hmm

Re: [libvirt] Updated James Morris patch to apply to libvirt-0.6.0 version

2009-02-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: Just spotted one serious problem we need to address. The method 'qemudStartVMDaemon' quoted here is where we set the security label: On Tue, Feb 17, 2009 at 11:20:17AM -0500, Daniel J Walsh wrote: @@ -1178,6 +1237,16

[libvirt] Patch to python-virtinst to allow it to choose svirt labels

2009-02-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Also found at least one big bug in python-virtinst, VirtualDisk.py was dropping the / between dirname and basename of installation object, when you told it to create the object. I think we want to have a big switch stored in libvirt somewhere saying

Re: [libvirt] Playing around with libvirt/virt-manager.

2009-02-18 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Tue, Feb 17, 2009 at 04:52:08PM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Looks like qemu launched from libvirt wants to create pulseaudito files under /root/.pulse directory. Hmm

Re: [libvirt] Updated James Morris patch to apply to libvirt-0.6.0 version

2009-02-17 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Meyering wrote: Daniel J Walsh dwa...@redhat.com wrote: [I removed the 1900+ lines of useless context] Ok, I have added your patches and make syntax-check succeeds except it does not like po_check --- po/POTFILES.in +++ po/POTFILES.in

[libvirt] Playing around with libvirt/virt-manager.

2009-02-17 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Looks like qemu launched from libvirt wants to create pulseaudito files under /root/.pulse directory. Seems strange, and we might want to consider changing the homedir for each qemu launched by libvirt. /var/run/libvirt/qemu/DOMAIN for example. It

[libvirt] I have been looking over James Morris patches for svirt.

2009-02-06 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What is the process to get them into libvirt? I have begun to look at the second componant of the libvirt change. James patch, allows libvirt to read the SELinux context out of the xml database and execute qemu with the context. The second

[libvirt] (resend) Problems with virt-manager checking access on virtual images.

2009-01-30 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Met with Cole this morning and we talked about how SELinux can cause people headaches when installing virtual images from random locations. User downloads a iso image to his home directory and then uses virt-manager to install it. Problem is when

Re: [libvirt] (resend) Problems with virt-manager checking access on virtual images.

2009-01-30 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Fri, Jan 30, 2009 at 07:38:40AM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Met with Cole this morning and we talked about how SELinux can cause people headaches when installing virtual

Re: [libvirt] (resend) Problems with virt-manager checking access on virtual images.

2009-01-30 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Fri, Jan 30, 2009 at 09:06:38AM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: I don't particularly like the idea of running another program to check

[libvirt] Re: SELinux SVirt/Qemu problems with current qemu design.

2009-01-14 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel P. Berrange wrote: On Tue, Jan 13, 2009 at 05:18:46PM -0500, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 As I begin to work on the svirt lock down of the qemu process, I am seeing a disturbing problem. The qemu

[libvirt] Re: SELinux SVirt/Qemu problems with current qemu design.

2009-01-14 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Morris wrote: On Wed, 14 Jan 2009, Daniel J Walsh wrote: I think labeling can be done to allow the access to directories, and files. So libvirt could go in an label a file/directory in such a way that the running qemu_t:s0.c10 can read

Re: [libvirt] Re: SELinux SVirt/Qemu problems with current qemu design.

2009-01-14 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Itamar Heim wrote: From: libvir-list-boun...@redhat.com [mailto:libvir-list- boun...@redhat.com] On Behalf Of Daniel J Walsh I think labeling can be done to allow the access to directories, and files. So libvirt could go in an label a file

[libvirt] SELinux SVirt/Qemu problems with current qemu design.

2009-01-13 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 As I begin to work on the svirt lock down of the qemu process, I am seeing a disturbing problem. The qemu binaries are being used to both setup the guest image environment and then to run the guest image.

Re: [libvirt] [RFC] sVirt v0.10 - initial prototype

2008-10-30 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Atsushi SAKAI wrote: Hi, James I have a question just for interest. The security context stores like /etc/selinux/targeted/contexts/files/file_contexts. But you are storeing the domain security label on libvirt specific XML. Of course,

[libvirt] Re: [RFC] sVirt v0.10 - initial prototype

2008-10-21 Thread Daniel J Walsh
James Morris wrote: This is a request for comments on the initial prototype release of sVirt, a project to add security labeling support to Linux-based virtualization. Project page: http://www.selinuxproject.org/page/SVirt Previous libvirt discussions: High-level requirements:

Re: [libvirt] [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-based virtualization

2008-08-12 Thread Daniel J Walsh
James Morris wrote: On Tue, 12 Aug 2008, Daniel P. Berrange wrote: Do we instead add the info the udev rules, so when /dev is populated at boot time by udev the device nodes get the desired initial labelling ? Or do we manually chcon() the device at the

Re: [libvirt] [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-based virtualization

2008-08-12 Thread Daniel J Walsh
Daniel P. Berrange wrote: On Tue, Aug 12, 2008 at 09:20:41AM -0400, Daniel J Walsh wrote: James Morris wrote: On Tue, 12 Aug 2008, Daniel P. Berrange wrote: Do we instead add the info the udev rules, so when /dev is populated at boot time by udev the device nodes get

Re: [libvirt] [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-based virtualization

2008-08-12 Thread Daniel J Walsh
Daniel P. Berrange wrote: On Tue, Aug 12, 2008 at 09:54:23AM -0400, Daniel J Walsh wrote: Daniel P. Berrange wrote: On Tue, Aug 12, 2008 at 09:20:41AM -0400, Daniel J Walsh wrote: The experimenting I have done has been around labeling of the virt_image and the process with mcs labels