]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import: mangle untarred OS images after pull-tar, too
authorLennart Poettering <lennart@poettering.net>
Tue, 12 Jan 2021 17:49:11 +0000 (18:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Jan 2021 21:03:38 +0000 (22:03 +0100)
We do this for import-tar and import-fs, we should do it for pull-tar,
too.

Fixes: #17563
src/import/pull-tar.c

index bbbd0f57a0ef8ee9950b07e182bed382b8a3c642..b646d38539e6af17933a0d78628e20ecc22d4e37 100644 (file)
@@ -296,9 +296,8 @@ static void tar_pull_job_on_finished(PullJob *j) {
                 goto finish;
         }
 
-        /* This is invoked if either the download completed
-         * successfully, or the download was skipped because we
-         * already have the etag. */
+        /* This is invoked if either the download completed successfully, or the download was skipped because
+         * we already have the etag. */
 
         if (!tar_pull_is_done(i))
                 return;
@@ -340,6 +339,10 @@ static void tar_pull_job_on_finished(PullJob *j) {
 
                 tar_pull_report_progress(i, TAR_FINALIZING);
 
+                r = import_mangle_os_tree(i->temp_path);
+                if (r < 0)
+                        goto finish;
+
                 r = import_make_read_only(i->temp_path);
                 if (r < 0)
                         goto finish;