diff options
Diffstat (limited to 'source3/smbd/mangle_hash.c')
-rw-r--r-- | source3/smbd/mangle_hash.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index 0067023e61..98ba775daf 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -276,13 +276,15 @@ done: return ret; } -static BOOL is_8_3(const char *fname, BOOL check_case, BOOL allow_wildcards) +static BOOL is_8_3(const char *fname, BOOL check_case, BOOL allow_wildcards, int snum) { const char *f; smb_ucs2_t *ucs2name; NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; size_t size; + magic_char = lp_magicchar(snum); + if (!fname || !*fname) return False; if ((f = strrchr(fname, '/')) == NULL) @@ -362,10 +364,12 @@ static void init_chartest( void ) * * ************************************************************************** ** */ -static BOOL is_mangled(const char *s) +static BOOL is_mangled(const char *s, int snum) { char *magic; + magic_char = lp_magicchar(snum); + if( !ct_initialized ) init_chartest(); @@ -460,12 +464,14 @@ static void cache_mangled_name( const char mangled_name[13], char *raw_name ) * ************************************************************************** ** */ -static BOOL check_cache( char *s, size_t maxlen ) +static BOOL check_cache( char *s, size_t maxlen, int snum ) { TDB_DATA data_val; char *ext_start = NULL; char *saved_ext = NULL; + magic_char = lp_magicchar(snum); + /* If the cache isn't initialized, give up. */ if( !tdb_mangled_cache ) return( False ); @@ -604,9 +610,11 @@ static void to_8_3(char *s, int default_case) * **************************************************************************** */ -static void name_map(char *OutName, BOOL need83, BOOL cache83, int default_case) +static void name_map(char *OutName, BOOL need83, BOOL cache83, int default_case, int snum) { smb_ucs2_t *OutName_ucs2; + magic_char = lp_magicchar(snum); + DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName, need83 ? "True" : "False", cache83 ? "True" : "False")); @@ -643,9 +651,9 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83, int default_case) to drop in an alternative mangling implementation */ static struct mangle_fns mangle_fns = { + mangle_reset, is_mangled, is_8_3, - mangle_reset, check_cache, name_map }; |