]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import/pull-tar: fix flag set
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 26 Feb 2025 10:14:17 +0000 (11:14 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 4 Mar 2025 14:45:13 +0000 (15:45 +0100)
There is a typo passing flags to `install_file()`, if `IMPORT_READ_ONLY` is set,
`IMPORT_SYNC` is never checked.

(cherry picked from commit 5d2d0c055b1ec68d4fc5d4ec85390fc427171ff3)

src/import/pull-tar.c

index 7fc71fe6f35c78a7ed783753a8866472f04f2464..0336adeb5dfd9704eaa116ff39b0ffaf30f07da2 100644 (file)
@@ -423,7 +423,7 @@ static void tar_pull_job_on_finished(PullJob *j) {
                 r = install_file(
                                 AT_FDCWD, i->local,
                                 AT_FDCWD, NULL,
-                                (i->flags & IMPORT_READ_ONLY) ? INSTALL_READ_ONLY : 0 |
+                                (i->flags & IMPORT_READ_ONLY ? INSTALL_READ_ONLY : 0) |
                                 (i->flags & IMPORT_SYNC ? INSTALL_SYNCFS : 0));
                 if (r < 0) {
                         log_error_errno(r, "Failed to finalize '%s': %m", i->local);