summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2014-10-23 20:27:57 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-10-29 10:43:56 +0100
commitc4e278c2637547640d28bda007c9c38a17956fcc (patch)
tree57294b61c1d2ed1073c89f3e7ff3272b46e6a1f8 /src
parent458f5245dd5130d12666cce6faf8ef1ec7f80169 (diff)
downloadsssd-c4e278c2637547640d28bda007c9c38a17956fcc.tar.gz
sssd-c4e278c2637547640d28bda007c9c38a17956fcc.tar.xz
sssd-c4e278c2637547640d28bda007c9c38a17956fcc.zip
nss: preserve service name in getsrv call
About case_sensitive=preserving and services. The name of the service can be preserved in result of 'getent service'. However we should still lowercase the protocol and service aliases because they serve as keys in some queries to sysdb. The lowercasing is done by the provider already. If we did not do that, we would lose case insesnsitivity. With this patch the responder preserves the case of service name and protocol, to match the case that is stored in the sysdb (however the protocol is already lowercased by provider, so it was done only for consistent use of the case_sensitive=preserve option in the responders and only the case of name is the same as in ldap). Fixes: https://fedorahosted.org/sssd/ticket/2460 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/responder/nss/nsssrv_services.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c
index 774176802..f6abc445c 100644
--- a/src/responder/nss/nsssrv_services.c
+++ b/src/responder/nss/nsssrv_services.c
@@ -642,7 +642,7 @@ fill_service(struct sss_packet *packet,
/* Get the service name */
orig_name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL);
- tmpstr = sss_get_cased_name(tmp_ctx, orig_name, dom->case_sensitive);
+ tmpstr = sss_get_cased_name(tmp_ctx, orig_name, dom->case_preserve);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
"Could not identify service name, skipping\n");
@@ -677,7 +677,7 @@ fill_service(struct sss_packet *packet,
orig_proto = (const char *)el->values[0].data;
}
- tmpstr = sss_get_cased_name(tmp_ctx, orig_proto, dom->case_sensitive);
+ tmpstr = sss_get_cased_name(tmp_ctx, orig_proto, dom->case_preserve);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
"sss_get_cased_name failed, skipping\n");