feat: NFS export write path — SharePrivilege load/save (#057 Phase C)#9
Merged
Conversation
Adds declarative NFS-export reconciliation, the last/highest-risk SynoSharp write capability: - NfsRuleSpec / NfsExportSpec (+ NfsExports on SynologyDesiredState) - SynoNfsTool: load (read rules), SaveCommand (whole-list replace), and EnableServiceCommand, over `synowebapi SYNO.Core.FileServ.NFS.SharePrivilege`. security_flavor is encoded as the bool-flag OBJECT DSM expects (not an array). - Reconciler NFS planning: load -> diff -> save, dry-run by default, idempotent; Present=false clears the share's rules. - `synosharp exec <argv>` raw passthrough (diagnostics; used to reverse-engineer the API). - 6 unit tests (SaveCommand argv, rule parsing, reconciler create/skip). Reverse-engineered + proven on a DSM 7.x Virtual DSM: create/skip/clear lifecycle yields /etc/exports lines identical to the production NAS. 24/24 tests pass.
ChrisonSimtian
added a commit
to Chrison-Homelab/Homelab
that referenced
this pull request
Jun 20, 2026
Fast-forwards the `vendor/SynoSharp` submodule to main after merging Chrison-dev/SynoSharp#9 (NFS export write path). Makes the repo's `synosharp` NFS-capable — prerequisite for #1 (managing the volume4 export declaratively via `synosharp apply`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Implements the NFS-export write path — the last, highest-risk SynoSharp capability (plan #057 Phase C, ADR-0002).
What
NfsRuleSpec,NfsExportSpec,NfsExportsonSynologyDesiredState.SynoNfsTool:LoadAsync(read rules),SaveCommand(whole-list replace),EnableServiceCommand— viasynowebapi SYNO.Core.FileServ.NFS.SharePrivilegeover SSH.Present=falseclears.synosharp exec <argv>raw passthrough (diagnostics).Key finding
security_flavoris a bool-flag object ({sys, kerberos, kerberos_integrity, kerberos_privacy}), not an array — androot_squash=all_adminis the all-squash-to-admin model (anonuid=1024/anongid=100).Verification
Reverse-engineered + proven on a DSM 7.x Virtual DSM (desktop-01): create → idempotent-skip → reversible-clear, producing
/etc/exportslines identical to the production NAS. No production NAS writes.🤖 Generated with Claude Code