Skip to content

Force SMB provisioning at share start - #179

Merged
bbangert merged 2 commits into
mainfrom
fix/always-provision-share
Aug 21, 2026
Merged

Force SMB provisioning at share start#179
bbangert merged 2 commits into
mainfrom
fix/always-provision-share

Conversation

@bbangert

Copy link
Copy Markdown
Owner

HW failure #3 from P8 validation: a hard reboot cycle tore passdb.tdb, but the stored provisioned_hash survived and matched the current password, so Storage.Server skipped reprovisioning and auth stayed broken (NT_STATUS_LOGON_FAILURE) until a manual password rotation forced a reprovision. Storage.Server now passes force: true to Smbd.provision_user/2 on every share start, bypassing the hash-skip while still recording the hash afterward as a rotation marker.

smbpasswd -a on an already-correct account is idempotent and sub-second, so forcing it every start is cheap; the default (non-forced) skip behavior is unchanged for any other caller.

🤖 Generated with Claude Code

A hard reboot can tear passdb.tdb; the provisioned-hash skip then
pinned the broken state — auth failed with the correct stored password
until a manual rotation. smbpasswd -a is idempotent and sub-second, so
the server now forces provisioning at each share start and keeps the
hash only as a rotation marker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Forces SMB account reprovisioning whenever a share starts, recovering from stale hashes after passdb.tdb corruption.

Changes:

  • Adds a force: true provisioning option.
  • Forces provisioning from Storage.Server.
  • Adds regression coverage for forced provisioning.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/universal_proxy/storage/smbd.ex Implements and documents forced provisioning.
lib/universal_proxy/storage/server.ex Forces provisioning at share startup.
test/universal_proxy/storage/smbd_test.exs Tests forced smbpasswd execution.
test/universal_proxy/storage/server_test.exs Tests startup with an existing matching hash.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/universal_proxy/storage/smbd_test.exs Outdated
The pre-seeded stub value made the record-hash assertion tautological;
the seam now messages the test pid so the assertion fails if the
forced path skips record_hash/2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@bbangert
bbangert merged commit 0eccb95 into main Aug 21, 2026
7 checks passed
@bbangert
bbangert deleted the fix/always-provision-share branch August 21, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants