summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-03-04 22:24:07 +0000
committerJeremy Allison <jra@samba.org>1998-03-04 22:24:07 +0000
commit37f5f7b557aa59c7eba4a9f2f2f323d7cec62fc7 (patch)
treed5b166e140c87c91df179531319ee918b337725c /source/smbd/server.c
parent2df47cf1bb3428fbaa8dcf45ec114ec3aaafae57 (diff)
downloadsamba-37f5f7b557aa59c7eba4a9f2f2f323d7cec62fc7.tar.gz
samba-37f5f7b557aa59c7eba4a9f2f2f323d7cec62fc7.tar.xz
samba-37f5f7b557aa59c7eba4a9f2f2f323d7cec62fc7.zip
Removed broken change I made to mangle.c (ooops. Andrew's original
algorithm was correct). Finally (I think) fixed the mangled directory stack issue in scan_directory() correctly. Mangled & non-mangled names are now being checked correctly. Hurrah to Ulrik Dickow <ukd@kampsax.dk> who helped isolate this one. Jeremy.
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r--source/smbd/server.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index e6807bdf31d..e290027d0a4 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -456,11 +456,7 @@ static BOOL scan_directory(char *path, char *name,int cnum,BOOL docache)
return(True);
}
-#if 0
- /*
- * This code I believe is incorrect - and commenting it out
- * is the correct fix for the bug mentioned below in the
- * comment 'name2 here was changed to dname - since 1.9.16p2 - not sure of reason (jra)'.
+ /*
* The incoming name can be mangled, and if we de-mangle it
* here it will not compare correctly against the filename (name2)
* read from the directory and then mangled by the name_map_mangle()
@@ -468,8 +464,7 @@ static BOOL scan_directory(char *path, char *name,int cnum,BOOL docache)
* (JRA).
*/
if (mangled)
- check_mangled_stack(name);
-#endif
+ mangled = !check_mangled_stack(name);
/* open the directory */
if (!(cur_dir = OpenDir(cnum, path, True)))
@@ -489,7 +484,7 @@ static BOOL scan_directory(char *path, char *name,int cnum,BOOL docache)
if (!name_map_mangle(name2,False,SNUM(cnum))) continue;
if ((mangled && mangled_equal(name,name2))
- || fname_equal(name, name2)) /* name2 here was changed to dname - since 1.9.16p2 - not sure of reason (jra) */
+ || fname_equal(name, name2))
{
/* we've found the file, change it's name and return */
if (docache) DirCacheAdd(path,name,dname,SNUM(cnum));