From: Antonio Alvarez Feijoo Date: Wed, 26 Feb 2025 10:14:17 +0000 (+0100) Subject: import/pull-tar: fix flag set X-Git-Tag: v257.4~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d3621d38ee85bce79931612d6b63d6539274ea8;p=thirdparty%2Fsystemd.git import/pull-tar: fix flag set 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) --- diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index 7fc71fe6f35..0336adeb5df 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -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);