diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-05-09 18:07:21 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-04 14:34:44 +0200 |
commit | ed25b0f77690abe1f04e4cdcb284b7e17208d169 (patch) | |
tree | cbbd2988aad894a3444b1bae047577dad24b0ecc /src/buildtool/execution_api/utils | |
parent | 811e9be4cc9604dba3d768639444c0d9f849a3c7 (diff) | |
download | justbuild-ed25b0f77690abe1f04e4cdcb284b7e17208d169.tar.gz |
RepositoryConfig: Ensure consistency in reading blobs and trees
...with respect to rejecting invalid entries such as upwards
symlinks. Also ensure that valid trees are only checked once by
remebering known valid tress though marker files in local storage.
Diffstat (limited to 'src/buildtool/execution_api/utils')
-rw-r--r-- | src/buildtool/execution_api/utils/rehash_utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/execution_api/utils/rehash_utils.cpp b/src/buildtool/execution_api/utils/rehash_utils.cpp index 9e64a546..66d3a57f 100644 --- a/src/buildtool/execution_api/utils/rehash_utils.cpp +++ b/src/buildtool/execution_api/utils/rehash_utils.cpp @@ -285,10 +285,10 @@ auto RehashGitDigest(std::vector<Artifact::ObjectInfo> const& digests, StorageConfig const& target_config, RepositoryConfig const& repo_config) -> expected<std::vector<Artifact::ObjectInfo>, std::string> { - auto read = [&repo_config]( - ArtifactDigest const& digest, - ObjectType /*type*/) -> std::optional<std::string> { - return repo_config.ReadBlobFromGitCAS(digest.hash()); + auto read = [&repo_config](ArtifactDigest const& digest, + ObjectType type) -> std::optional<std::string> { + return repo_config.ReadBlobFromGitCAS( + digest.hash(), /*is_symlink=*/IsSymlinkObject(type)); }; return RehashDigestImpl(digests, source_config, |