Only verify OSTREE_MAX_METADATA_SIZE for HTTP fetches
authorColin Walters <walters@verbum.org>
Mon, 1 Oct 2018 00:10:14 +0000 (20:10 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 1 Oct 2018 13:23:50 +0000 (13:23 +0000)
commit2c55bc699778a69c77d66b4448a9dfa284764057
treedcdbc01b7e1797888a2a46beaab04e1f8dbc8abe
parent5cada0f051403255059e6eeeb27665f87311a4e5
Only verify OSTREE_MAX_METADATA_SIZE for HTTP fetches

There are use cases for libostree as a local content store
for content derived or delivered via other mechanisms (e.g. OCI
images, RPMs, etc.).  rpm-ostree today imports RPMs into OSTree
branches, and puts the RPM header value as commit metadata.
Some of these can be quite large because the header includes
permissions for each file.  Similarly, some OCI metadata is large.

Since there's no security issues with this, support committing
such content.

We still by default limit the size of metadata fetches, although
for good measure we make this configurable too via a new
`max-metadata-size` value.

Closes: https://github.com/ostreedev/ostree/issues/1721
Closes: #1744
Approved by: jlebon
src/libostree/ostree-core.h
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-pull.c
tests/test-basic-c.c