summaryrefslogtreecommitdiffstats
path: root/src/util/usertools.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/usertools.c')
-rw-r--r--src/util/usertools.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/usertools.c b/src/util/usertools.c
index 738ac62d7..64e8b1037 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -173,3 +173,12 @@ int sss_parse_name(TALLOC_CTX *memctx,
return EOK;
}
+
+char *
+sss_get_cased_name(TALLOC_CTX *mem_ctx,
+ const char *orig_name,
+ bool case_sensitive)
+{
+ return case_sensitive ? talloc_strdup(mem_ctx, orig_name) :
+ sss_tc_utf8_str_tolower(mem_ctx, orig_name);
+}