changeset 182:346dc13724ce

Check for Sun-specific password change behavior.
author Paul Fisher <paul@pfish.zone>
date Wed, 30 Jul 2025 18:39:41 -0400
parents a8c814843ccb
children 4f46681b3f54
files testharness/src/lib.rs
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/testharness/src/lib.rs	Wed Jul 30 18:32:03 2025 -0400
+++ b/testharness/src/lib.rs	Wed Jul 30 18:39:41 2025 -0400
@@ -92,7 +92,12 @@
     ) -> nonstick::Result<()> {
         match action {
             AuthtokAction::Validate => {
-                if handle.old_authtok(None)?.as_bytes() != b"old token!" {
+                let expected: &[u8] = if cfg!(pam_impl = "Sun") {
+                    b"valid"
+                } else {
+                    b"old token!"
+                };
+                if handle.old_authtok(None)?.as_bytes() != expected {
                     return Err(ErrorCode::AuthenticationError);
                 }
                 Ok(())