summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle_hash2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-05-06 08:07:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:47 -0500
commit02e3717ee9e045d197d845489e84ac40083ca868 (patch)
treedddd1100fcec3249f31741b8564d635396873775 /source3/smbd/mangle_hash2.c
parent61ffe158f2d3f149b230cc31c4b58d7d025ab28d (diff)
downloadsamba-02e3717ee9e045d197d845489e84ac40083ca868.tar.gz
samba-02e3717ee9e045d197d845489e84ac40083ca868.tar.bz2
samba-02e3717ee9e045d197d845489e84ac40083ca868.zip
r6625: Remove another global variable left over from a long time ago (magic char).
Jeremy. (This used to be commit b1bfa9cb37deb22d1d08bc60ba44d61334f6446e)
Diffstat (limited to 'source3/smbd/mangle_hash2.c')
-rw-r--r--source3/smbd/mangle_hash2.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 4896cfb17b..6a8462ee3d 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -268,7 +268,7 @@ static BOOL is_mangled_component(const char *name, size_t len)
directory separators. It should return true if any component is
mangled
*/
-static BOOL is_mangled(const char *name)
+static BOOL is_mangled(const char *name, int snum)
{
const char *p;
const char *s;
@@ -293,7 +293,7 @@ static BOOL is_mangled(const char *name)
simplifies things greatly (it means that we know the string won't
get larger when converted from UNIX to DOS formats)
*/
-static BOOL is_8_3(const char *name, BOOL check_case, BOOL allow_wildcards)
+static BOOL is_8_3(const char *name, BOOL check_case, BOOL allow_wildcards, int snum)
{
int len, i;
char *dot_p;
@@ -370,7 +370,7 @@ static void mangle_reset(void)
try to find a 8.3 name in the cache, and if found then
replace the string with the original long name.
*/
-static BOOL check_cache(char *name, size_t maxlen)
+static BOOL check_cache(char *name, size_t maxlen, int snum)
{
u32 hash, multiplier;
unsigned int i;
@@ -378,7 +378,7 @@ static BOOL check_cache(char *name, size_t maxlen)
char extension[4];
/* make sure that this is a mangled name from this cache */
- if (!is_mangled(name)) {
+ if (!is_mangled(name, snum)) {
M_DEBUG(10,("check_cache: %s -> not mangled\n", name));
return False;
}
@@ -506,7 +506,7 @@ static BOOL is_legal_name(const char *name)
the name parameter must be able to hold 13 bytes
*/
-static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case)
+static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case, int snum)
{
char *dot_p;
char lead_chars[7];
@@ -520,7 +520,7 @@ static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case)
if (!is_reserved_name(name)) {
/* if the name is already a valid 8.3 name then we don't need to
do anything */
- if (is_8_3(name, False, False)) {
+ if (is_8_3(name, False, False, snum)) {
return;
}
@@ -679,14 +679,13 @@ static void init_tables(void)
}
}
-
/*
the following provides the abstraction layer to make it easier
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
};