summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Pearson <mpearson-lenovo@squebb.ca>2024-10-24 15:55:22 -0400
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-10-29 13:54:31 +0200
commitc7842e69e4508bef0920030340093f128722964e (patch)
treecd6a5f022a815a55bbeea0c1b6ffd7753b26a6e1 /drivers
parentb39e8ece931a4b4f64cdf9e75fffd6e82828e471 (diff)
platform/x86: think-lmi: Add certificate as mechanism
As both password or certificate authentication are available as mechanisms update the documentation to add certificate as an option Update driver to return correct mechanism appropriately. Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20241024195536.6992-2-mpearson-lenovo@squebb.ca Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/think-lmi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c
index 727a9400d406..46ab82fb2898 100644
--- a/drivers/platform/x86/think-lmi.c
+++ b/drivers/platform/x86/think-lmi.c
@@ -524,6 +524,10 @@ static struct kobj_attribute auth_max_pass_length = __ATTR_RO(max_password_lengt
static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
+ struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
+
+ if (setting->cert_installed)
+ return sysfs_emit(buf, "certificate\n");
return sysfs_emit(buf, "password\n");
}
static struct kobj_attribute auth_mechanism = __ATTR_RO(mechanism);