bcc icon indicating copy to clipboard operation
bcc copied to clipboard

clang: fail when the kheaders ownership is wrong (#4928)

Open jeromemarchand opened this issue 1 year ago • 0 comments

file_exists_and_ownedby() returns -1 when the file exists but its ownership is unexpected, which is very misleading since anything non zero is interpreted as true and a function with such a name is expected to return a boolean. So currently all this does, is write a warning message, and continues as if nothing is wrong.

Make file_exists_and_ownedby() returns false when the ownership is wrong and have get_proc_kheaders() fails when this happen. Also have all the exists functions return bool to avoid such issues in the future.

jeromemarchand avatar May 06 '24 16:05 jeromemarchand