1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

104 Commits

Author SHA1 Message Date
Jeremy Allison
0afb2995a2 Fix bug #7791 - gvfsd-smb (Gnome vfs) fails to copy files from a SMB share using SMB signing.
The underlying problem is that the old code invoked by cli_write() increments
cli->mid directly when issuing outstanding writes. This should now be done only
in libsmb/clientgen.c to make metze's new signing engine works correctly. Just
deleting this code fixes the problem.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Nov 11 02:50:08 UTC 2010 on sn-devel-104
2010-11-11 02:50:08 +00:00
Günther Deschner
c7fe04abc7 s3-build: only include async headers where needed.
Guenther
2010-09-20 13:54:42 -07:00
Günther Deschner
ecc3413bf5 s3-libsmb: fix argument order for tevent_req_default_print in cli_pull_print().
Andreas, please check.

Guenther
2010-05-09 00:42:54 +02:00
Andreas Schneider
9e94354a4e s3-libsmb: Fixed a recursion in cli_pull_print. 2010-05-05 09:28:04 +02:00
Jeremy Allison
f3b8e31f83 Split out the client unix capabilities to those the server offered, and those the client asked for.
This fixes a bug when using encrypted transport and DFS links. Found
by my basic DFS torture test, which I'll check in next. Testing *rocks* :-).

Jeremy.
2010-04-13 18:41:14 -07:00
Volker Lendecke
964210b89a s3: Explicitly handle inbuf in cli_write_andx_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
78d7f27993 s3: Explicitly handle inbuf in cli_read_andx_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
d122bfc064 s3: Add a talloc_move for the inbuf to cli_smb_recv 2010-02-22 23:23:18 +01:00
Björn Jacke
60a3086d78 s3: remove unused variable 2010-01-26 00:19:10 +01:00
Volker Lendecke
24309bdb2e Second part of bug fix for 6606.
s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled
2009-09-14 19:09:54 -07:00
Volker Lendecke
1f34ffa0ca s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled 2009-09-14 07:13:22 +02:00
Volker Lendecke
4b49a8debc s3:libsmb: Convert (state->received) to (state->received != 0)
This confused me for a second, this should not happen a second time :-)
2009-09-05 12:52:48 +02:00
Jeremy Allison
33d27797d3 Fix Red Hat bugzilla bug : https://bugzilla.redhat.com/show_bug.cgi?id=516165
nautilus fails to copy files from an SMB share. This is a show-stopper
for 3.4.1 (I'll open a Samba.org bug). Although gnome-vfs is doing
*incredibly* stupid things by asking for a read size of 65535 - this
translates on the wire to a 65534 byte read followed by a 1 byte
read. Please send this back to the gnome developers that they
will ge horrid on the wire performance for this.
Jeremy.
2009-08-19 15:33:08 -07:00
Bo Yang
05379f0125 s3: return proper error code in cli_smb_req_send
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13 18:47:00 +08:00
Jeremy Allison
ad9d64ee1b Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
Jeremy.
2009-05-12 11:45:37 -07:00
Jeremy Allison
8cf78ff553 Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
2009-04-30 15:26:43 -07:00
Volker Lendecke
cf7d26933b Convert cli_push to tevent_req
Metze, please check!

Thanks,

Volker
2009-04-08 23:11:59 +02:00
Volker Lendecke
9c89aee5f3 Convert cli_pull to tevent_req 2009-04-08 23:11:59 +02:00
Volker Lendecke
ad695b2525 Streamline cli_push sync wrapper 2009-04-06 21:32:07 +02:00
Volker Lendecke
097db28c5d Convert cli_write_andx to tevent_req 2009-04-06 21:32:07 +02:00
Volker Lendecke
17b8d05b62 Streamline cli_pull sync wrapper 2009-04-06 21:32:07 +02:00
Volker Lendecke
c23ccff13a Convert cli_read_andx to tevent_req 2009-04-06 21:32:07 +02:00
Stefan Metzmacher
2fdbafbf54 Revert "s3:libsmb: add an option to cli_push to let the caller provide the buffers"
This reverts commit 9579a6f193.

It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.

We can readd a extra function later.

metze
2009-03-12 11:03:50 +01:00
Stefan Metzmacher
9579a6f193 s3:libsmb: add an option to cli_push to let the caller provide the buffers
metze
2009-03-10 14:07:56 +01:00
Stefan Metzmacher
c2993f74af s3:libsmb: only treat a return 0 as end of file
metze
2009-03-10 12:46:16 +01:00
Stefan Metzmacher
7fc8086e11 s3:libsmb: fix a lot of cli_push() bugs
There were the following problems:
1.) if window_size was a multiple of the chunk_size,
    we silently dropped the last truncated chunk.
2.) if window_size was 0 pushed only the first chunk
    to the server and silently dropped the rest.
