From 55f1180bb5e5143b7a3668bdafc37e5c4130cf96 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 4 Jun 2024 16:08:36 +0200 Subject: [PATCH] packages/kanidm: rebase patchset --- patches/base/kanidm/unixd-authenticated.patch | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/patches/base/kanidm/unixd-authenticated.patch b/patches/base/kanidm/unixd-authenticated.patch index 3fb2c44..d02e122 100644 --- a/patches/base/kanidm/unixd-authenticated.patch +++ b/patches/base/kanidm/unixd-authenticated.patch @@ -1,16 +1,16 @@ diff --git a/unix_integration/src/idprovider/kanidm.rs b/unix_integration/src/idprovider/kanidm.rs -index d1b02de0f..599dec6d5 100644 +index 6fc015756..31593f03e 100644 --- a/unix_integration/src/idprovider/kanidm.rs +++ b/unix_integration/src/idprovider/kanidm.rs -@@ -2,6 +2,7 @@ use async_trait::async_trait; - use kanidm_client::{ClientError, KanidmClient, StatusCode}; - use kanidm_proto::v1::{OperationError, UnixGroupToken, UnixUserToken}; - use tokio::sync::RwLock; +@@ -4,6 +4,7 @@ use kanidm_client::{ClientError, KanidmClient, StatusCode}; + use kanidm_proto::internal::OperationError; + use kanidm_proto::v1::{UnixGroupToken, UnixUserToken}; + use tokio::sync::{broadcast, RwLock}; +use std::env; use super::interface::{ - AuthCacheAction, AuthCredHandler, AuthRequest, AuthResult, GroupToken, Id, IdProvider, -@@ -11,12 +12,28 @@ use crate::unix_proto::PamAuthRequest; + // KeyStore, +@@ -25,12 +26,28 @@ const TAG_IDKEY: &str = "idkey"; pub struct KanidmProvider { client: RwLock, @@ -39,10 +39,10 @@ index d1b02de0f..599dec6d5 100644 } } } -@@ -73,7 +90,11 @@ impl From for GroupToken { - impl IdProvider for KanidmProvider { +@@ -118,7 +135,11 @@ impl IdProvider for KanidmProvider { + // Needs .read on all types except re-auth. - async fn provider_authenticate(&self) -> Result<(), IdpError> { + async fn provider_authenticate(&self, _tpm: &mut tpm::BoxedDynTpm) -> Result<(), IdpError> { - match self.client.write().await.auth_anonymous().await { + let auth_method = match (&self.auth_name, &self.auth_password) { + (Some(name), Some(password)) => self.client.write().await.auth_simple_password(name, password).await,