1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

676 Commits

Author SHA1 Message Date
Gerald Carter
0c6d7f28d6 r1570: merging changes from 3.0.5
(This used to be commit 430cf63b9148441bce42bfb15a8045de5da108f4)
2007-10-10 10:52:15 -05:00
Jeremy Allison
a003d0e5d2 r1311: Turn on sendfile for non-oplocked files. tridge proved
this is the correct thing to do on a train in Germany :-).
Turn on sendfile by default ! It's about time.....
Jeremy.
(This used to be commit ec614a8f7d158b57f5981c1515962aca3c3e6ef4)
2007-10-10 10:52:05 -05:00
Jeremy Allison
073c542c51 r1255: Ensure we check attributes correctly on rename request. Gets us further with
Samba4 RAW-RENAME test.
Jeremy.
(This used to be commit f17382ad8ad7211bbd34c823d88936a83dceb940)
2007-10-10 10:52:03 -05:00
Jeremy Allison
fddef6fc20 r1115: Fix for #1427. Catch bad path errors at the right point. Ensure all
our pathname parsing is consistent.
Jeremy.
(This used to be commit 5e8237e306f0bb0e492f10fb6487938132899384)
2007-10-10 10:51:56 -05:00
Jeremy Allison
b28d08cc14 r1093: Ensure we clear any cached errors on a deferred open call so
we don't return the wrong error code on the next packet.
Jeremy.
(This used to be commit c1b06deb574d7b8e746bdf0d6f0eab16848a6cc1)
2007-10-10 10:51:54 -05:00
Jeremy Allison
2fc57c9a2c r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm
still doing more testing, but it fixes a behaviour that we've been wrong
on ever since the start of Samba.
Jeremy.
(This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
2007-10-10 10:51:54 -05:00
Volker Lendecke
004618ffcc 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
(This used to be commit 3093ab100653782bd8e029170d315c68b7f271af)
2007-10-10 10:51:50 -05:00
Herb Lewis
99d8aa8b17 r814: conn is 0 during ioctl (at least during smbtorture IOCTL test)
fix smbd panic
(This used to be commit 61da0bb1f6ea22df78ea7bd22a740c5868f62591)
2007-10-10 10:51:47 -05:00
Jeremy Allison
e0da56a848 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.
(This used to be commit 578a508509d21226ad3332fc54c3ab54cd8ae452)
2007-10-10 10:51:30 -05:00
Jeremy Allison
c2699d2546 Fix wildcard src with wildcard dest renames.
Jeremy.
(This used to be commit 58b39942444e62c9d0f98c2ba6f434d74c244a2b)
2004-04-03 01:21:13 +00:00
Jeremy Allison
3d5fdced72 Fix wildcard unlink.
Jeremy.
(This used to be commit 6e9b4c57ccb385acb9feaf9f7412778474231a92)
2004-04-03 00:17:18 +00:00
Jeremy Allison
db44caf191 Fix typo in check_path_syntax.
Jeremy.
(This used to be commit 018db85de4f380da9f8318ab72371185bb2ac5b4)
2004-04-03 00:04:31 +00:00
Jeremy Allison
f16c79732e Fix reply_ctemp - make compatible with w2k3.
Jeremy.
(This used to be commit ddb40a6b1cfed9022dadc627b38d3c3938e8e6b4)
2004-04-02 22:11:08 +00:00
Jeremy Allison
becfb420f7 Fix wildcard identical rename.
Jeremy.
(This used to be commit 610ae1126e227f45a1affa1030ee833a341a687f)
2004-04-02 19:51:27 +00:00
Jeremy Allison
ff469fb2b2 check_path improvements found by samba4 raw-checkpath tests.
Jeremy.
(This used to be commit 4081f7ce514635f3500d29a73a44bff2661b76b1)
2004-04-02 19:05:57 +00:00
Jeremy Allison
722aa118c6 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.
(This used to be commit ed653cd468213e0be901bc654aa3748ce5837947)
2004-04-02 18:46:19 +00:00
Jeremy Allison
41ea0d35ae Remove excess logging when probing for the length of the next mb char.
Jeremy.
(This used to be commit 6339c4690aef7692571dd4c65dd0a12d56a7ffab)
2004-03-17 19:23:48 +00:00
Jeremy Allison
aa2e306a01 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.
(This used to be commit 5a9324525acc02e6bf14528679816b35929a564e)
2004-03-17 02:08:31 +00:00
Jeremy Allison
acad182a3f 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.
(This used to be commit d2b2a39fd2f2e06cc4aebf081876985f0b28b477)
2004-03-16 21:59:11 +00:00
Alexander Bokovoy
e2fd98af57 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.'
'
(This used to be commit 2c404f6ba988d68c6f44df9409c0de319553de10)
2004-03-16 17:18:57 +00:00
Jeremy Allison
fd2d4f87d4 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.
(This used to be commit 966e49a48c352563cdd7f75fe2768f2d6612ec7e)
2004-03-13 00:28:53 +00:00
Alexander Bokovoy
6011a89e24 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.
(This used to be commit 83dac6571f99b854ac607d4313cc3f742c1fae2e)
2004-03-12 14:37:37 +00:00
Jeremy Allison
e3f5b54270 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.
(This used to be commit 7b96765c23637613f079d37566d95d5edd511f05)
2004-03-11 22:48:24 +00:00
Jeremy Allison
83560bfcfa 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.
(This used to be commit 74722f28659ac369676e898fda48d3d9ab265045)
2004-03-11 00:31:47 +00:00
Gerald Carter
f089f978c2 fix build with gcc 2.96 and --with-developer
(This used to be commit 11fc4da07f232c38e04c6443e5d0f829e16b0a18)
2004-03-09 15:29:16 +00:00
Jeremy Allison
3f14e8eb9d 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.
(This used to be commit 8702d0089619c7321b93e59d35f43ef32dce7b78)
2004-03-08 21:54:54 +00:00
Jim McDonough
7dc6dd5884 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. :-)
(This used to be commit dc7dc5175847243d821dd33c1678af1b785dfaf7)
2004-03-04 16:24:13 +00:00
Jeremy Allison
fba5a72249 Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit c9f31fafeda6ad79e590276f36e03ecd2e93f818)
2004-03-03 20:55:59 +00:00
Jeremy Allison
3c1d00d12a More gentest fixes. Fix up regression in IS_NAME_VALID and renames.
Jeremy.
(This used to be commit 367f5c3bc27aafb04f7589b3d4ac5b58189909fb)
2004-02-28 00:56:42 +00:00
Jeremy Allison
fa81d1d7e7 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.
(This used to be commit 3f35e3975f1c46daad1456bc82163acd049d7be8)
2004-02-26 01:31:10 +00:00
Jeremy Allison
fd6b9c02b9 Fixup strange rename error case (gentest).
Jeremy.
(This used to be commit d448fb801e175e11cfc0118325043eef836103f0)
2004-02-25 21:37:22 +00:00
Jeremy Allison
1d9f07735c More gentest fun :-). NB. I'm not fixing OpenX breakage 'cos if you look
at what W2K3 accepts here it's COMPLETELY BROKEN ! :-).
Jeremy.
(This used to be commit 5107f6ee70a9300678ccb7b3c812e23ddf795c22)
2004-02-25 01:35:14 +00:00
Jeremy Allison
01cb68643c More gentest fixes.
Jeremy.
(This used to be commit d34785194cbd7132fc3ca1f4d5561c2eee6009ab)
2004-02-25 00:48:35 +00:00
Jeremy Allison
f96e84c682 Ensure '.' and '..' don't match in delete requests.
Jeremy.
(This used to be commit 1b0d54170a2e3e61fc9bdedec6b10c8b7728a395)
2004-02-24 01:46:24 +00:00
Jeremy Allison
5447f1f467 More gentest error fixups.
Jeremy.
(This used to be commit 00f71fc8361919b87b62389ada8bd9a73f9f98b5)
2004-02-24 00:55:05 +00:00
Jeremy Allison
13dd3e60bd Fixup correct timeout values for blocking lock timeouts (tested at connectathon
by Herb).
Jeremy.
(This used to be commit b38b3a554221a234127c740e6432048e69b7f5a3)
2004-02-24 00:03:18 +00:00
Gerald Carter
575bc995c0 * 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.
(This used to be commit 87343fc15a385153c2205bd8bfe876504d38d9a1)
2004-01-31 18:25:57 +00:00
Jeremy Allison
231124ced9 Fixes to check for wraps which could cause coredumps.
Jeremy.
(This used to be commit ad06edd1bb58cc5e2c38a364b1af96a933b770af)
2003-10-29 21:28:00 +00:00
Jeremy Allison
3a9510acae Fix buggy data_len calculation in echo. Add paranoia debug message.
Jeremy.
(This used to be commit 5332af1124077f49e84836f5cedfbde98336b142)
2003-10-16 18:17:44 +00:00
Jeremy Allison
e7d1e9a9b6 Make us pass Samba4 lock tester (with one different error message).
Jeremy.
(This used to be commit 7622a9dbbded8d07f976ec965adca5e92de3d2b0)
2003-10-10 01:53:38 +00:00
Jeremy Allison
90b147022e Match W2K insanty w.r.t. writelock and writeclose. Samba4 torture tester.
Jeremy.
(This used to be commit c682fae16a2fa18f951c69ba29b1a576f4e27d6b)
2003-10-09 21:04:48 +00:00
Jeremy Allison
e74b6f41cf At least give a message if we're returning a short read for W2K compatibility.
Jeremy.
(This used to be commit 84c993d9cd0bc57a8b8b9aa716af1336620e2c87)
2003-10-09 19:01:31 +00:00
Jeremy Allison
22c0241571 Changes to allow Samba3 to pass the Samba4 RAW-READ tests.
Jeremy.
(This used to be commit e7565dbba696adbb0fd8cca6b86a1a7e5a655f2e)
2003-10-09 01:46:01 +00:00
Jeremy Allison
52f63783bc Fixup error code returns from Samba4 tester. Ensure invalid paths are
validated the same way.
Jeremy.
(This used to be commit 6ad2f0ba27566ab3928ccbbbb3c3a64b09ca139c)
2003-10-08 23:21:36 +00:00
Jeremy Allison
57c863190d 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.
(This used to be commit c11a7e5846002b16d0cb2991b5a7df0636b070d5)
2003-09-29 23:35:41 +00:00
Jeremy Allison
5daacc87b5 Protect against core dump if ioctl for print job sends invalid fid. Found
by Iskantharajah T <is@tracetec.com.my>.
Jeremy.
(This used to be commit a9f9dd71da41801c975303a385ff229788c9498a)
2003-09-08 20:27:28 +00:00
Jeremy Allison
6d6401a67a Implement SMBexit properly. Found by Samba4 tester. You must do a make
clean proto all; after this commit.
Jeremy.
(This used to be commit 27af1f9feab12542dc538bfceac4593e644ba3b4)
2003-08-19 01:53:45 +00:00
Jeremy Allison
c0236e8ae3 Fix flush of 0xFFFF - found by Samba4 tester.
Jeremy.
(This used to be commit 8a5c97fa07eacd4cecb5afd9c197352dfa613b9f)
2003-08-19 01:26:43 +00:00
Jeremy Allison
e83a8a40c8 Don't return DOS error on SMBsearch return if using NT error codes (NT1
protocol level). Fix for Samba4 tester.
Jeremy.
(This used to be commit 74486ab9efbb555f830b0e5d1c88f7bf065ae039)
2003-08-19 01:02:41 +00:00
Jeremy Allison
3a052c9e0a Implemented the level 1010 NT rename level. Many fixes for Samba4 test
correctness.
Jeremy.
(This used to be commit f57429befa43d63ed9a6e19b854e22fd4151db40)
2003-08-16 02:34:03 +00:00