]> git.ipfire.org Git - thirdparty/libvirt.git/commit
seclabel: Do not output relabel attribute for type 'none'
authorJiri Denemark <jdenemar@redhat.com>
Tue, 7 Feb 2012 18:19:01 +0000 (19:19 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 8 Feb 2012 10:55:56 +0000 (11:55 +0100)
commitf6957617c55ba7d5e6ca672b6d86f4352fd0119f
tree428139db2af9137e77621bf0e6e672309f80eb4e
parentc8683f231dd227da8540f3249d7e332ec7a75ad7
seclabel: Do not output relabel attribute for type 'none'

Security label type 'none' requires relabel to be set to 'no' so there's
no reason to output this extra attribute.  Moreover, since relabel is
internally stored in a negative from (norelabel), the default value for
relabel would be 'yes' in case there is no <seclabel> element in domain
configuration.  In case VIR_DOMAIN_SECLABEL_DEFAULT turns into
VIR_DOMAIN_SECLABEL_NONE, we would incorrectly output relabel='yes' for
seclabel type 'none'.
src/conf/domain_conf.c
tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml