repart: Exclude APIVFS mountpoint directories

Also exclude APIVFS and temporary files directories from the copy
operation so that these files don't accidentally end up in images.
This commit is contained in:
Daan De Meyer
2023-02-22 12:44:39 +01:00
parent b63bd125d4
commit 4d8ff4e868
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -4065,6 +4065,12 @@ static int make_copy_files_denylist(Context *context, const Partition *p, Hashma
}
}
FOREACH_STRING(s, "proc", "sys", "dev", "tmp", "run", "var/tmp") {
r = add_exclude_path(s, &denylist, DENY_CONTENTS);
if (r < 0)
return r;
}
STRV_FOREACH(e, p->exclude_files) {
r = add_exclude_path(*e, &denylist, endswith(*e, "/") ? DENY_CONTENTS : DENY_INODE);
if (r < 0)