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.
This commit is contained in:
Colin Walters 2015-01-20 23:28:26 -05:00
parent 6d1de23f87
commit 8195fd18e2
1 changed files with 5 additions and 5 deletions

View File

@ -577,8 +577,8 @@ dispatch_close (OstreeRepo *repo,
/* Now get rid of the temporary */ /* Now get rid of the temporary */
(void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0); (void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0);
if (!ostree_repo_write_metadata (repo, state->output_objtype, tmp_checksum, if (!ostree_repo_write_metadata_trusted (repo, state->output_objtype, tmp_checksum,
metadata, NULL, cancellable, error)) metadata, cancellable, error))
goto out; goto out;
} }
else else
@ -602,9 +602,9 @@ dispatch_close (OstreeRepo *repo,
/* Now get rid of the temporary */ /* Now get rid of the temporary */
(void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0); (void) unlinkat (state->repo->tmp_dir_fd, state->output_tmp_path, 0);
if (!ostree_repo_write_content (repo, tmp_checksum, if (!ostree_repo_write_content_trusted (repo, tmp_checksum,
instream, stbuf.st_size, instream, stbuf.st_size,
NULL, cancellable, error)) cancellable, error))
goto out; goto out;
} }