]> git.ipfire.org Git - thirdparty/libvirt.git/commit
syntax-check: Fix and rename virSecurity rule
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Mar 2021 07:29:42 +0000 (08:29 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Mar 2021 08:37:15 +0000 (09:37 +0100)
commitec5b4ba8f5cdb58b2d78addf54042e5986e194fc
treea1eb8e653f5b0e0f6f764c1edeeb62e9da035eda
parent4fc66ab2627123dfad8986bdd4d9d24d56ec4278
syntax-check: Fix and rename virSecurity rule

The aim of virSecurity rule is to discourage from using plain
virSecurityManager*() APIs within QEMU driver in favor of their
qemuSecurity*() counterparts. The reason is simple: namespaces;
virSecurityManager*() needs additional
virSecurityManagerTransactionCommit() call to enter given
namespace and do its work from there. And that's exactly what
those qemuSecurity*() wrappers do.

To help us ensure correctness (from this POV), we have a
syntax-check rule that forbids any occurrence of
"virSecurityManager" string under src/qemu/ (except for
qemu_security of course).

But with if we want to remove virSecurityManagerPtr type, then we
have to allow "virSecurityManager *". Therefore, change the rule
so that no call of a function with "virSecurityManager" prefix is
allowed. And also change the name to better reflect what is going
on.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
build-aux/syntax-check.mk