summaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
authorReepca Russelstein <reepca@russelstein.xyz>2026-06-21 07:19:56 -0500
committerLudovic Courtès <ludo@gnu.org>2026-06-24 15:20:16 +0200
commit69b37a8e5d166328fa3d9a7c61b7ca1dfa772552 (patch)
tree933a8cbf82af5ecb1e58650c23d957567f90ad47 /tests/store.scm
parent694785dc13840f36e9dda2fd413f0d6ac176f153 (diff)
daemon: libstore: add assertStorePathStrict and helpers.
isStorePath is a lightweight check that only verifies that the given path is in the store and doesn't have any '/' characters after the store prefix. This is insufficiently strict for verifying that a given path is actually a valid store path. isStoreName is extracted from checkStoreName, and to preserve the error messages may have a second argument giving a string to write to with the problem description in the case that isStoreName returns false. * nix/libstore/store-api.hh (assertStorePathStrict, isStoreName, isStoreBasenameStrict, isStorePathStrict): new functions. * nix/libstore/worker-protocol.hh (readStorePathStrict): new function. (readStorePathsStrict): new template. * nix/libstore/store-api.cc (assertStorePathStrict, isStoreName, isStoreBasenameStrict, isStorePathStrict, readStorePathStrict, readStorePathsStrict): provide implementations. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/store.scm')
0 files changed, 0 insertions, 0 deletions