summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-12-27 20:52:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:58 -0500
commit5a4881bf396e691524329bcd6aa1ae4a7f4084ec (patch)
treeea2cce14847e28629ec48f2a70f547bdbb08fe98 /source3/passdb
parentd186ff50721011f839a02aaac4866201eda23034 (diff)
downloadsamba-5a4881bf396e691524329bcd6aa1ae4a7f4084ec.tar.gz
samba-5a4881bf396e691524329bcd6aa1ae4a7f4084ec.tar.bz2
samba-5a4881bf396e691524329bcd6aa1ae4a7f4084ec.zip
r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy. (This used to be commit c2752347eb2deeb2798c580ec7fc751a847717e9)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c8
-rw-r--r--source3/passdb/pdb_pgsql.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 006161b663..ac4d255597 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -566,8 +566,8 @@ BOOL pdb_gethexpwd(const char *p, unsigned char *pwd)
return (False);
for (i = 0; i < 32; i += 2) {
- hinybble = toupper(p[i]);
- lonybble = toupper(p[i + 1]);
+ hinybble = toupper_ascii(p[i]);
+ lonybble = toupper_ascii(p[i + 1]);
p1 = strchr(hexchars, hinybble);
p2 = strchr(hexchars, lonybble);
@@ -616,8 +616,8 @@ BOOL pdb_gethexhours(const char *p, unsigned char *hours)
}
for (i = 0; i < 42; i += 2) {
- hinybble = toupper(p[i]);
- lonybble = toupper(p[i + 1]);
+ hinybble = toupper_ascii(p[i]);
+ lonybble = toupper_ascii(p[i + 1]);
p1 = strchr(hexchars, hinybble);
p2 = strchr(hexchars, lonybble);
diff --git a/source3/passdb/pdb_pgsql.c b/source3/passdb/pdb_pgsql.c
index 632903c1ac..196fe8f855 100644
--- a/source3/passdb/pdb_pgsql.c
+++ b/source3/passdb/pdb_pgsql.c
@@ -368,7 +368,7 @@ static NTSTATUS pgsqlsam_getsampwnam ( struct pdb_methods *methods, SAM_ACCOUNT
lowercasename = smb_xstrdup(sname);
l = strlen(lowercasename);
for(i = 0; i < l; i++) {
- lowercasename[i] = tolower(lowercasename[i]);
+ lowercasename[i] = tolower_ascii(lowercasename[i]);
}
result = pgsqlsam_select_by_field( methods, user, SQL_SEARCH_USER_NAME, lowercasename ) ;