diff options
author | Jeremy Allison <jra@samba.org> | 1998-08-10 20:12:53 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-08-10 20:12:53 +0000 |
commit | 17fb3a2304d3f9eaa314c90b476d153b5f333f31 (patch) | |
tree | 6699f86ad800a503d1e41c4b7af7db3ca40a1755 | |
parent | 670c6addc322e69b86975fc4024c88a885b63d9f (diff) | |
download | samba-17fb3a2304d3f9eaa314c90b476d153b5f333f31.tar.gz samba-17fb3a2304d3f9eaa314c90b476d153b5f333f31.tar.bz2 samba-17fb3a2304d3f9eaa314c90b476d153b5f333f31.zip |
Makefile.in: Fixed make clean bug with CVS directory in bin/.
include/smb.h: Fixed bugs in Debug macro's with SGI compiler.
smbd/trans2.c: Fixed bug reported by Zoltan Palmai <ZSPA@chevron.com>
PR#8903 where get_lanman2_dir_entry() could return a
mangled name as a resume key and call_trans2findnext()
wasn't doing the same.
Jeremy.
(This used to be commit 9d010e721c27af1d9498fd1e147993ba8ac8b41e)
-rw-r--r-- | source3/Makefile.in | 2 | ||||
-rw-r--r-- | source3/include/smb.h | 4 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 19 |
3 files changed, 22 insertions, 3 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 48f597c9fc..f0cc4d30ee 100644 --- a/source3/Makefile.in +++ b/source3/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/source3/include/smb.h b/source3/include/smb.h index f8a055ad48..bc44fbdd2b 100644 --- a/source3/include/smb.h +++ b/source3/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/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7f34187bd6..84cd99c91f 100644 --- a/source3/smbd/trans2.c +++ b/source3/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); |