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

158 Commits

Author SHA1 Message Date
Jeremy Allison
79c8b75671 s3: libsmb: Add uint16_t addtional_flags2 to cli_smb_req_create().
Not yet used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-08-19 20:03:12 +02:00
Michael Adam
476672b647 dlist: remove unneeded type argument from DLIST_ADD_END()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:17 +01:00
Mathieu Parent
c315fce17e Fix various spelling errors
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Nov  6 13:43:45 CET 2015 on sn-devel-104
2015-11-06 13:43:45 +01:00
Ross Lagerwall
f73bcf4934 s3: libsmbclient: Add server-side copy support
Introduce a new operation, splice, which copies data from one SMBCFILE
to another. Implement this operation using FSCTL_SRV_COPYCHUNK_WRITE for
SMB2+ protocols and using read+write for older protocols. Since the
operation may be long running, it takes a callback which gets called
periodically to indicate progress to the application and given an
opportunity to stop it.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-29 02:37:18 +02:00
Volker Lendecke
d87fd39501 Use tevent_req_poll_ntstatus
Kill 41 lines ..

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-18 02:34:24 +02:00
Stefan Metzmacher
ccf7b37191 s3:libsmb: add support for SMB2 in cli_writeall()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
a85d4511e6 s3:libsmb: add SMB2 support to cli_pull*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
6896bf0b28 s3:libsmb: add SMB2 support to cli_push*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
9193a58375 s3:libsmb: remove unused cli_readall*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:06 +02:00
Stefan Metzmacher
8062aefbe3 s3:libsmb: rewrite cli_pull* to use smb1cli_conn_req_possible()
This works out if it's possible to ship the next request dynamically
instead of relying on fixed values.

The default window size is 16 MByte.

We limit the number of outstanding chunks/requests to 256.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:06 +02:00
Stefan Metzmacher
b846b3acd2 s3:libsmb: rewrite cli_push* to use smb1cli_conn_req_possible()
This works out if it's possible to ship the next request dynamically
instead of relying on fixed values.

The default window size is 16 MByte.

We limit the number of outstanding chunks/requests to 256.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:06 +02:00
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