]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security_dac: Don't return uninitialised value when parsing seclabels
authorPeter Krempa <pkrempa@redhat.com>
Tue, 28 Aug 2012 16:29:38 +0000 (18:29 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 28 Aug 2012 16:41:41 +0000 (18:41 +0200)
commit3c2f5e3ede67e9349c68422ef2d867cb64ef4329
tree935394c171c4940b68f26210fb14834a40a8c18e
parentf2b241e6a76a2b01f002bf1f71ee321b40bd2ee2
security_dac: Don't return uninitialised value when parsing seclabels

When starting a machine the DAC security driver tries to set the UID and
GID of the newly spawned process. This worked as desired if the desired
label was set. When the label was missing a logical bug in
virSecurityDACGenLabel() caused that uninitialised values were used as
uid and gid for the new process.

With this patch, default values (from qemu driver configuration)
are used if the label is not found.
src/security/security_dac.c