summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle_hash.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-07 18:37:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:30 -0500
commite0da56a84808c522bc7324b5d636f1cbd317a2c5 (patch)
tree5522c069c408792851c5eb747feb5b5981373131 /source3/smbd/mangle_hash.c
parent5cb65233cd5c4f3c740ff3d06807296c2032377d (diff)
downloadsamba-e0da56a84808c522bc7324b5d636f1cbd317a2c5.tar.gz
samba-e0da56a84808c522bc7324b5d636f1cbd317a2c5.tar.bz2
samba-e0da56a84808c522bc7324b5d636f1cbd317a2c5.zip
r570: Remove lots of globals to handle case issues - move them
to connection struct entries (as they should have been from the start). Jerry, once you've cut over to 3.0.4 release branch I'll add this to 3.0 also. - Jerry cut over :-). Jeremy. (This used to be commit 578a508509d21226ad3332fc54c3ab54cd8ae452)
Diffstat (limited to 'source3/smbd/mangle_hash.c')
-rw-r--r--source3/smbd/mangle_hash.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index 16722ae6e9..7b8cbdbddb 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -51,13 +51,6 @@
/* -------------------------------------------------------------------------- **
- * External Variables...
- */
-
-extern int case_default; /* Are conforming 8.3 names all upper or lower? */
-extern BOOL case_mangle; /* If true, all chars in 8.3 should be same case. */
-
-/* -------------------------------------------------------------------------- **
* Other stuff...
*
* magic_char - This is the magic char used for mangling. It's
@@ -130,13 +123,6 @@ static BOOL mc_initialized = False;
#define MANGLED_CACHE_MAX_ENTRIES 1024
#define MANGLED_CACHE_MAX_MEMORY 0
-/* -------------------------------------------------------------------------- **
- * External Variables...
- */
-
-extern int case_default; /* Are conforming 8.3 names all upper or lower? */
-extern BOOL case_mangle; /* If true, all chars in 8.3 should be same case. */
-
/* -------------------------------------------------------------------- */
static NTSTATUS has_valid_83_chars(const smb_ucs2_t *s, BOOL allow_wildcards)
@@ -639,7 +625,7 @@ static BOOL check_cache( char *s )
* the buffer must be able to hold 13 characters (including the null)
*****************************************************************************
*/
-static void to_8_3(char *s)
+static void to_8_3(char *s, int default_case)
{
int csum;
char *p;
@@ -653,7 +639,7 @@ static void to_8_3(char *s)
p = strrchr(s,'.');
if( p && (strlen(p+1) < (size_t)4) ) {
- BOOL all_normal = ( strisnormal(p+1) ); /* XXXXXXXXX */
+ BOOL all_normal = ( strisnormal(p+1, default_case) ); /* XXXXXXXXX */
if( all_normal && p[1] != 0 ) {
*p = 0;
@@ -728,7 +714,7 @@ static void to_8_3(char *s)
* ****************************************************************************
*/
-static void name_map(char *OutName, BOOL need83, BOOL cache83)
+static void name_map(char *OutName, BOOL need83, BOOL cache83, int default_case)
{
smb_ucs2_t *OutName_ucs2;
DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName,
@@ -750,7 +736,7 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83)
if (cache83)
tmp = strdup(OutName);
- to_8_3(OutName);
+ to_8_3(OutName, default_case);
if(tmp != NULL) {
cache_mangled_name(OutName, tmp);