fix(backup_operator): add random suffix to dump filenames#1124
Merged
NeffIsBack merged 3 commits intoPennyw0rth:mainfrom Mar 11, 2026
Merged
fix(backup_operator): add random suffix to dump filenames#1124NeffIsBack merged 3 commits intoPennyw0rth:mainfrom
NeffIsBack merged 3 commits intoPennyw0rth:mainfrom
Conversation
…ROR_ALREADY_EXISTS
Member
|
Thanks for the bug fix PR! Maybe we should opt for just completely randomising the name, similar to other places that need files as output. I'll look into it soon. |
Member
|
@Marshall-Hallenbeck the PR template script crashed with an unhandled error btw. Looks like it can't access something...? |
Collaborator
Hmm wtf. I'll take a deeper look... |
Collaborator
|
@NeffIsBack ah, to post a comment it needs the write privilege for PRs, which makes sense. I had Copilot do something useful for once and it told me this and I had it create the PR: #1126 |
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.


Summary
The backup_operator module uses static filenames (
SAM,SYSTEM,SECURITY) when saving registry hives to SYSVOL. If the cleanup step fails to delete these files, running the module again is impossible becausehBaseRegSaveKeyrefuses to overwrite existing files:Fix
Each run now generates an 8-character random suffix appended to the dump filenames (e.g.
SAM_a1b2c3d4,SYSTEM_a1b2c3d4,SECURITY_a1b2c3d4). This avoids collisions with leftover files from previous runs. The suffix is consistently used across saving, downloading, and cleanup.Test plan
ERROR_ALREADY_EXISTS