Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "always give 'interaction is required' once if a conversation error occurred" #938

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

bjorn3
Copy link
Collaborator

@bjorn3 bjorn3 commented Dec 19, 2024

This reverts commit fd3cfec.

Turns out that this commit causes a fair amount of test failures on FreeBSD. Together with #937 this PR fixes all test failures on Freebsd.

failures:

---- sudo::flag_list::credential_caching::flag_reset_timestamp stdout ----
thread 'sudo::flag_list::credential_caching::flag_reset_timestamp' panicked at sudo-compliance-tests/src/sudo/flag_list/credential_caching.rs:96:5:
"sudo-rs: interactive authentication is required" did not contain "sudo: Authentication failed"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- sudo::pass_auth::tty::no_tty stdout ----
thread 'sudo::pass_auth::tty::no_tty' panicked at sudo-compliance-tests/src/sudo/pass_auth/tty.rs:64:5:
"sudo-rs: interactive authentication is required" did not contain "Maximum 3 incorrect authentication attempts"

---- sudo::sudoers::timestamp_timeout::zero_always_prompts_for_password stdout ----
thread 'sudo::sudoers::timestamp_timeout::zero_always_prompts_for_password' panicked at sudo-compliance-tests/src/sudo/sudoers/timestamp_timeout.rs:84:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::sudoers::timestamp_timeout::nonzero stdout ----
thread 'sudo::sudoers::timestamp_timeout::nonzero' panicked at sudo-compliance-tests/src/sudo/sudoers/timestamp_timeout.rs:54:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::by_default_credential_caching_is_local stdout ----
thread 'sudo::timestamp::by_default_credential_caching_is_local' panicked at sudo-compliance-tests/src/sudo/timestamp.rs:51:5:
"sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::remove::also_works_locally stdout ----
thread 'sudo::timestamp::remove::also_works_locally' panicked at sudo-compliance-tests/src/sudo/timestamp/remove.rs:92:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "Authentication failed"

---- sudo::timestamp::reset::it_works stdout ----
thread 'sudo::timestamp::reset::it_works' panicked at sudo-compliance-tests/src/sudo/timestamp/reset.rs:30:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::reset::with_command_prompts_for_password stdout ----
thread 'sudo::timestamp::reset::with_command_prompts_for_password' panicked at sudo-compliance-tests/src/sudo/timestamp/reset.rs:81:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::reset::with_command_does_not_cache_credentials stdout ----
thread 'sudo::timestamp::reset::with_command_does_not_cache_credentials' panicked at sudo-compliance-tests/src/sudo/timestamp/reset.rs:156:5:
"sudo-rs: interactive authentication is required" did not contain "Authentication failed"

---- sudo::timestamp::validate::prompts_for_password stdout ----
thread 'sudo::timestamp::validate::prompts_for_password' panicked at sudo-compliance-tests/src/sudo/timestamp/validate.rs:46:5:
"sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

failures:
    sudo::flag_list::credential_caching::flag_reset_timestamp
    sudo::pass_auth::tty::no_tty
    sudo::sudoers::timestamp_timeout::nonzero
    sudo::sudoers::timestamp_timeout::zero_always_prompts_for_password
    sudo::timestamp::by_default_credential_caching_is_local
    sudo::timestamp::remove::also_works_locally
    sudo::timestamp::reset::it_works
    sudo::timestamp::reset::with_command_does_not_cache_credentials
    sudo::timestamp::reset::with_command_prompts_for_password
    sudo::timestamp::validate::prompts_for_password

test result: FAILED. 620 passed; 10 failed; 81 ignored; 0 measured; 0 filtered out; finished in 794.44s

…error occurred"

This reverts commit fd3cfec.

Turns out that this commit causes a fair amount of test failures on FreeBSD:

