Repository navigation
Serve the snapshot share through smbanything_core - #87
Merged
Merged
Conversation
The SMB 2.1 server was extracted into the smbanything project's smbanything_core crate and improved there; wrustic now depends on that crate instead of carrying its own copy of the protocol code. What remains in src/smb/ is the restic side: SnapshotBacking, the filename-quoting decoder, and start_snapshot_share, whose handle now wraps the crate's server handle together with the repository lock. The tun transport comes from the crate's `tun` feature, the vendored Wintun DLL is pinned against the digest the crate will accept, and the protocol docs move to smbanything with the code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SMB 2.1 server was extracted into the smbanything project's
smbanything_corecrate and improved there (review fixes wrustic's copy never got: the srvsvc CLOSE body size, overflow-checked signing extents, a bounded NBSS length, a body-read timeout, IPv6-loopback fallback). wrustic now depends on that crate — pinned by rev, via andrewtheguy/smbanything#9 — instead of carrying its own diverged copy of the protocol code: −11,278 lines.What remains in
src/smb/is the restic side:backing.rs—SnapshotBacking/NestedBackingoverrustic_core,wire_safename.rs— restic's filename quoting, unchangedmod.rs—start_snapshot_share, and aSmbHandlethat wraps the crate's server handle together with the repository lock (field order = drop order: server stops before the lock releases)Other changes:
--smb-tunmaps to the crate'stunfeature;TunAddrsparsing/validation comes from the crate (cli.rskeeps only the flag-name error prefix)smbanything_corewill accept at load time, replacing the deleted in-tree pin testlocal_servercomes from the crate too (with its newer IPv6-fallback behavior)WRUSTIC_SMB_LOGstill works —start_snapshot_shareforwards it to the crate'senable_logdocs/smb.md/docs/smb-tun.mdkeep the wrustic-specific halves and link overOne inherited behavior change: the share is now case-insensitive on lookup (the crate hashes lowercased path components for file ids and no longer advertises
FILE_CASE_SENSITIVE_SEARCH), matching what SMB clients assume.Verified:
cargo clippy --all-features --all-targets -- -D warningsandcargo test --all-featuresclean on Linux, including the live smbclient walk of a nested share.🤖 Generated with Claude Code