Commit 24ed5fd6 authored by Bernat, Yehezkel's avatar Bernat, Yehezkel Committed by Greg Kroah-Hartman

thunderbolt: Make key root-only accessible

commit 0956e411 upstream.

Non-root user may read the key back after root wrote it there.
This removes read access to everyone but root.
Signed-off-by: default avatarYehezkel Bernat <yehezkel.bernat@intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b92e97e6
...@@ -826,7 +826,7 @@ static ssize_t key_store(struct device *dev, struct device_attribute *attr, ...@@ -826,7 +826,7 @@ static ssize_t key_store(struct device *dev, struct device_attribute *attr,
mutex_unlock(&switch_lock); mutex_unlock(&switch_lock);
return ret; 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, static ssize_t nvm_authenticate_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment