efi: vars: allow passing fmode= and dmode= when mounting
Subsystems (2)
PATCH 1/1 efi: vars: allow passing fmode= and dmode= when mounting
The default wide-open permissions of efivarfs make the prospect of storing secrets there a bit sketchy. Currently systemd does this, and then pid 1 takes care of chmodding particular nodes. But this is limited and error-prone. Rather, allow passing an explicit dmode for directories and fmode for files.
Cc Ard Biesheuvel <[email protected]>
Cc Jeremy Kerr <[email protected]>
Cc Matthew Garrett <[email protected]>
Suggested-by Lennart Poettering <[email protected]>
Signed-off-by Jason A. Donenfeld <[email protected]>
--- fs/efivarfs/internal.h | 5 ++++ fs/efivarfs/super.c | 60 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 5 deletions(-)
fs/efivarfs/internal.h +5 -0
@@ -24,6 +24,11 @@ struct efivar_entry {struct kobject kobj; }; +struct efivarfs_sb_info { +umode_t dmode; +umode_t fmode; +}; +int efivar_init (int (*func)(efi_char16_t *,efi_guid_t ,unsigned long ,void *),void *data,bool duplicates,struct list_head *head);
fs/efivarfs/super.c +55 -5
109 lines not on this page · raw message
Signature · 1 line
2.38.1