Skip to content

Commit

Permalink
deltas: Use trusted writes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cgwalters committed Jan 21, 2015
1 parent 6d1de23 commit 8195fd1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libostree/ostree-repo-static-delta-processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

Expand Down

0 comments on commit 8195fd1

Please sign in to comment.