|
|
905b4d |
From f5ecf965b20acf977ad7e8e2ff97b57dd9c94000 Mon Sep 17 00:00:00 2001
|
|
|
905b4d |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
905b4d |
Date: Wed, 10 Dec 2014 11:35:18 +0100
|
|
|
905b4d |
Subject: [PATCH 134/138] PAM: Domain names are case-insensitive
|
|
|
905b4d |
|
|
|
905b4d |
The pam_public_domains option and matching the domain requested by a
|
|
|
905b4d |
trusted process was done in a case-sensitive manner which is different
|
|
|
905b4d |
from how we match domain names in SSSD normally.
|
|
|
905b4d |
|
|
|
905b4d |
Reviewed-by: Pavel Reichl <preichl@redhat.com>
|
|
|
905b4d |
---
|
|
|
905b4d |
src/responder/pam/pamsrv_cmd.c | 4 ++--
|
|
|
905b4d |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
905b4d |
|
|
|
905b4d |
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
|
|
|
905b4d |
index 02720018b91e1319346a023eca571913b544284a..29a9810e6f2d86210d9e1303f55a411d81704ddf 100644
|
|
|
905b4d |
--- a/src/responder/pam/pamsrv_cmd.c
|
|
|
905b4d |
+++ b/src/responder/pam/pamsrv_cmd.c
|
|
|
905b4d |
@@ -56,7 +56,7 @@ static bool is_domain_requested(struct pam_data *pd, const char *domain_name)
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
for (i = 0; pd->requested_domains[i]; i++) {
|
|
|
905b4d |
- if (strcmp(domain_name, pd->requested_domains[i])) {
|
|
|
905b4d |
+ if (strcasecmp(domain_name, pd->requested_domains[i])) {
|
|
|
905b4d |
continue;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
@@ -831,7 +831,7 @@ static bool is_domain_public(char *name,
|
|
|
905b4d |
size_t i;
|
|
|
905b4d |
|
|
|
905b4d |
for(i=0; i < public_dom_names_count; i++) {
|
|
|
905b4d |
- if (strcmp(name, public_dom_names[i]) == 0) {
|
|
|
905b4d |
+ if (strcasecmp(name, public_dom_names[i]) == 0) {
|
|
|
905b4d |
return true;
|
|
|
905b4d |
}
|
|
|
905b4d |
}
|
|
|
905b4d |
--
|
|
|
905b4d |
1.9.3
|
|
|
905b4d |
|