diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-07-02 14:51:19 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-08-17 16:47:36 +0200 |
| commit | 8cb871e0c69030599fa8e8410f1ecaee21ddbbd0 (patch) | |
| tree | ce9722ab16701920e1a4a8c4578b202e398e8c34 /nix | |
| parent | 27f40fad8064064d7c9d3ce5a126a331b62716e1 (diff) | |
daemon: Throw ‘AuthenticationError’ on archive authentication error.
* nix/libstore/local-store.hh (AuthenticationError): New error type.
* nix/libstore/local-store.cc (readAuthenticateReply): Throw it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/libstore/local-store.cc | 2 | ||||
| -rw-r--r-- | nix/libstore/local-store.hh | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index 46ce649fb0b..6b5c388efc9 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc | |||
| @@ -1208,7 +1208,7 @@ static std::string readAuthenticateReply(int fd) | |||
| 1208 | if (code == 0) | 1208 | if (code == 0) |
| 1209 | return str; | 1209 | return str; |
| 1210 | else | 1210 | else |
| 1211 | throw Error(str); | 1211 | throw AuthenticationError(str); |
| 1212 | } | 1212 | } |
| 1213 | 1213 | ||
| 1214 | /* Sign HASH with the key stored in file SECRETKEY. Return the signature as a | 1214 | /* Sign HASH with the key stored in file SECRETKEY. Return the signature as a |
diff --git a/nix/libstore/local-store.hh b/nix/libstore/local-store.hh index 6a0def7412e..5dfe68f90a4 100644 --- a/nix/libstore/local-store.hh +++ b/nix/libstore/local-store.hh | |||
| @@ -291,6 +291,7 @@ void canonicalisePathMetaData(const Path & path, uid_t fromUid); | |||
| 291 | void canonicaliseTimestampAndPermissions(const Path & path); | 291 | void canonicaliseTimestampAndPermissions(const Path & path); |
| 292 | 292 | ||
| 293 | MakeError(PathInUse, Error); | 293 | MakeError(PathInUse, Error); |
| 294 | MakeError(AuthenticationError, Error); | ||
| 294 | 295 | ||
| 295 | /* Size below which a file is not considered for deduplication. */ | 296 | /* Size below which a file is not considered for deduplication. */ |
| 296 | /* Any file smaller than this is not considered for deduplication. | 297 | /* Any file smaller than this is not considered for deduplication. |
