]> git.proxmox.com Git - proxmox.git/commitdiff
auth-api: fixup examples
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 10 Jul 2023 07:05:47 +0000 (09:05 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 10 Jul 2023 07:06:35 +0000 (09:06 +0200)
These were missing the new client-ip parameter in the auth
function calls which was introduced to support `PAM_RHOST`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-auth-api/examples/passwd.rs

index 2fd68bd56d21bde29e498be5c3ad6f2d9f813fd8..0f9921bc3f97e6fde2c70999baf902189c7c3d1f 100644 (file)
@@ -43,9 +43,9 @@ async fn run() -> Result<(), Error> {
 
     let realm = proxmox_auth_api::Pam::new("test");
     if changepass {
-        realm.store_password(&username, &password)?;
+        realm.store_password(&username, &password, None)?;
     } else {
-        realm.authenticate_user(&username, &password).await?;
+        realm.authenticate_user(&username, &password, None).await?;
     }
 
     Ok(())