tmon: Check log file for common secuirty issues
authorNeil Horman <nhorman@tuxdriver.com>
Tue, 17 Jun 2014 20:05:08 +0000 (16:05 -0400)
committerZhang Rui <rui.zhang@intel.com>
Tue, 1 Jul 2014 14:00:38 +0000 (22:00 +0800)
commit951fda3d8c644597a1d5cdae14cab31567e754a1
tree7d705c9a9c0208e8b94b4c683377865c182f0af5
parent6b533269fb2513a1281a878e316bb920fc54db31
tmon: Check log file for common secuirty issues

The tmon logging system blindly opens its log file on a static path, making it
very easy for someone to redirect that log information to inappropriate places
or overwrite other users data.  Do some easy checking to make sure we're not
logging to a symlink or a file owned by another user.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
tools/thermal/tmon/tmon.c