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>
This commit is contained in:
Bernat, Yehezkel 2017-08-15 08:19:12 +03:00 committed by Greg Kroah-Hartman
parent 8fdd6ab361
commit 0956e41169
1 changed files with 1 additions and 1 deletions

View File

@ -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)