mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
platform/x86: hp-bioscfg: fix new_password_store() overwriting current_password
current_password_store() and new_password_store() both call
store_password_instance() with is_current = true:
static ssize_t new_password_store(...)
{
return store_password_instance(kobj, buf, count, true);
}
so a write to new_password is routed to current_password instead, and
the new_password field is never written by either sysfs entry point.
Fix by passing false from new_password_store(), matching what the
is_current parameter is meant to select.
Fixes: 8646a3b5ee ("platform/x86: hp-bioscfg: passwdobj-attributes")
Cc: stable@vger.kernel.org
Signed-off-by: Muhammad Bilal <meatuni001@gmail.com>
Link: https://patch.msgid.link/20260812111829.172273-8-meatuni001@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
e213939ed9
commit
2ea12a467a
|
|
@ -123,7 +123,7 @@ static ssize_t new_password_store(struct kobject *kobj,
|
|||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
return store_password_instance(kobj, buf, count, true);
|
||||
return store_password_instance(kobj, buf, count, false);
|
||||
}
|
||||
|
||||
static struct kobj_attribute password_new_password = __ATTR_WO(new_password);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user