3.) we had only transferred state->num_reqs writes,
    even if there would be more data to send.

metze
2009-03-10 11:03:15 +01:00
Volker Lendecke
d3f9b0fab6 Next step disentangling async_req from NTSTATUS
Now I need to document this :-)
2009-02-02 20:15:03 +01:00
Volker Lendecke
c14b7e648b Split up async_req into a generic and a NTSTATUS specific part 2009-02-01 19:05:39 +01:00
Volker Lendecke
0dbd396862 Add a macro async_req_setup()
This streamlines setting up a multi-step async request a bit
2009-01-18 16:45:07 +01:00
Volker Lendecke
27abf6731e struct async_req doesn't really need to carry an event_context 2009-01-03 19:07:57 +01:00
Volker Lendecke
9f31468bd3 Add async cli_write_andx and cli_pull 2008-12-19 23:16:25 +01:00
Volker Lendecke
4abdd3981e Pass "bytes_alignment" up through cli_request_send
This parameter makes smb_spice_chain add padding before the bytes field
2008-12-19 14:53:29 +01:00
Volker Lendecke
42e407b300 Factor out cli_write_max_bufsize 2008-12-19 13:34:26 +01:00
Volker Lendecke
fd2bac9667 For read&x replies, check the offset 2008-12-13 10:30:02 +01:00
Volker Lendecke
7fbb64d726 Simplify async programming a bit with helper routines
Introduce async_req_is_error() and async_req_simple_recv()
2008-12-08 22:09:33 +01:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Volker Lendecke
f294f51bf0 Remove cli_request_get()
req->private_data==NULL at this point is definitely a bug.
(This used to be commit ce3dc9f616)
2008-08-28 18:22:49 +02:00
Volker Lendecke
128524930d Add cli_pull_reply
Along the lines of cli_request_send this abstracts away the smb-level buffer
handling when parsing replies we got from the server.
(This used to be commit 253134d3aa)
2008-08-28 17:53:37 +02:00
Volker Lendecke
2650207d4a Remove cli->event_ctx, pass it explicitly
Storing the event_context as permanent state in struct cli_state creates more
complex code than necessary IMO.
(This used to be commit debb37f703)
2008-08-28 17:53:37 +02:00
Volker Lendecke
58aa97c0d9 Refactoring: Add the routine cli_request_send()
cli_request_send() is supposed to bundle all generic SMB-header handling. This
makes cli_request_new static to async_smb.c.
(This used to be commit 7e73dd4e76)
2008-08-28 17:53:36 +02:00
Volker Lendecke
1924e7931c Revert "Protect against short read&x replies"
This reverts commit 4ed73cbbbe.

... how did this end up here??

Volker
(This used to be commit 7dd9fd0956)
2008-08-23 15:41:00 +02:00
Volker Lendecke
56cd17dfe1 Protect against short read&x replies
(This used to be commit 4ed73cbbbe)
2008-08-23 15:12:39 +02:00
Volker Lendecke
711efc06c8 cli_request_new() already gave use the req, remove a pointless function call
(This used to be commit 08e97bd369)
2008-08-01 20:46:10 +02:00
Jeremy Allison
d36434f312 Security fix for CVE-2008-1105: Boundary failure when parsing SMB responses
can result in a buffer overrun.
Jeremy.
(This used to be commit 23b825e9d2)
2008-05-28 09:31:42 -07:00
Jeremy Allison
b04bcefc58 Fix bug #5479, print spool shares require max_xmit to
be adhered to.
Jeremy.
(This used to be commit 478a359ede)
2008-05-21 12:39:08 -07:00
Volker Lendecke
b7d2e94296 Fix bug 5399
Thanks to Jason Mader!

Volker
(This used to be commit 36740f4959)
2008-04-19 17:04:09 +02:00
Jeremy Allison
d1e99642f7 Fix bug #5326 - OS/2 servers give strange "high word" replies for print jobs.
Jeremy.
(This used to be commit d090d25cb7)
2008-03-28 10:12:07 -07:00
Volker Lendecke
8f6b03b673 More ssize_t->SMB_OFF_T
(This used to be commit 8dd6458049)
2008-03-28 15:32:02 +01:00
Volker Lendecke
4b3351e5dc On Solaris, size_t seems to be only 32 bit.
Fix bug 5341, thanks a lot to Karoly Vegh for testing it!

Volker
(This used to be commit 19eb8c9316)
2008-03-21 13:41:42 +01:00
Volker Lendecke
b2ec8372ba !NT_STATUS_IS_OK != NT_STATUS_IS_ERR
When reading from a pipe, Windows return STATUS_BUFFER_OVERFLOW which is *not*
an error.
(This used to be commit 24018d882d)
2008-03-19 22:38:13 +01:00