Hi i have been trying to auto log in and start plasma-wayland on tty6 so trying to set up using pam but build always fails i have this basic main.rs
extern crate pam;
pub fn main() {
let service = "<yourapp>";
let user = "<user>";
let password = "<pass>";
let mut auth = pam::Authenticator::with_password(service).unwrap();
auth.handler_mut().set_credentials(user, password);
if auth.authenticate().is_ok() && auth.open_session().is_ok() {
println!("Successfully opened a session!");
}
else {
println!("Authentication failed =/");
}
}
and pam = 0.8.0 in dependancies
[package]
name = "Gamescope"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
pam = "0.8.0"
but build always fails with this
error[E0433]: failed to resolve: could not find `Authenticator` in `pam`
--> src/main.rs:8:34
|
8 | let mut authenticator = pam::Authenticator::with_password(service).unwrap();
| ^^^^^^^^^^^^^ could not find `Authenticator` in `pam`