perf tools: Check $HOME/.perfconfig ownership
Hi,
The commit 069e3725dd9be3b759a98e8c80ac5fc38b392b23 introduced a check whether $HOME/.perfconfig file is owned by the user. Three comments here:
1) How other user may create a file in other user's home directory? If we assume he may do it, the situation is bad without any perf :(
2) If we assume (1) is somehow possible (e.g. other user may manipulate this file only), there is a race against file creation/deletion and stat.
3) .perfconfig can be a symlink, so stat(2) should be changed to lstat(2).
Thanks,
Signature · 1 line
Vasiliy