libarchive: Fix assertion error if used with CANONICAL_PERMISSIONS
authorColin Walters <walters@verbum.org>
Thu, 28 Sep 2017 19:41:02 +0000 (15:41 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 28 Sep 2017 19:59:24 +0000 (19:59 +0000)
commita7f04a14b584b04389576d3f10fad79b40f466d8
tree0d59f0fd4ecdd4128a1a315e29e6eb512f6b9353
parent6c7302fcdd1d5292e0d2ba815ea7eb02b3d1e871
libarchive: Fix assertion error if used with CANONICAL_PERMISSIONS

I was trying to do a change for rpm-ostree to use
`OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS`
for container builds with `bare-user-only,` but hit an assertion here
ultimtely because we weren't setting `standard::type`.

Rather than hand-rolling `GFileInfo` creation, use the stat buffer conversion
code which is more robust and used in multiple places already.

Closes: #1227
Approved by: jlebon
src/libostree/ostree-repo-libarchive.c