diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-13 20:21:30 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-18 16:12:08 +0200 |
commit | c615ebed6e3d273a682806b952d543e834e5630d (patch) | |
tree | 4dbc96ec8a7ac5bcb158d331c07ceb0150bf4fe0 /source3/groupdb | |
parent | 7a11e5de395c928e4a37c58a7a7ac21a314449fe (diff) | |
download | samba-c615ebed6e3d273a682806b952d543e834e5630d.tar.gz |
s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.
Andrew Bartlett
Diffstat (limited to 'source3/groupdb')
-rw-r--r-- | source3/groupdb/mapping_tdb.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index a5fa1b7a24..1a6d4e152f 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -849,7 +849,7 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, TDB_DATA key, p += len + 1; num_vals = pull_uint32(p, 0); - if (StrCaseCmp(name, "member") == 0) { + if (strcasecmp_m(name, "member") == 0) { num_mem = num_vals; members = talloc_array(tmp_ctx, struct dom_sid, num_mem); if (members == NULL) { @@ -882,30 +882,30 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, TDB_DATA key, /* we ignore unknown or uninteresting attributes * (objectclass, etc.) */ - if (StrCaseCmp(name, "gidNumber") == 0) { + if (strcasecmp_m(name, "gidNumber") == 0) { map.gid = strtoul(val, &q, 10); if (*q) { errno = EIO; goto failed; } - } else if (StrCaseCmp(name, "sid") == 0) { + } else if (strcasecmp_m(name, "sid") == 0) { if (!string_to_sid(&map.sid, val)) { errno = EIO; goto failed; } - } else if (StrCaseCmp(name, "sidNameUse") == 0) { + } else if (strcasecmp_m(name, "sidNameUse") == 0) { map.sid_name_use = strtoul(val, &q, 10); if (*q) { errno = EIO; goto failed; } - } else if (StrCaseCmp(name, "ntname") == 0) { + } else if (strcasecmp_m(name, "ntname") == 0) { strlcpy(map.nt_name, val, sizeof(map.nt_name)); - } else if (StrCaseCmp(name, "comment") == 0) { + } else if (strcasecmp_m(name, "comment") == 0) { strlcpy(map.comment, val, sizeof(map.comment)); - } else if (StrCaseCmp(name, "member") == 0) { + } else if (strcasecmp_m(name, "member") == 0) { if (!string_to_sid(&members[j], val)) { errno = EIO; goto failed; |