[ostree] deltas: Use trusted writes
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] deltas: Use trusted writes
- Date: Wed, 21 Jan 2015 04:29:33 +0000 (UTC)
commit 8195fd18e2702dce6297b7ccb4b2d798e1699373
Author: Colin Walters <walters verbum org>
Date: Tue Jan 20 23:28:26 2015 -0500
deltas: Use trusted writes
We have a chain of checksums from the root up until here. While doing
checksums of the objects individually would be a good redundancy check
for test cases and the like, when doing a pull there's no good reason
to burn cycles on SHA256.
.../ostree-repo-static-delta-processing.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libostree/ostree-repo-static-delta-processing.c
b/src/libostree/ostree-repo-static-delta-processing.c
index a5ad5fe..adf36e5 100644
--- a/src/libostree/ostree-repo-static-delta-processing.c
+++ b/src/libostree/ostree-repo-static-delta-processing.c
@@ -577,8 +577,8 @@ dispatch_close (OstreeRepo *repo,
/* Now get rid of the temporary */
(void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0);
- if (!ostree_repo_write_metadata (repo, state->output_objtype, tmp_checksum,
- metadata, NULL, cancellable, error))
+ if (!ostree_repo_write_metadata_trusted (repo, state->output_objtype, tmp_checksum,
+ metadata, cancellable, error))
goto out;
}
else
@@ -602,9 +602,9 @@ dispatch_close (OstreeRepo *repo,
/* Now get rid of the temporary */
(void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0);
- if (!ostree_repo_write_content (repo, tmp_checksum,
- instream, stbuf.st_size,
- NULL, cancellable, error))
+ if (!ostree_repo_write_content_trusted (repo, tmp_checksum,
+ instream, stbuf.st_size,
+ cancellable, error))
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]