]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix parsing of uid/gid on Mingw32
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 21 Aug 2012 11:07:04 +0000 (12:07 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 21 Aug 2012 14:03:54 +0000 (15:03 +0100)
commit7272a92c8109eef0cae16d1ca39bf39ae8018abc
treec28e7bab9475659271b9c52adc61cef475aa7a82
parentdfbb2d31208deeb68570a8242a3fae08b1bd27c7
Fix parsing of uid/gid on Mingw32

The DAC security driver uses the virStrToLong_ui function to
parse the uid/gid out of the seclabel string. This works on
Linux where 'uid_t' is an unsigned int, but on Mingw32 it is
just an 'int'. This causes compiler warnings about signed/
unsigned int pointer mis-match.

To avoid this, use explicit 'unsigned int ouruid' local
vars to pass into virStrToLong_ui, and then simply assign
to the 'uid_t' type after parsing

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/security/security_dac.c