[virt-tools-list] [virt-install PATCH v2] Support multiple seclabels

Martin Kletzander mkletzan at redhat.com
Wed Dec 5 10:30:53 UTC 2012


On 12/04/2012 11:13 PM, Cole Robinson wrote:
> On 12/03/2012 09:06 AM, Martin Kletzander wrote:
>> Until now, virt-install supported only one seclabel and it was the
>> first one libvirt reported in capabilities.  This patch adds support
>> for more of them and also adds a functionality to try to match the
>> right one from the label given.  This is done by checking how many
>> colons the label has (precisely said, to how many parts it is split
>> by the colons).
>> ---
>>
>> I checked this without label as well as with selinux and DAC labels
>> and all worked as expected for me.  However DAC labels in libvirt
>> 0.10.2 are supported only as uid:gid (e.g. 107:36), but that should be
>> handled in upper layers as we cannot know that the user/group exist on
>> remote machine.  Newer versions of libvirt (>1.0.0) support user:group
>> (e.g. qemu:kvm) completely.
>>
>> v2:
>>  - Changed according to Cole's suggestions
>>
>>  virtinst/CapabilitiesParser.py | 10 +++++++---
>>  virtinst/Seclabel.py           | 36 ++++++++++++++++++++++++++++++++----
>>  virtinst/VirtualDisk.py        |  8 ++------
>>  3 files changed, 41 insertions(+), 13 deletions(-)
>>
> 
> This causes a few test failures when running 'python setup.py test', please
> make sure nothing there regresses. Feel free to ping me if you need help with
> any of the individual test cases.
> 
> Thanks,
> Cole
> 

I confess I haven't tried to run the tests, but that was mainly because
they failed before.  Now when it's alright, I rebased, fixed the tests
and will send v3 in a minute.

Martin




More information about the virt-tools-list mailing list