1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-21 03:17:08 +03:00

820 Commits

Author SHA1 Message Date
Volker Lendecke
3093ab1006 r942: If using DOS error codes, we need to return ERRDOS/ERRbadpath for chkpth even
if only the last component failed. I'm not sure if all the other cases of
NT_STATUS_OBJECT_NAME_NOT_FOUND also need to be fixed, this at least helps
with 'copy test1.txt test2.txt' from DOS within a subdirectory.

Yes, I do have someone who needs this :-)

Jeremy, could you take a look at this?

Thanks,

Volker
2007-10-10 10:51:50 -05:00
Herb Lewis
61da0bb1f6 r814: conn is 0 during ioctl (at least during smbtorture IOCTL test)
fix smbd panic
2007-10-10 10:51:47 -05:00
Jeremy Allison
578a508509 r570: Remove lots of globals to handle case issues - move them
to connection struct entries (as they should have been from
the start). Jerry, once you've cut over to 3.0.4 release
branch I'll add this to 3.0 also.
- Jerry cut over :-).
Jeremy.
2007-10-10 10:51:30 -05:00
Jeremy Allison
58b3994244 Fix wildcard src with wildcard dest renames.
Jeremy.
-
Jeremy Allison
6e9b4c57cc Fix wildcard unlink.
Jeremy.
-
Jeremy Allison
018db85de4 Fix typo in check_path_syntax.
Jeremy.
-
Jeremy Allison
ddb40a6b1c Fix reply_ctemp - make compatible with w2k3.
Jeremy.
-
Jeremy Allison
610ae1126e Fix wildcard identical rename.
Jeremy.
-
Jeremy Allison
4081f7ce51 check_path improvements found by samba4 raw-checkpath tests.
Jeremy.
-
Jeremy Allison
ed653cd468 Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but
modified somewhat to cover all cases.
Jeremy.
-
Jeremy Allison
6339c4690a Remove excess logging when probing for the length of the next mb char.
Jeremy.
-
Jeremy Allison
5a9324525a Change check_path_syntax() to use the new next_mb_char_size() function
to make it generic. Remove the mb-codepage "blacklist". Alexander, please
check this fix as it reverts your blacklist changes, but I'm hoping it
fixes the problem in a more generic way for all charsets. I'm not trying
to trample on your (excellent!) work here, just make things more generic
without special cases.
Jeremy.
-
Jeremy Allison
d2b2a39fd2 Add function next_mb_char_size() that returns a size_t of the number of
bytes in the mb character at a pointer. Will be useful in fixing check_path_syntax()
to not use a "blacklist". Also re-added my (C) to reply.c. I mean, really - I've
been adding code to the file for over 10 years and I recognise many of the
fuctions as mine ! :-).
Jeremy.
-
Alexander Bokovoy
2c404f6ba9 Fix check_path_syntax() for multibyte encodings which have no '\' as second byte.
This is intermediate fix as discussed with Jeremy until we move check_path_syntax() to UCS2 internally where all
ambiguity is resolved. Please add other encodings into charcnv.c with such property.'
'
-
Jeremy Allison
966e49a48c First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
-
Alexander Bokovoy
83dac6571f Fix problems with very long filenames in both smbd and smbclient.
It appears that we pass filename through resolve_wildcards() as pstring and use fstring temporary buffer there.
As result, a long filename in unix charset (UTF-8 by default) can easily expand over 255 bytes while
Windows is able to send to us such names (e.g. Japanese name of ~190 mb chars) which we unable to process through
this small fstring buffer. Tested with W2K and smbclient, Japanese and Cyrillics.
-
Jeremy Allison
7b96765c23 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
-
Jeremy Allison
74722f2865 Fix processing of pathnames with embedded '\\' characters (0x5c) in CP932
character set. Because of the allowing of "broken conversions" for people
who have broken iconv libraries we can't rely on the return from convert_string()
to be valid - we must check errno instead. This is ripe for revisiting at
some stage. I prefer adding a bool parameter to all convert_string_XX varients
to specify if we will allow broken conversions or not. With "allow_broken_conversions"
set to false we could then rely on the return from convert_string rather than
checking errno.
Jeremy.
-
Gerald Carter
11fc4da07f fix build with gcc 2.96 and --with-developer -
Jeremy Allison
8702d00896 Fix assumption about following directory sep in check_path_syntax(). We
need to try and convert 1 byte, then 2 bytes if that fails. Fixes bug
reported by Simo.
Jeremy.
-
Jim McDonough
dc7dc51758 Fix build farm, older compilers won't let you declare variables
right in the middle of the code.

