summaryrefslogtreecommitdiff
path: root/src/responder/nss/nsssrv_cmd.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-12-21 18:00:25 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-12-21 14:47:41 -0500
commitc7d387aaaa3d3470dec55a5ca0612873e6354ba8 (patch)
treeb78851a84b37efc43b994fa5c45a03fa654ddbed /src/responder/nss/nsssrv_cmd.c
parent6f52db9c8b1081565ffa0543f8c8b470b8375932 (diff)
downloadsssd-c7d387aaaa3d3470dec55a5ca0612873e6354ba8.tar.gz
sssd-c7d387aaaa3d3470dec55a5ca0612873e6354ba8.tar.bz2
sssd-c7d387aaaa3d3470dec55a5ca0612873e6354ba8.zip
sss_get_cased_name utility function
Diffstat (limited to 'src/responder/nss/nsssrv_cmd.c')
-rw-r--r--src/responder/nss/nsssrv_cmd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 0bd2f75e..71c949f1 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -741,8 +741,7 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
dctx->domain = dom;
talloc_free(name);
- name = dom->case_sensitive ? talloc_strdup(dctx, cmdctx->name) :
- sss_tc_utf8_str_tolower(dctx, cmdctx->name);
+ name = sss_get_cased_name(dctx, cmdctx->name, dom->case_sensitive);
if (!name) return ENOMEM;
/* verify this user has not yet been negatively cached,
@@ -2033,8 +2032,7 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
dctx->domain = dom;
talloc_free(name);
- name = dom->case_sensitive ? talloc_strdup(dctx, cmdctx->name) :
- sss_tc_utf8_str_tolower(dctx, cmdctx->name);
+ name = sss_get_cased_name(dctx, cmdctx->name, dom->case_sensitive);
if (!name) return ENOMEM;
/* verify this group has not yet been negatively cached,
@@ -3104,8 +3102,7 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
dctx->domain = dom;
talloc_free(name);
- name = dom->case_sensitive ? talloc_strdup(dctx, cmdctx->name) :
- sss_tc_utf8_str_tolower(dctx, cmdctx->name);
+ name = sss_get_cased_name(dctx, cmdctx->name, dom->case_sensitive);
if (!name) return ENOMEM;
/* verify this user has not yet been negatively cached,