]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/thunderbolt/switch.c
thunderbolt: Allow clearing the key
authorBernat, Yehezkel <yehezkel.bernat@intel.com>
Tue, 15 Aug 2017 05:19:20 +0000 (08:19 +0300)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 15 Sep 2017 16:10:53 +0000 (09:10 -0700)
commit3b3df09d66618fcb9a31f8b44c2792e53e1adadb
tree6fc5ab981e5337242df87ead0d4f68577f117d9e
parent1630f675fb08d0db7687fcc85b43e7c3421586c1
thunderbolt: Allow clearing the key

BugLink: http://bugs.launchpad.net/bugs/1717430
If secure authentication of a devices fails, either because the device
already has another key uploaded, or there is some other error sending
challenge to the device, and the user only wants to approve the device
just once (without a new key being uploaded to the device) the current
implementation does not allow this because the key cannot be cleared
once set even if we allow it to be changed.

Make this scenario possible and allow clearing the key by writing
empty string to the key sysfs file.

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>
(cherry picked from commit e545f0d8a54a9594fe604d67d80ca6fddf72ca59)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Documentation/ABI/testing/sysfs-bus-thunderbolt
drivers/thunderbolt/switch.c