Skip to content

Commit d0a1865

Browse files
nicholasbishopardbiesheuvel
authored andcommitted
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 <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent d86ff33 commit d0a1865

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/firmware/efi/esrt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ static ssize_t esre_attr_show(struct kobject *kobj,
9595
struct esre_entry *entry = to_entry(kobj);
9696
struct esre_attribute *attr = to_attr(_attr);
9797

98-
/* Don't tell normal users what firmware versions we've got... */
99-
if (!capable(CAP_SYS_ADMIN))
100-
return -EACCES;
101-
10298
return attr->show(entry, buf);
10399
}
104100

0 commit comments

Comments
 (0)