@@ 39,13 39,13 @@ pub fn login() -> Result<impl Authenticator> {
// 2. PAM autologin: Identical authenticate() except no `let password`.
// 3. !PAM password: I'll have to bone up on scrypt or something.
// 4. !PAM autologin: Probably a `getgrouplist` call.
- let mut pam = PamPassword::new(username.clone())?;
+ let mut pam = PamPassword::new(username)?;
match pam.authenticate() {
Err(e) => {
- error!("Failed to authenticate {}: {}", &username, e);
+ error!("Failed to authenticate {}: {}", pam.username(), e);
}
Ok(_) => {
- info!("Authenticated {}", &username);
+ info!("Authenticated {}", pam.username());
return Ok(pam);
}
}