diff --git a/source/Makefile.in b/source/Makefile.in index 48f597c9fc3..f0cc4d30ee8 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -288,7 +288,7 @@ uninstallcp: @$(SHELL) $(srcdir)/script/uninstallcp.sh $(CODEPAGEDIR) $(CODEPAGELIST) clean: - rm -f core */*.o */*~ *~ config.cache bin/* + rm -f core */*.o */*~ *~ config.cache bin/[!C]* proto: @echo rebuilding include/proto.h diff --git a/source/include/smb.h b/source/include/smb.h index f8a055ad487..bc44fbdd2b6 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -144,10 +144,10 @@ BOOL dbgtext(); #define DEBUG( level, body ) \ ((DEBUGLEVEL>=(level) && \ dbghdr(level, FILE_MACRO, FUNCTION_MACRO, (__LINE__)))? \ - (void)dbgtext body:0) + (void)(dbgtext body) : (void)0) #define DEBUGADD( level, body ) \ - (DEBUGLEVEL>=(level)?(void)dbgtext body:0); + (DEBUGLEVEL>=(level)?(void)(dbgtext body) : (void)0); /* End Debugging code section. * -------------------------------------------------------------------------- ** diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 7f34187bd6d..84cd99c91f6 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -945,6 +945,16 @@ resume_key = %d resume name = %s continue=%d level = %d\n", SeekDir(dirptr, current_pos); dname = ReadDirName(dirptr); + + /* + * Remember, name_map_mangle is called by + * get_lanman2_dir_entry(), so the resume name + * could be mangled. Ensure we do the same + * here. + */ + + name_map_mangle( dname, False, SNUM(cnum)); + if(dname && strcsequal( resume_name, dname)) { SeekDir(dirptr, current_pos+1); @@ -963,6 +973,15 @@ resume_key = %d resume name = %s continue=%d level = %d\n", SeekDir(dirptr, start_pos); for(current_pos = start_pos; (dname = ReadDirName(dirptr)) != NULL; SeekDir(dirptr,++current_pos)) { + /* + * Remember, name_map_mangle is called by + * get_lanman2_dir_entry(), so the resume name + * could be mangled. Ensure we do the same + * here. + */ + + name_map_mangle( dname, False, SNUM(cnum)); + if(strcsequal( resume_name, dname)) { SeekDir(dirptr, current_pos+1);