```
failures:

---- sudo::flag_list::credential_caching::flag_reset_timestamp stdout ----
thread 'sudo::flag_list::credential_caching::flag_reset_timestamp' panicked at sudo-compliance-tests/src/sudo/flag_list/credential_caching.rs:96:5:
"sudo-rs: interactive authentication is required" did not contain "sudo: Authentication failed"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- sudo::pass_auth::tty::no_tty stdout ----
thread 'sudo::pass_auth::tty::no_tty' panicked at sudo-compliance-tests/src/sudo/pass_auth/tty.rs:64:5:
"sudo-rs: interactive authentication is required" did not contain "Maximum 3 incorrect authentication attempts"

---- sudo::sudoers::timestamp_timeout::zero_always_prompts_for_password stdout ----
thread 'sudo::sudoers::timestamp_timeout::zero_always_prompts_for_password' panicked at sudo-compliance-tests/src/sudo/sudoers/timestamp_timeout.rs:84:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::sudoers::timestamp_timeout::nonzero stdout ----
thread 'sudo::sudoers::timestamp_timeout::nonzero' panicked at sudo-compliance-tests/src/sudo/sudoers/timestamp_timeout.rs:54:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::by_default_credential_caching_is_local stdout ----
thread 'sudo::timestamp::by_default_credential_caching_is_local' panicked at sudo-compliance-tests/src/sudo/timestamp.rs:51:5:
"sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::remove::also_works_locally stdout ----
thread 'sudo::timestamp::remove::also_works_locally' panicked at sudo-compliance-tests/src/sudo/timestamp/remove.rs:92:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "Authentication failed"

---- sudo::timestamp::reset::it_works stdout ----
thread 'sudo::timestamp::reset::it_works' panicked at sudo-compliance-tests/src/sudo/timestamp/reset.rs:30:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::reset::with_command_prompts_for_password stdout ----
thread 'sudo::timestamp::reset::with_command_prompts_for_password' panicked at sudo-compliance-tests/src/sudo/timestamp/reset.rs:81:5:
"[sudo: authenticate] Password:sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

---- sudo::timestamp::reset::with_command_does_not_cache_credentials stdout ----
thread 'sudo::timestamp::reset::with_command_does_not_cache_credentials' panicked at sudo-compliance-tests/src/sudo/timestamp/reset.rs:156:5:
"sudo-rs: interactive authentication is required" did not contain "Authentication failed"

---- sudo::timestamp::validate::prompts_for_password stdout ----
thread 'sudo::timestamp::validate::prompts_for_password' panicked at sudo-compliance-tests/src/sudo/timestamp/validate.rs:46:5:
"sudo-rs: interactive authentication is required" did not contain "incorrect authentication attempt"

failures:
    sudo::flag_list::credential_caching::flag_reset_timestamp
    sudo::pass_auth::tty::no_tty
    sudo::sudoers::timestamp_timeout::nonzero
    sudo::sudoers::timestamp_timeout::zero_always_prompts_for_password
    sudo::timestamp::by_default_credential_caching_is_local
    sudo::timestamp::remove::also_works_locally
    sudo::timestamp::reset::it_works
    sudo::timestamp::reset::with_command_does_not_cache_credentials
    sudo::timestamp::reset::with_command_prompts_for_password
    sudo::timestamp::validate::prompts_for_password

test result: FAILED. 620 passed; 10 failed; 81 ignored; 0 measured; 0 filtered out; finished in 794.44s
```
@bjorn3 bjorn3 added the freebsd label Dec 19, 2024
@bjorn3 bjorn3 requested a review from squell December 19, 2024 15:35
@bjorn3 bjorn3 marked this pull request as ready for review December 19, 2024 15:35
Copy link
Member

@squell squell left a comment

Choose a reason for hiding this comment

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

Alright, I was hoping this would work, let's just accept that if a password can't be read sudo will try to read it 3 times on FreeBSD. :-)

@squell squell enabled auto-merge (rebase) December 19, 2024 15:39
@squell squell merged commit 766d430 into trifectatechfoundation:main Dec 19, 2024
13 checks passed
@bjorn3 bjorn3 deleted the freebsd_final_fix branch December 19, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants