Skip to content

Detect added/removed files in root scan

Kyle Rankin requested to merge root_check_new_files into release-19

Forum member Caliga made a feature request to detect not only hash changes, but also any time a file was added or removed, and provided a short snippet example to accomplish it.

I used that snippet as a starting point to implement this new feature. I also detected and fixed an edge case in kexec-select-boot where re-signing files would result in /tmp/kexec/ being wiped out, which triggered an error in kexec-select-boot as /tmp/kexec/kexec_menu_list.txt was missing.

With this feature, you will see both additions and removals. Additions will be prefaced by + and deletions by - in the resulting file list. I also implemented this scan before the hash check, so that it didn't disrupt the re-signing workflow already in place. It makes sense to scan, inform the user, but wait for re-signing until you also scan hashes.

Merge request reports