From c63ee3cef4fc77f995999035bcc57833653a94b0 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 16 Jan 2019 08:36:55 -0500
Subject: [PATCH 2/2] =?UTF-8?q?lib/commit:=20Set=20xattr=20on=20correct=20?=
 =?UTF-8?q?fd=20for=20bare-user=20=E2=86=92=20bare-user=20imports?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Another fix to https://github.com/ostreedev/ostree/pull/1771

Closes: #1803
Approved by: jlebon
---
 src/libostree/ostree-repo-commit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index c95e0b61..dfdd4853 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -4287,7 +4287,7 @@ import_one_object_direct (OstreeRepo    *dest_repo,
               if (bytes == NULL)
                 return FALSE;

-              if (TEMP_FAILURE_RETRY (fsetxattr (src_fd, "user.ostreemeta",
+              if (TEMP_FAILURE_RETRY (fsetxattr (tmp_dest.fd, "user.ostreemeta",
                                                  (char*)g_bytes_get_data (bytes, NULL),
                                                  g_bytes_get_size (bytes), 0)) != 0)
                 return glnx_throw_errno_prefix (error, "fsetxattr");
--
2.20.1
