diff options
author | Bernat, Yehezkel <yehezkel.bernat@intel.com> | 2017-08-15 08:19:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 16:21:32 +0200 |
commit | 0956e41169222822d3557871fcd1d32e4fa7e934 (patch) | |
tree | f9dd165b53f8d497b1051b28966847085a175deb /drivers/thunderbolt | |
parent | 8fdd6ab36197ad891233572c57781b1f537da0ac (diff) | |
download | linux-0956e41169222822d3557871fcd1d32e4fa7e934.tar.gz linux-0956e41169222822d3557871fcd1d32e4fa7e934.tar.bz2 linux-0956e41169222822d3557871fcd1d32e4fa7e934.zip |
thunderbolt: Make key root-only accessible
Non-root user may read the key back after root wrote it there.
This removes read access to everyone but root.
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r-- | drivers/thunderbolt/switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 69fde0b30eda..8510abcee5d2 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -826,7 +826,7 @@ static ssize_t key_store(struct device *dev, struct device_attribute *attr, mutex_unlock(&switch_lock); return ret; } -static DEVICE_ATTR_RW(key); +static DEVICE_ATTR(key, 0600, key_show, key_store); static ssize_t nvm_authenticate_show(struct device *dev, struct device_attribute *attr, char *buf) |