HomeClusterLabs Projects

Refactor: libcib: Drop update_cib_object()

Description

Refactor: libcib: Drop update_cib_object()

Now that we've cleaned it up, we can see that it's just a "copy XML"
function. The only meaningful difference between this and
pcmk__xml_copy() is that this checks ACLs after copying a set of
attributes and returns an error upon ACL denial. That error appears in
the failed result XML from cib_process_create().

However, pcmk__xml_copy() still handles change tracking for ACL
purposes. If there's an ACL denial, it will be caught later by
cib_perform_op(), and the update will be discarded.

Catching a denial later is a solid tradeoff for the reduction in
complexity IMO.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Apr 5 2024, 3:52 AM
Parents
rPe694103dbe6f: Refactor: libcrmcommon: Make pcmk__xe_remove_attr() usable with foreach
Branches
Unknown
Tags
Unknown