Skip to content

Unable to list files if a directory that should contain an enrolled file is missing #501

Description

@hobbitalastair

Steps to reproduce on Arch Linux:

  • Install fwupd.
  • Sign the fwupdx64.efi file as documented here: sbctl sign -s -o /usr/lib/fwupd/efi/fwupdx64.efi.signed /usr/lib/fwupd/efi/fwupdx64.efi.
  • Uninstall fwupd.
  • Manually delete /usr/lib/fwupd/ to remove the .signed file (maybe user error?).

Now sbctl list-files fails:

...
populating ruleset for "/usr/lib/fwupd/efi" with access {execute,write_file,read_file,read_dir,remove_dir,remove_file,make_char,make_dir,make_reg,make_sock,make_fifo,make_block,make_sym,truncate}: open: no such file or directory

--disable-landlock let me run sbctl list-files to find the exact path so I could remove it using sbctl remove-file /usr/lib/fwupd/efi/fwupdx64.efi.

I assume this can happen in other situations as well. It would be nice if the error handling allowed me to list enrolled files even if some of them are missing from the system?

This was caused by me trying to fix an error that appeared every time I updated the system because fwupdx64.efi was missing. Maybe consider suggesting using remove-file so that those of us who have forgotten that sbctl have a database? Or perhaps the pacman hook should automatically remove files when they are uninstalled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions