From e0da56a84808c522bc7324b5d636f1cbd317a2c5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 7 May 2004 18:37:47 +0000 Subject: 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) --- source3/smbd/mangle_hash.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'source3/smbd/mangle_hash.c') 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 @@ -50,13 +50,6 @@ #include "includes.h" -/* -------------------------------------------------------------------------- ** - * 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... * @@ -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); -- cgit