Commit Graph

8 Commits

Author SHA1 Message Date
Félix Baylac Jacqué a3e4418ebd IsValidPath: implement request parser. 2023-09-15 14:18:27 +02:00
Félix Baylac Jacqué 05585f85fc read string: fix out of bound bug
When the bytestring we were about to copy was at the end of the TVB,
we were outrunning the original buffer by trying to read "size + 1".

Stopping the read at size, then expending the newly created bytestring
instead.
2023-09-15 14:16:44 +02:00
Félix Baylac Jacqué 2f0b6c24d8 Implement setoptions operation 2023-09-15 11:19:29 +02:00
Félix Baylac Jacqué 5b3c9427a8 AddToStore: implement payload/response
The AddToStore operation is performed in 3 packets:

1. AddToStore request metadata.
2. AddToStore payload.
3. Response from the daemon.

This means we need to keep some sort of processing state for the
operation.
2023-09-15 10:25:25 +02:00
Félix Baylac Jacqué 980fa64065 AddToStore: parse references and repair flag 2023-09-14 17:19:12 +02:00
Félix Baylac Jacqué f98483e7ba read_string: Fix 8-aligned parsing
We were facing a bug when reading a 8-aligned Nix daemon string: we
were missing the null termination byte.

Adding this null byte when needed.
2023-09-14 14:01:47 +02:00
Félix Baylac Jacqué 81eb1ed63e Add basic Nix daemon string support
Parsing the store add request. Add Nix daemon string parsing
machinery.
2023-09-14 12:15:00 +02:00
Félix Baylac Jacqué 972dfdd54f Init: hello + op
Initial Lua dissector. So far it can parse the hello handshake and the
store operation.
2023-09-13 19:40:00 +02:00