summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samldb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-05-04 08:46:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-05-04 08:46:57 +1000
commit62503179b5f3e8efe22abcf3b30ddb795db5d8c9 (patch)
treefc5c83f4130b7eabd5ea444e5f579e70113a578e /source4/dsdb/samdb/ldb_modules/samldb.c
parentd4391f77bf54ae94de9715bfbefcd545c556e55c (diff)
downloadsamba-62503179b5f3e8efe22abcf3b30ddb795db5d8c9.tar.gz
samba-62503179b5f3e8efe22abcf3b30ddb795db5d8c9.tar.bz2
samba-62503179b5f3e8efe22abcf3b30ddb795db5d8c9.zip
s4-dsdb: Use strcasecmp_m() to compare possibly multibyte strings in samldb
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samldb.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index d17d809d77..7db7ff0f04 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -1895,7 +1895,7 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
dns_hostname = NULL;
}
if ((old_dns_hostname != NULL) && (dns_hostname != NULL) &&
- (strcasecmp(old_dns_hostname, dns_hostname) == 0)) {
+ (strcasecmp_m(old_dns_hostname, dns_hostname) == 0)) {
/* The "dNSHostName" didn't change */
dns_hostname = NULL;
}
@@ -1905,7 +1905,7 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
sam_accountname = NULL;
}
if ((old_sam_accountname != NULL) && (sam_accountname != NULL) &&
- (strcasecmp(old_sam_accountname, sam_accountname) == 0)) {
+ (strcasecmp_m(old_sam_accountname, sam_accountname) == 0)) {
/* The "sAMAccountName" didn't change */
sam_accountname = NULL;
}
@@ -1991,11 +1991,11 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
while ((tok = strtok_r(NULL, "/", &pos)) != NULL) {
if ((dns_hostname != NULL) &&
- (strcasecmp(tok, old_dns_hostname) == 0)) {
+ (strcasecmp_m(tok, old_dns_hostname) == 0)) {
tok = dns_hostname;
}
if ((sam_accountname != NULL) &&
- (strcasecmp(tok, old_sam_accountname) == 0)) {
+ (strcasecmp_m(tok, old_sam_accountname) == 0)) {
tok = sam_accountname;
}
@@ -2008,7 +2008,7 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
/* Uniqueness check */
for (j = 0; (!found) && (j < el->num_values); j++) {
- if (strcasecmp((char *)el->values[j].data,
+ if (strcasecmp_m((char *)el->values[j].data,
new_str) == 0) {
found = true;
}