HomeClusterLabs Projects

Fix: tools: crm_attribute emits garbage for --node localhost or auto

Description

Fix: tools: crm_attribute emits garbage for --node localhost or auto

This happens because pcmk__node_attr_target() returns its argument if
its argument is NULL, "auto", or "localhost" and no relevant environment
variables are found. Then crm_attribute frees the return value, makes a
copy of it, and assigns it back to options.dest_uname.

The fix is to check whether the return value is equal to the argument.

Fixes RHEL-23065

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

Details

Provenance
nrwahl2Authored on Jan 29 2024, 2:14 PM
Parents
rP99c3d285a3de: Merge pull request #3337 from kgaillot/fixes
Branches
Unknown
Tags
Unknown