~kennylevinsen/greetd

522b83526e0171f4d2add036168d450699ac75b9 — Kenny Levinsen 4 months ago 1612181
pam: Check /usr/lib/pam.d

We do some presence checks before using certain PAM service files. Check
/usr/lib/pam.d in addition to /etc/pam.d.
1 files changed, 11 insertions(+), 1 deletions(-)

M greetd/src/server.rs
M greetd/src/server.rs => greetd/src/server.rs +11 -1
@@ 198,7 198,10 @@ impl Drop for Listener {
}

pub async fn main(config: Config) -> Result<(), Error> {
    let service = if Path::new(&format!("/etc/pam.d/{}", config.file.general.service)).exists() {
    let service = if Path::new(&format!("/usr/lib/pam.d/{}", config.file.general.service)).exists()
    {
        &config.file.general.service
    } else if Path::new(&format!("/etc/pam.d/{}", config.file.general.service)).exists() {
        &config.file.general.service
    } else if Path::new("/etc/pam.d/login").exists() {
        eprintln!(


@@ 211,6 214,13 @@ pub async fn main(config: Config) -> Result<(), Error> {
    };

    let greeter_service = if Path::new(&format!(
        "/usr/lib/pam.d/{}",
        config.file.default_session.service
    ))
    .exists()
    {
        &config.file.default_session.service
    } else if Path::new(&format!(
        "/etc/pam.d/{}",
        config.file.default_session.service
    ))