]> git.baikalelectronics.ru Git - kernel.git/commit
thunderbolt: Allow clearing the key
authorBernat, Yehezkel <yehezkel.bernat@intel.com>
Tue, 15 Aug 2017 05:19:20 +0000 (08:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:21:32 +0000 (16:21 +0200)
commitc770d0fa5671f6fd4dbdc7161aaf092e45f55588
treefdb0440cc8fdf2788924a807d2fc5ab444a320c1
parentd4cef8151e12607ee46b1f8e9d67c7e50fe6a56b
thunderbolt: Allow clearing the key

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>
Documentation/ABI/testing/sysfs-bus-thunderbolt
drivers/thunderbolt/switch.c