summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/esrt.c
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@google.com>2023-05-12 19:43:02 +0000
committerArd Biesheuvel <ardb@kernel.org>2023-06-06 15:33:59 +0200
commitd0a1865cf7e2211d9227592ef4141f4632e33908 (patch)
treee2e6846a539db7f47aac98612d6cff1fd18ced9d /drivers/firmware/efi/esrt.c
parentd86ff3333cb1d5f42d8898fb5fdb304e143c0237 (diff)
efi/esrt: Allow ESRT access without CAP_SYS_ADMIN
Access to the files in /sys/firmware/efi/esrt has been restricted to CAP_SYS_ADMIN since support for ESRT was added, but this seems overly restrictive given that the files are read-only and just provide information about UEFI firmware updates. Remove the CAP_SYS_ADMIN restriction so that a non-root process can read the files, provided a suitably-privileged process changes the file ownership first. The files are still read-only and still owned by root by default. Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/esrt.c')
-rw-r--r--drivers/firmware/efi/esrt.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
index c61398634d75..7a81c0ce4780 100644
--- a/drivers/firmware/efi/esrt.c
+++ b/drivers/firmware/efi/esrt.c
@@ -95,10 +95,6 @@ static ssize_t esre_attr_show(struct kobject *kobj,
struct esre_entry *entry = to_entry(kobj);
struct esre_attribute *attr = to_attr(_attr);
- /* Don't tell normal users what firmware versions we've got... */
- if (!capable(CAP_SYS_ADMIN))
- return -EACCES;
-
return attr->show(entry, buf);
}