HomeClusterLabs Projects

Fix: tools: prevent possible crm_resource segfaults if multiple commands are…

Description

Fix: tools: prevent possible crm_resource segfaults if multiple commands are specified

The argument callbacks assume they have the originally initialized
options and update the values accordingly.

While we still accept multiple commands for backward compatibility, the
relevant options should be reset whenever an existing command is
overridden. Otherwise the options would result into havoc and possibly
cause segfaults of problematically composed commands such as
crm_resource -l -a.

Details

Provenance
gao-yanAuthored on Apr 14 2022, 6:23 AM
Parents
rPc572d9f270b6: Refactor: tools: set commands in crm_resource before changing any options
Branches
Unknown
Tags
Unknown