Repository navigation
Conversation
|
| rg -q 'while true; do' "$windows_vm_command" || | ||
| fail "Windows VM retries failed RDP credentials" | ||
| rg -q 'RDP login failed\. Enter the Windows credentials again\.' "$windows_vm_command" || | ||
| fail "Windows VM prompts again after an RDP login failure" | ||
| rg -q 'write_credentials "\$WIN_USER" "\$WIN_PASS"' "$windows_vm_command" || | ||
| fail "Windows VM saves re-entered RDP credentials" | ||
| pass "Windows VM retries failed RDP credentials" |
There was a problem hiding this comment.
These checks only search for strings; they never run the retry loop. Changing the success check to ((RDP_STATUS != 0)) && break would still pass all three checks while breaking retries. Add a test with stubbed xfreerdp3 and gum calls that checks failure followed by success, saved credentials, and cancellation reaching cleanup.
|
You fixed it? Thank you so much! |
|
I set my agent on adding this PR. |
|
To success, my VM is fixed, thanks @qualvey |
|
Following the merge of #12323, The setgid hardening portion is covered by the merged fix. Re-entering and saving rejected RDP credentials is separate behavior and remains unmerged. Keeping this PR open for that remainder; remove the superseded chmod change when rebasing. This is a scope disposition, not a claim that the retry implementation is verified or ready. Scope checked by GPT-6 in Codex and Codex Medium against the discussion and landed change; review independence is not guaranteed. No tests were rerun for this cleanup. Omabot on behalf of DHH |
|
Thanks for picking this up! One blocking issue with the retry loop: It re-prompts on any non-zero printf '%s\n' "${RDP_ARGS[@]}" | xfreerdp3 /args-from:stdin
RDP_STATUS=$?
case $RDP_STATUS in
132 | 134 | 154 | 159) ;; # AUTH_FAILURE, LOGON_FAILURE, WRONG_PASSWORD, NO_OR_MISSING_CREDENTIALS
*) break ;;
esacAlso:
|
602fec6 to
fc02f16
Compare
fc02f16 to
004e711
Compare
57d23bf to
88f8726
Compare
f886caa to
a5a4f0d
Compare
a5a4f0d to
cc739b5
Compare
| rg -q 'title:"?Windows VM - Omarchy"' "$windows_vm_command" || | ||
| fail "Windows VM launches FreeRDP with its expected title" | ||
| pass "Windows VM launches FreeRDP with its expected title" | ||
| rg -q 'class = "\^xfreerdp\$", title = "\^Windows VM - Omarchy\$"' "$windows_vm_rules" || |
There was a problem hiding this comment.
|
Thanks, the retry loop now only re-prompts on the auth/logon exit codes, which fixes my blocking point. A few things are still open:
|
|
Thanks, the retry loop now only re-prompts on 132/134/154/159, and the new test counts prompts through a file, so it would catch an ordinary exit that re-prompts. That part looks good. The mount-source changes are still in the PR, though, and they've become a regression since #12323 merged (10-04):
Could you rebase onto current |
|
Reviewed at cc739b5. Classification is unsettled, so nothing was run on a worker yet. I read it as a bug fix: saved credentials that Windows rejects currently leave no way to connect. Codex Medium, classifying from the pull request alone, read it as an enhancement: a new prompt-and-retry flow. Both readings are reasonable, and which one applies decides how it gets verified, so the maintainer settles it. From reading the diff against current
The retry loop itself (re-prompting only on exits 132/134/154/159) and Waiting on the maintainer for the classification and on @qualvey for the rebase. |
Summary
When saved RDP credentials are rejected, prompt for the Windows username and password again, save each newly entered pair atomically, and retry until the user connects successfully or cancels.
The VM remains running between attempts. Cancelling or leaving a field empty follows the existing cleanup path.
Testing
bash test/shell.d/windows-vm-test.shbash test/shell.d/windows-vm-compose-test.shFollow-up to #14088.