re: perf tools: Check $HOME/.perfconfig ownership

From: Vasiliy Kulikov
Date: Thu Aug 11 2011 - 15:50:51 EST


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,

--
Vasiliy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/