From 3884264d6d3b0f4099bdd99449b4d3dac0de3bbb Mon Sep 17 00:00:00 2001 From: David Mulder Date: Wed, 22 May 2024 07:57:28 -0600 Subject: [PATCH] Always normalize idmap upn inputs Otherwise 'Administrator@contoso.samba.org' will get a different uid than 'administrator@contoso.samba.org'. Signed-off-by: David Mulder --- src/idmap/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/idmap/src/lib.rs b/src/idmap/src/lib.rs index c711ec4..83a713c 100644 --- a/src/idmap/src/lib.rs +++ b/src/idmap/src/lib.rs @@ -193,7 +193,8 @@ impl SssIdmap { })?; let tenant_id_cstr = CString::new(tenant_id).map_err(|_| IdmapError::IDMAP_OUT_OF_MEMORY)?; - let input_cstr = CString::new(input).map_err(|_| IdmapError::IDMAP_OUT_OF_MEMORY)?; + let input_cstr = + CString::new(input.to_lowercase()).map_err(|_| IdmapError::IDMAP_OUT_OF_MEMORY)?; unsafe { let mut id: u32 = 0; match map_err(ffi::sss_idmap_gen_to_unix(