libvirt/src/security
Daniel P. Berrange 2b510e4903 Fix off-by-1 in default SELinux MCS range
For a while we're have random failures of 'securityselinuxtest'
which were not at all reproducible. Fortunately we finally
caught a failure with VIR_TEST_DEBUG=1 enabled. This revealed

TEST: securityselinuxtest
 1) GenLabel "dynamic unconfined, s0, c0.c1023"                       ... OK
 2) GenLabel "dynamic unconfined, s0, c0.c1023"                       ... OK
 3) GenLabel "dynamic unconfined, s0, c0.c1023"                       ... OK
 4) GenLabel "dynamic virtd, s0, c0.c1023"                            ... OK
 5) GenLabel "dynamic virtd, s0, c0.c10"                              ... OK
 6) GenLabel "dynamic virtd, s2-s3, c0.c1023"                         ... OK
 7) GenLabel "dynamic virtd, missing range"                           ... Category two 1024 is out of range 0-1023
FAILED
FAIL: securityselinuxtest

And sure enough we had an off-by-1 in the MCS range code when
the current process has no range set. The test suite randomly
allocates 2 categories from 0->1024 so the chances of hitting
this in the test suite were slim indeed :-)

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-20 13:09:00 +00:00
..
security_apparmor.c apparmor: Fix typo in function name in driver struct initialization 2013-10-29 17:01:22 +01:00
security_apparmor.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
security_dac.c Add '+' to uid/gid printing for label processing 2013-10-29 17:10:15 -04:00
security_dac.h security: use a single function to set DAC user and group 2013-10-29 06:55:09 -06:00
security_driver.c Convert 'int i' to 'size_t i' in src/security files 2013-07-10 17:40:14 +01:00
security_driver.h security: add new internal function "virSecurityManagerGetBaseLabel" 2013-10-29 06:57:07 -06:00
security_manager.c security: add new internal function "virSecurityManagerGetBaseLabel" 2013-10-29 06:57:07 -06:00
security_manager.h security: add new internal function "virSecurityManagerGetBaseLabel" 2013-10-29 06:57:07 -06:00
security_nop.c security: add new internal function "virSecurityManagerGetBaseLabel" 2013-10-29 06:57:07 -06:00
security_nop.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
security_selinux.c Fix off-by-1 in default SELinux MCS range 2013-11-20 13:09:00 +00:00
security_selinux.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
security_stack.c maint: avoid further typedef accidents 2013-10-30 17:02:12 -06:00
security_stack.h security: fix #endif comment in security_stack.h 2012-12-20 19:55:54 +01:00
virt-aa-helper.c Convert 'int i' to 'size_t i' in src/security files 2013-07-10 17:40:14 +01:00