]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virt-aa-helper: Fix return value of add_file_path
authorMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 23 Jul 2010 16:27:43 +0000 (18:27 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 24 Jul 2010 15:15:11 +0000 (17:15 +0200)
commitadde0e2cf60f8ad558de40361d9306e5da8ca9ab
tree804cb458820882d05b3a26599429e5b9a930487a
parent05c9a413364d5ab94117bbd3ae281ad0748d7fbb
virt-aa-helper: Fix return value of add_file_path

Commit a8853344994a7c6aaca882a5e949ab5536821ab5 added this
function and wrapped vah_add_file in it. vah_add_file may
return -1, 0, 1. It returns 1 in case the call to valid_path
detects a restricted file. The original code treated a return
value != 0 as error. The refactored code treats a return
value < 0 as error. This triggers segfault in virt-aa-helper
and breaks virt-aa-helper-test for the restricted file tests.

Make sure that add_file_path returns -1 on error.
src/security/virt-aa-helper.c