mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
33ddfaf4e6
This script works under two specific conditions. For each opened file, search for all functions that has ACL calls and store them, and see if there is a vir*DriverPtr struct declared in it. For each implementation found, check if there is an ACL verification inside it, and error out if none was found. The script also supports the concept of stub, where another function takes the responsibility for the ACL call instead of the original API. Unfortunately this is not enough to cover the new scenario we have now, with domain_driver.c containing helper functions that execute the ACL calls. The script does not store state between files because, until now, it wasn't needed to - APIs and stubs and vir*DriverPtr declarations were always in the same file. Also, the script will not check for ACL in functions that does not belong to a vir*DriverPtr interface. What we have now in domain_driver.c breaks both assumptions: the functions are in a different file, and there is no vir*DriverPtr being implemented in the file that uses these functions. This patch changes check-aclrules.py to accomodate this scenario. The helpers that have ACL checks are stored beforehand in aclFuncHelpers, allowing other files to use them to recognize a stub situation. In case the current file being analyzed is domain_driver.c itself, we'll do a manual check using aclFuncHelpers to verify that these functions indeed have ACL checks. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> |
||
---|---|---|
.. | ||
apibuild.py | ||
augeas-gentest.py | ||
check-aclperms.py | ||
check-aclrules.py | ||
check-driverimpls.py | ||
check-drivername.py | ||
check-file-access.py | ||
check-remote-protocol.py | ||
check-symfile.py | ||
check-symsorting.py | ||
cocci-macro-file.h | ||
dtrace2systemtap.py | ||
esx_vi_generator.py | ||
genaclperms.py | ||
genpolkit.py | ||
gensystemtap.py | ||
group-qemu-caps.py | ||
header-ifdef.py | ||
hvsupport.py | ||
hyperv_wmi_generator.py | ||
meson-dist.py | ||
meson-gen-authors.py | ||
meson-gen-def.py | ||
meson-gen-sym.py | ||
meson-install-dirs.py | ||
meson-install-symlink.py | ||
meson-install-web.py | ||
meson-python.sh | ||
meson-timestamp.py | ||
meson.build | ||
mock-noinline.py | ||
prohibit-duplicate-header.py | ||
test-wrap-argv.py |