Blob Blame History Raw
From f5ecf965b20acf977ad7e8e2ff97b57dd9c94000 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Wed, 10 Dec 2014 11:35:18 +0100
Subject: [PATCH 134/138] PAM: Domain names are case-insensitive

The pam_public_domains option and matching the domain requested by a
trusted process was done in a case-sensitive manner which is different
from how we match domain names in SSSD normally.

Reviewed-by: Pavel Reichl <preichl@redhat.com>
---
 src/responder/pam/pamsrv_cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 02720018b91e1319346a023eca571913b544284a..29a9810e6f2d86210d9e1303f55a411d81704ddf 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -56,7 +56,7 @@ static bool is_domain_requested(struct pam_data *pd, const char *domain_name)
     }
 
     for (i = 0; pd->requested_domains[i]; i++) {
-        if (strcmp(domain_name, pd->requested_domains[i])) {
+        if (strcasecmp(domain_name, pd->requested_domains[i])) {
             continue;
         }
 
@@ -831,7 +831,7 @@ static bool is_domain_public(char *name,
     size_t i;
 
     for(i=0; i < public_dom_names_count; i++) {
-        if (strcmp(name, public_dom_names[i]) == 0) {
+        if (strcasecmp(name, public_dom_names[i]) == 0) {
             return true;
         }
     }
-- 
1.9.3