summaryrefslogtreecommitdiffstats
path: root/source/smbd/filename.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-04-08 01:58:44 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-04-08 01:58:44 +0000
commitad8aa470575c39fcbc7f1440bf1081d7ea31c0aa (patch)
treeb6c83734ac700c596ce7a43b270f07195536e64a /source/smbd/filename.c
parent26842f1ac051b030c1295b68244a1f9007d4eefb (diff)
downloadsamba-ad8aa470575c39fcbc7f1440bf1081d7ea31c0aa.tar.gz
samba-ad8aa470575c39fcbc7f1440bf1081d7ea31c0aa.tar.xz
samba-ad8aa470575c39fcbc7f1440bf1081d7ea31c0aa.zip
Reintroduce the 2.2 name mangling code, until we get are more flexible solution.
Even for a hash/cache setup, this code needs some more work, in particular it needs to use mangle_get_prefix() etc and to move to unicode internals. Andrew Bartlett
Diffstat (limited to 'source/smbd/filename.c')
-rw-r--r--source/smbd/filename.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index 3053e8a1d81..8bd09691e4f 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -75,6 +75,17 @@ static BOOL fname_equal(char *name1, char *name2)
****************************************************************************/
static BOOL mangled_equal(char *name1, char *name2)
{
+#if 1
+ pstring tmpname;
+ if (is_8_3(name2, True)) {
+ return False;
+ }
+
+ pstrcpy(tmpname, name2);
+ mangle_name_83(tmpname);
+
+ return strequal(name1, tmpname);
+#else
char *tmpname;
BOOL ret = False;
@@ -86,6 +97,8 @@ static BOOL mangled_equal(char *name1, char *name2)
SAFE_FREE(tmpname);
}
return ret;
+#endif
+
}
@@ -116,7 +129,7 @@ stat struct will be filled with zeros (and this can be detected by checking
for nlinks = 0, which can never be true for any file).
****************************************************************************/
-BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
+BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_component,
BOOL *bad_path, SMB_STRUCT_STAT *pst)
{
SMB_STRUCT_STAT st;