1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

147 Commits

Author SHA1 Message Date
Stefan Metzmacher
40c3db9b6a s3:libsmb: let cli_read_andx_create() accept any length
It's up to the server to decide the allowed length.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20 09:32:25 -07:00
Stefan Metzmacher
d0bca41f48 s3:libsmb: s/struct event_context/struct tevent_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:54 +01:00
Stefan Metzmacher
c8dda78e35 s3:libsmb: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:46 +01:00
Stefan Metzmacher
a868a51eca s3:libsmb: remove unused 'inbuf' variable
metze
2012-06-05 17:33:49 +02:00
Luk Claes
aea996dba6 s3:libsmb: get rid of cli_smb_req_*,cli_smb_wct_ofs,cli_smb_chain_send
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jun  3 23:37:02 CEST 2012 on sn-devel-104
2012-06-03 23:37:02 +02:00
Luk Claes
93ed99d6ff s3:libsmb: get rid of clisigning routines
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:51 +02:00
Luk Claes
f7f73c4dba s3:libsmb: get rid of cli_has_async_calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:50 +02:00
Luk Claes
ab052c7ff0 s3:libsmb: get rid of cli_state_encryption_on
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:47 +02:00
Luk Claes
6c18a66f3e s3:libsmb: get rid of cli_state_max_requests
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:47 +02:00
Luk Claes
3c9c06ac05 s3:libsmb: get rid of cli_state_capabilities
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:46 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Andrew Bartlett
7d14f89e29 s3-libsmb Do not limit read replies to NBT packet sizes
With the posix extensions, we can read 16MB at a time, so we need to check
the full size of the packet, not the size rounded down to the old NBT
limit.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-27 13:36:06 -08:00
Stefan Metzmacher
4b31c4273c s3:libsmb: consistently use state->size in cli_write_andx_create() (bug #5326)
Otherwise we may get unexpected results.

This is a fix that was missing in commit 95595dd93f
(s3:libsmb: fix cli_write_and_x() against OS/2 print shares (bug #5326))

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov  9 10:13:32 CET 2011 on sn-devel-104
2011-11-09 10:13:32 +01:00
Stefan Metzmacher
95595dd93f s3:libsmb: fix cli_write_and_x() against OS/2 print shares (bug #5326)
Print shares doesn't support CAP_LARGE_WRITEX, while it's negotiated
by the file server part.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Nov  8 17:01:36 CET 2011 on sn-devel-104
2011-11-08 17:01:36 +01:00
Volker Lendecke
9881712a09 s3: Further fix for bug 8338
OS/X can not deal with a 10-vwv read on normal files.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Sep 21 00:51:08 CEST 2011 on sn-devel-104
2011-09-21 00:51:08 +02:00
Stefan Metzmacher
28e3d09916 s3:libsmb: s/cli_encryption_on/cli_state_encryption_on()
metze
2011-09-15 16:17:45 +02:00
Stefan Metzmacher
3c6808d5ed s3:libsmb: align chunk_size for cli_pull/push() to a page size of 1024 bytes
s3:libsmb: align chunk_size for cli_pull/push() to a page size of 1024 bytes

metze

Signed-off-by: Jeremy Allison <jra@samba.org>
2011-09-14 13:12:16 -07:00
Stefan Metzmacher
6626c836f3 s3:libsmb: let cli_write_max_bufsize() return the max number of possible bytes
s3:libsmb: let cli_write_max_bufsize() return the max number of possible bytes

We now return what's possible on the wire.

Which is 0x1FFFF - data_offset if CAP_LARGE_WRITEX is given by
the server (without signing) or 0xFFFFFF - data_offset
if CIFS_UNIX_LARGE_READ_CAP is available (without signing/sealing).
Otherwise we return max_xmit - data_offset.

metze

Signed-off-by: Jeremy Allison <jra@samba.org>
2011-09-14 13:09:36 -07:00
Stefan Metzmacher
4c9b1841ed s3:libsmb: let cli_read_max_bufsize() return the max number of possible bytes
s3:libsmb: let cli_read_max_bufsize() return the max number of possible bytes

We now return what's possible on the wire.

Which is 0xFFFF if CAP_LARGE_READX is given by the server
or 0xFFFFFF - data_offset if CIFS_UNIX_LARGE_READ_CAP
is available (without signing/sealing). Otherwise we return
max_xmit - data_offset.

metze

Signed-off-by: Jeremy Allison <jra@samba.org>
2011-09-14 12:57:33 -07:00
Stefan Metzmacher
7c405fd92c s3:libsmb: make use of cli_state_max_requests() in cli_push_send()
metze
2011-09-13 18:12:23 +02:00
Stefan Metzmacher
c5072534bc s3:libsmb: make use of cli_state_max_requests() in cli_pull_send()
metze
2011-09-13 18:12:23 +02:00
Stefan Metzmacher
a4548efe67 s3:libsmb: make use of cli_state_available_size() in cli_smbwrite()
metze
2011-09-13 13:16:09 +02:00
Stefan Metzmacher
96fc0d6018 s3:libsmb: make use of cli_state_available_size() in cli_write_max_bufsize()
metze
2011-09-13 13:16:09 +02:00
Stefan Metzmacher
c887e37275 s3:libsmb: make use of cli_state_available_size() in cli_read_max_bufsize()
metze
2011-09-13 13:16:09 +02:00
Stefan Metzmacher
6e8a6e033f s3:libsmb/cli*: make use of cli_state_capabilities()
metze
2011-08-02 04:54:28 +02:00
Björn Baumbach
40e9d0c440 s3-libsmb: finally remove cli_read_old()
Replaced by new cli_read() which returns NTSTATUS instead of ssize_t.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Björn Baumbach
8c360d7f76 s3-libsmb: introduce new NTSTATUS cli_read()
Replacement for cli_read_old()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Björn Baumbach
9b168e128a s3-libsmb: replace cli_read() with cli_read_old()
Will introduce new cli_read() function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Volker Lendecke
c31871264c s3: Allow NULL for arg pwritten in cli_write_andx 2011-07-03 11:31:29 +02:00
Stefan Metzmacher
f0ba1afe5f s3:libsmb/clireadwrite: calculate cli_write_max_bufsize() correct based on max_xmit
This is important in order to support DCERPC over ncacn_np against NT4 servers,
where max_xmit is just 4356.

metze
2011-06-10 19:27:05 +02:00
Stefan Metzmacher
73128b7cc7 s3:libsmb/clireadwrite: calculate cli_read_max_bufsize() correct based on max_xmit
This is important in order to support DCERPC over ncacn_np against NT4 servers,
where max_xmit is just 4356.

metze
2011-06-10 19:27:05 +02:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Volker Lendecke
0645deb1b4 s3: Do central cli_set_error 2011-05-19 17:31:30 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Jeremy Allison
e131c94ac1 More const fixes for compiler warnings from the waf build. 2011-05-05 23:56:07 +02:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Volker Lendecke
ca9ac7c4c7 s3: Remove cli_write
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-26 12:22:55 -07:00
Volker Lendecke
d018fccb70 s3: Add cli_writeall
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-26 12:22:55 -07:00
Volker Lendecke
10a552a957 s3: Use tevent_req_nterror properly in a few places 2011-04-16 15:34:58 +02:00
Günther Deschner
99f4a64543 s3-trans2: only include trans2.h where needed.
Guenther
2011-03-30 01:13:06 +02:00
Volker Lendecke
5d9075c049 s3: Remove a use of cli_send_smb 2011-03-27 19:04:10 +02:00
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