Skip to content

Commit

Permalink
thunderbolt: Make key root-only accessible
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bernat, Yehezkel authored and Greg Kroah-Hartman committed Aug 28, 2017
1 parent 8fdd6ab commit 0956e41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thunderbolt/switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0956e41

Please sign in to comment.