I just love catching jra on stuff like this, after all the crap
I've done. :-)
-
Jeremy Allison
c9f31fafed Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
-
Jeremy Allison
367f5c3bc2 More gentest fixes. Fix up regression in IS_NAME_VALID and renames.
Jeremy.
-
Jeremy Allison
3f35e3975f Interesting fact found by IFSTEST /t LockOverlappedTest...
Even if it's our own lock context, we need to wait here as
there may be an unlock on the way.
So I removed a "&& !my_lock_ctx" from the following
if statement.

if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {

Jeremy.
-
Jeremy Allison
d448fb801e Fixup strange rename error case (gentest).
Jeremy.
-
Jeremy Allison
5107f6ee70 More gentest fun :-). NB. I'm not fixing OpenX breakage 'cos if you look
at what W2K3 accepts here it's COMPLETELY BROKEN ! :-).
Jeremy.
-
Jeremy Allison
d34785194c More gentest fixes.
Jeremy.
-
Jeremy Allison
1b0d54170a Ensure '.' and '..' don't match in delete requests.
Jeremy.
-
Jeremy Allison
00f71fc836 More gentest error fixups.
Jeremy.
-
Jeremy Allison
b38b3a5542 Fixup correct timeout values for blocking lock timeouts (tested at connectathon
by Herb).
Jeremy.
-
Gerald Carter
87343fc15a * BUG 101: patch from j.lu@tiesse.com to set the SV_TYPE_PRINTQ_SERVER;
* don't set the unix_ERR_XX code in mkdir_internal, let the error mapping
  handle it.
-
Jeremy Allison
ad06edd1bb Fixes to check for wraps which could cause coredumps.
Jeremy.
-
Jeremy Allison
5332af1124 Fix buggy data_len calculation in echo. Add paranoia debug message.
Jeremy.
-
Jeremy Allison
7622a9dbbd Make us pass Samba4 lock tester (with one different error message).
Jeremy.
-
Jeremy Allison
c682fae16a Match W2K insanty w.r.t. writelock and writeclose. Samba4 torture tester.
Jeremy.
-
Jeremy Allison
84c993d9cd At least give a message if we're returning a short read for W2K compatibility.
Jeremy.
-
Jeremy Allison
e7565dbba6 Changes to allow Samba3 to pass the Samba4 RAW-READ tests.
Jeremy.
-
Jeremy Allison
6ad2f0ba27 Fixup error code returns from Samba4 tester. Ensure invalid paths are
validated the same way.
Jeremy.
-
Jeremy Allison
c11a7e5846 Take care of condition where DOS and NT error codes must differ. Found by
DOS program test by Amir Hardon <hardon@actcom.co.il>.
Jeremy.
-
Jeremy Allison
a9f9dd71da Protect against core dump if ioctl for print job sends invalid fid. Found
by Iskantharajah T <is@tracetec.com.my>.
Jeremy.
-
Jeremy Allison
27af1f9fea Implement SMBexit properly. Found by Samba4 tester. You must do a make
clean proto all; after this commit.
Jeremy.
-
Jeremy Allison
8a5c97fa07 Fix flush of 0xFFFF - found by Samba4 tester.
Jeremy.
-
Jeremy Allison
74486ab9ef Don't return DOS error on SMBsearch return if using NT error codes (NT1
protocol level). Fix for Samba4 tester.
Jeremy.
-
Jeremy Allison
f57429befa Implemented the level 1010 NT rename level. Many fixes for Samba4 test
correctness.
Jeremy.
-
Jeremy Allison
97e1d5c957 Fix changing of attributes via setattr. Samba4 test fixes.
Jeremy.
-
Jeremy Allison
10d90171ed Fix SMBseek and get/set position information SMBs. Works against
Samba4 tester. You will need a make clean; make all after this !
Jeremy.
-
Jeremy Allison
00a57b0953 Better path checking for chkpth. We now pass Samba4 chkpath and unlink.
Jeremy.
-
Jeremy Allison
a62cf6bf16 More chkpth fixes from Samba4 tests.
Jeremy.
-
Jeremy Allison
73aaf8094c Ensure we pass the Samba4 unlink test !
Jeremy.
-
Jeremy Allison
9bc0e4fe04 Fix another error code return against Samba4 test suite... Don't allow
a path above root.
Jeremy.
-