diff options
author | Jeremy Allison <jra@samba.org> | 2005-05-06 08:07:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:47 -0500 |
commit | b1bfa9cb37deb22d1d08bc60ba44d61334f6446e (patch) | |
tree | 5e68747b6db15714db7f63257c777a85fd1c9e09 /source/smbd/mangle_hash.c | |
parent | 94e53472666edfb390605b8a7e9f9dffc3c845f5 (diff) | |
download | samba-b1bfa9cb37deb22d1d08bc60ba44d61334f6446e.tar.gz samba-b1bfa9cb37deb22d1d08bc60ba44d61334f6446e.tar.xz samba-b1bfa9cb37deb22d1d08bc60ba44d61334f6446e.zip |
r6625: Remove another global variable left over from a long time ago (magic char).
Jeremy.
Diffstat (limited to 'source/smbd/mangle_hash.c')
-rw-r--r-- | source/smbd/mangle_hash.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c index 0067023e610..98ba775dafb 100644 --- a/source/smbd/mangle_hash.c +++ b/source/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 }; |