]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import: properly fail if tar exited non-zero, not just when it segfaulted or such
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Oct 2018 16:09:18 +0000 (18:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 26 Nov 2018 17:09:01 +0000 (18:09 +0100)
src/import/import-tar.c

index 896effab77e40ca63c862016511591c62f9006d0..0bb086f1429d354d4e14491649812f060ff76e91 100644 (file)
@@ -175,6 +175,8 @@ static int tar_import_finish(TarImport *i) {
                 i->tar_pid = 0;
                 if (r < 0)
                         return r;
+                if (r != EXIT_SUCCESS)
+                        return -EPROTO;
         }
 
         r = import_mangle_os_tree(i->temp_path);