~goorzhel/radm

5cf4a4b2a8b8cacb0f104d0f43a315d833e7ae8a — Antonio Gurgel 4 months ago ecf1819 getenv
I'm going to need PAM environment

TODO:
- Implement pam::Client::getenv. Should be trivial.
- Enumerate bare minimum env vars to start session.
  - PATH
  - UID
  - GID
- Enumerate bare minimum env vars to start Wayland session.
  - DESKTOP_SESSION
  - XDG_SOME_SHIT
  - XDG_SOME_OTHER_SHIT
1 files changed, 5 insertions(+), 0 deletions(-)

M src/auth.rs
M src/auth.rs => src/auth.rs +5 -0
@@ 5,6 5,7 @@ use pam::PasswordConv;
pub trait Authenticator {
    // fn authenticate(&mut self) -> Result<(), Error>;
    fn username(&self) -> Option<String>;
    fn getenv(&self) -> Option<String>;
}

pub struct PamPassword<'a> {


@@ 35,4 36,8 @@ impl<'a> Authenticator for PamPassword<'a> {
    fn username(&self) -> Option<String> {
        self.username.clone()
    }

    fn getenv(&self, key: &str) -> Option<String> {
        self.client.getenv(key)
    }
}