diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-02-18 13:31:26 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-02-18 22:58:19 +0100 |
commit | 208b9f9bea519392428d99803edac1739ffdd444 (patch) | |
tree | 7acc18baf9cbca451d8b28fd3e648a332db815ba /src/providers/ldap/sdap_async_users.c | |
parent | 82a4f022ec1cbb9530ffa21d95474152b24acf50 (diff) | |
download | sssd-208b9f9bea519392428d99803edac1739ffdd444.tar.gz sssd-208b9f9bea519392428d99803edac1739ffdd444.tar.xz sssd-208b9f9bea519392428d99803edac1739ffdd444.zip |
make make_realm_upper_case() static
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async_users.c')
-rw-r--r-- | src/providers/ldap/sdap_async_users.c | 18 |
1 files changed, 18 insertions, 0 deletions
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====================================================== */ |