# HG changeset patch # User Paul Fisher # Date 1752555361 14400 # Node ID 6642e89d29a24ee0ab981490386883b851b262bd # Parent 0cabe7b94a4fa79b07f3951647d676f0aa26a47b more closely follow real password change flow diff -r 0cabe7b94a4f -r 6642e89d29a2 testharness/src/lib.rs --- a/testharness/src/lib.rs Tue Jul 15 00:39:08 2025 -0400 +++ b/testharness/src/lib.rs Tue Jul 15 00:56:01 2025 -0400 @@ -91,21 +91,13 @@ if handle.old_authtok(None)?.as_bytes() != b"old token!" { return Err(ErrorCode::AuthenticationError); } + Ok(()) + } + AuthtokAction::Update => { let password = handle.authtok(None)?; if password.as_bytes() != b"acceptable" { return Err(ErrorCode::PermissionDenied); } - handle.set_module_data("checked_pass", password) - } - AuthtokAction::Update => { - let password = handle.authtok(None)?; - let checked: &OsString = handle - .get_module_data("checked_pass") - .ok_or(ErrorCode::SystemError)?; - if password != *checked { - error!(handle, "password mismatch? {password:?} {checked:?}"); - return Err(ErrorCode::AuthenticationError); - } Ok(()) } }