From 208b9f9bea519392428d99803edac1739ffdd444 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Tue, 18 Feb 2014 13:31:26 +0100 Subject: make make_realm_upper_case() static Reviewed-by: Jakub Hrozek --- src/providers/ldap/sdap_async_users.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/providers/ldap/sdap_async_users.c') diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c index dd935377..ef5478f9 100644 --- a/src/providers/ldap/sdap_async_users.c +++ b/src/providers/ldap/sdap_async_users.c @@ -28,6 +28,24 @@ #include "providers/ldap/sdap_idmap.h" #include "providers/ldap/sdap_users.h" +#define REALM_SEPARATOR '@' + +static void make_realm_upper_case(const char *upn) +{ + char *c; + + c = strchr(upn, REALM_SEPARATOR); + if (c == NULL) { + DEBUG(SSSDBG_TRACE_ALL, "No realm delimiter found in upn [%s].\n", upn); + return; + } + + while(*(++c) != '\0') { + c[0] = toupper(*c); + } + + return; +} /* ==Save-User-Entry====================================================== */ -- cgit