Closed hevrard closed 1 year ago
Hi
Hmm, yeah a bit annoying issue - not really sure it's even worth fixing - the code there is really there only for debugging purposes and has no real use for a standard usage of lvm2 commands.
But will think if there aren't some easier ways how to get the info for test suite purpose.
Just use getpid() and time() or gettimeofday(), and drop /proc/self/stat.
So although the code affects purely debugging mode of lvm2 execution I've pushed modified version if this code upstream. Hopefully this will quiet your security warning system.
Brilliant, thanks!
The code in init_log_file relies on the process name (COMM) to not contain whitespaces. This change fixes it by looking up the right-most parenthesis to safely jump past COMM.
For more context see: https://www.openwall.com/lists/oss-security/2022/12/21/6