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-30 11:45:11 +0100
commite6c49e90d752fdbdf5d12ac18ccb9f297baaa8f1 (patch)
tree3a294bcd2448093c4e05019a66417266705c37ac /src
parentd8d007c12bac73df4931722c4f7b57fa778bf105 (diff)
downloadsssd-e6c49e90d752fdbdf5d12ac18ccb9f297baaa8f1.tar.gz
sssd-e6c49e90d752fdbdf5d12ac18ccb9f297baaa8f1.tar.xz
sssd-e6c49e90d752fdbdf5d12ac18ccb9f297baaa8f1.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> (cherry picked from commit c4e278c2637547640d28bda007c9c38a17956fcc)
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");