Put and Read: content on the socket, for clients that share no files

The system daemon runs as its own user behind ProtectHome, so it can
neither read a file a desktop app wrote for Add nor write one back for
Materialize - redoal on the system varde failed every get with EACCES.
Put imports base64 bytes carried in the request and Read returns a raw
blob's bytes in the reply, both up to MAX_INLINE_BYTES (16 MiB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-10-03 13:08:50 +02:00
co-authored by Claude Opus 5.5
parent c9dbc4a576
commit 687af8bd2a
6 changed files with 129 additions and 0 deletions
+1
View File
@@ -246,6 +246,7 @@ fn print_human(data: Option<&ResponseData>) {
match data {
ResponseData::Added { hash, bytes } => println!("added {hash} ({bytes} bytes)"),
ResponseData::Pinned { hash } => println!("pinned {hash}"),
ResponseData::Bytes { data } => println!("{data}"),
ResponseData::Done {} => println!("ok"),
ResponseData::Materialized { bytes, reflinked } => {
let how = if *reflinked { "reflinked" } else { "copied" };