comparison testharness/src/lib.rs @ 171:e27c5c667a5a

Create full new types for return code and flags, separate end to end. This plumbs the ReturnCode and RawFlags types through the places where we call into or are called from PAM. Also adds Sun documentation to the project.
author Paul Fisher <paul@pfish.zone>
date Fri, 25 Jul 2025 20:52:14 -0400
parents 77470e45e397
children 6727cbe56f4a
comparison
equal deleted inserted replaced
170:f052e2417195 171:e27c5c667a5a
85 _: Vec<&CStr>, 85 _: Vec<&CStr>,
86 action: AuthtokAction, 86 action: AuthtokAction,
87 _flags: AuthtokFlags, 87 _flags: AuthtokFlags,
88 ) -> nonstick::Result<()> { 88 ) -> nonstick::Result<()> {
89 match action { 89 match action {
90 AuthtokAction::PreliminaryCheck => { 90 AuthtokAction::Validate => {
91 if handle.old_authtok(None)?.as_bytes() != b"old token!" { 91 if handle.old_authtok(None)?.as_bytes() != b"old token!" {
92 return Err(ErrorCode::AuthenticationError); 92 return Err(ErrorCode::AuthenticationError);
93 } 93 }
94 Ok(()) 94 Ok(())
95 } 95 }