access: use proxmox-backup-auth for pam

allows customization via /etc/pam.d/proxmox-backup-auth

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-02-07 11:21:14 +01:00
parent 517dfc4258
commit ace9e3531a
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ use serde_json::{json, Value};
fn authenticate_user(username: &str, password: &str) -> Result<(), Error> {
if username == "root@pam" {
let mut auth = pam_auth::Authenticator::new("common-auth").unwrap();
let mut auth = pam_auth::Authenticator::new("proxmox-backup-auth").unwrap();
auth.set_credentials("root", password);
auth.authenticate()?;
return Ok(());