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

648 Commits

Author SHA1 Message Date
Jeremy Allison
139c1c3488 r4293: Fix inspired by debug trace from Rob Foehl <rwf@loonybin.net> - catch sendfile
errors correctly and return the correct values we want the caller to return (-1
meaning none in correct cases).
Jeremy.
2007-10-10 10:53:42 -05:00
Jeremy Allison
94779ccb39 r4212: Ensure we only look at the bottom bit of large_readx.
Set the 14 word version of write if size > 0xffff as
well as 64-bit offset.
Jeremy.
2007-10-10 10:53:37 -05:00
Jeremy Allison
63cfa904ad r4190: When changing length calculations, get them right......
Jeremy.
2007-10-10 10:53:37 -05:00
Jeremy Allison
831cb21a87 r4186: Fix client & server to allow 127k READX calls.
Jeremy.
2007-10-10 10:53:36 -05:00
Jeremy Allison
0dd4adeae2 r4143: Make strict locking an enum. Auto means use oplock optimization.
Jeremy.
2007-10-10 10:53:36 -05:00
Jeremy Allison
596f230513 r4108: As check_self is *always* False in every invokation, remove the
logic for it. We still pass Samba4 RAW-LOCK test.
Jeremy.
2007-10-10 10:53:34 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Gerald Carter
88747a7da3 r4018: * move claim_connection from the netbios session request
reply code to the negprot reply code to cope with
  client connections on port 445.  Fixes the spurious
  "register_message_flags: tdb fetch failed" errors.

* don't run the backgroup LPQ daemon when we are running
  in interactive mode.
2007-10-10 10:53:27 -05:00
Jeremy Allison
fbbdb72cf1 r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,
not an existing one.
Jeremy.
2007-10-10 10:53:27 -05:00
Jeremy Allison
65dfae7ea4 r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use consistent
enum type for Protocol extern.
Jeremy.
2007-10-10 10:53:26 -05:00
Jeremy Allison
78236382f7 r3944: Fix the problem we get on Linux where sendfile fails, but we've already sent the
header using send(). As our implementation of sendfile can't return EINTR (it
restarts in that case) use an errno of EINTR to signal the linux sendfile fail
after header case. When that happens send the rest of the data and then turn
off sendfile. Sendfile should be safe to enable on all systems now (even though
it may not help in all performance cases).
Jeremy.
2007-10-10 10:53:26 -05:00
Jeremy Allison
5541001cf9 r3936: Ensure LARGE_READX response must fit within reply buffer.
Jeremy.
2007-10-10 10:53:25 -05:00
Jeremy Allison
f9effa2af9 r3934: Correctly check for the top length bit in LARGE_READX.
Jeremy.
2007-10-10 10:53:25 -05:00
Jeremy Allison
cf7f89999e r3050: Steal from Samba4 :-). Make us pass most of the new lock tests (except for
the cancel lock which I have to add).
Jeremy.
2007-10-10 10:52:59 -05:00
Jeremy Allison
fc51c97ea8 r2575: Return correct error codes on old SEARCH call (from Samba4 torture tester).
Jeremy.
2007-10-10 10:52:47 -05:00
Jeremy Allison
ee8ac9e51a r2219: Remember to count bad_components only on pathname boundaries.
Jeremy.
2007-10-10 10:52:36 -05:00
Jeremy Allison
beda1aee79 r2215: I think I'm really close now. The key is to count the number of
bad components once you've hit one, and keep track of how many
there are (going up a level removes one - maybe it needs to be ./
in order to be removed, need to check). And remember to change the error
code return depending on whether you're called from ff or chkpath.
Jeremy.
2007-10-10 10:52:36 -05:00
Jeremy Allison
294e2021b3 r2194: Here is the efforts of much pain reproducing W2K3 pathname
parsing. :-(. One more check for CreateFile() needed.
Jeremy.
2007-10-10 10:52:35 -05:00
Jeremy Allison
ff20dacc68 r2150: Fix parsing of names ending in dot and a few other error returns
(commit to Samba4 smbtorture will exercise these fixes).
Jeremy.
2007-10-10 10:52:33 -05:00
Gerald Carter
540daf71d8 r1885: tighten the cache consistency with the ntprinters.tdb entry an the in memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags 2007-10-10 10:52:23 -05:00
Jeremy Allison
3cd88f48af r1841: Fix for #1606, can't launch dos exe's.
2 related problems - 1). DOS uses chained commands - when we
are replying with sendfile we neglect to send the chained header. 2). Win9x and
DOS TCP stacks blow up when getting data back from a Linux sendfile - "The
engines canna take the strain cap'n". Don't use sendfile for anything less than NT1.
Jeremy.
2007-10-10 10:52:21 -05:00
Jeremy Allison
1b0c70cf97 r1665: Patch from James Peach @ SGI to stop using sendfile if it isn't
supported by the underlying OS.
Jeremy.
2007-10-10 10:52:18 -05:00
Gerald Carter
430cf63b91 r1570: merging changes from 3.0.5 2007-10-10 10:52:15 -05:00
Jeremy Allison
ec614a8f7d 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.
2007-10-10 10:52:05 -05:00
Jeremy Allison
f17382ad8a r1255: Ensure we check attributes correctly on rename request. Gets us further with
Samba4 RAW-RENAME test.
Jeremy.
2007-10-10 10:52:03 -05:00
Jeremy Allison
5e8237e306 r1115: Fix for #1427. Catch bad path errors at the right point. Ensure all
our pathname parsing is consistent.
Jeremy.
2007-10-10 10:51:56 -05:00
Jeremy Allison
c1b06deb57 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.
2007-10-10 10:51:54 -05:00
Jeremy Allison
894cc6d162 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.
2007-10-10 10:51:54 -05:00
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.
-