dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0117-PROXY-Use-the-fqname-when-converting-to-lowercase.patch

b2d430
From fe4117b3203c0464b1366066bf09d83978c632d8 Mon Sep 17 00:00:00 2001
b2d430
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
b2d430
Date: Tue, 23 Aug 2016 23:46:59 +0200
b2d430
Subject: [PATCH 117/117] PROXY: Use the fqname when converting to lowercase
b2d430
MIME-Version: 1.0
b2d430
Content-Type: text/plain; charset=UTF-8
b2d430
Content-Transfer-Encoding: 8bit
b2d430
b2d430
When saving the user there is a comparison between the "cased alias"
b2d430
and the "lowercase password name". However, the first doesn't use fully
b2d430
qualified name while the second does, resulting in a not expected
b2d430
override of the "nameAlias" attribute of a stored user when trying to
b2d430
authenticate more than once using an alias.
b2d430
b2d430
Resolves:
b2d430
https://fedorahosted.org/sssd/ticket/3134
b2d430
b2d430
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
b2d430
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
b2d430
---
b2d430
 src/providers/proxy/proxy_id.c | 2 +-
b2d430
 1 file changed, 1 insertion(+), 1 deletion(-)
b2d430
b2d430
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
b2d430
index f633a5e1c71dfc7f8d124e62169cfda48773bbb1..df8a329d4a5a4bd7ed7723d0219089e7b4ef639d 100644
b2d430
--- a/src/providers/proxy/proxy_id.c
b2d430
+++ b/src/providers/proxy/proxy_id.c
b2d430
@@ -256,7 +256,7 @@ static int save_user(struct sss_domain_info *domain,
b2d430
     }
b2d430
 
b2d430
     if (lowercase) {
b2d430
-        lc_pw_name = sss_tc_utf8_str_tolower(attrs, pwd->pw_name);
b2d430
+        lc_pw_name = sss_tc_utf8_str_tolower(attrs, real_name);
b2d430
         if (lc_pw_name == NULL) {
b2d430
             DEBUG(SSSDBG_OP_FAILURE, "Cannot convert name to lowercase.\n");
b2d430
             ret = ENOMEM;
b2d430
-- 
b2d430
2.4.11
b2d430