booth icon indicating copy to clipboard operation
booth copied to clipboard

Enahnce pacemaker.c

Open jfriesse opened this issue 2 years ago • 2 comments

pacemaker.c is full of popen/system calls. This are not very safe (escape of arguments, need to run shell, ...) and it would be better to use exec and proper redirection (so stderr are split and could be logged). Another possibility might be to use some library instead of calling crm_ticket (if such library exists).

jfriesse avatar Feb 05 '24 14:02 jfriesse

We have a long-standing project in pacemaker to move functionality from command line tools into libraries. Then the tools just wrap the library calls. I could start working on converting crm_ticket next if it would help here.

clumens avatar Feb 05 '24 20:02 clumens

Perfect. I think it would be much safer and reliable to call function(s) instead of system/popen.

jfriesse avatar Feb 06 '24 11:02 jfriesse