David Disseldorp
2c7c3fd2d6
torture: add more [no-]compress-on-open ioctl tests
...
compress_create_with_attr: Specifies the FILE_ATTRIBUTE_COMPRESSED
attribute at create time, then checks the created file.
compress_inherit_disable: Creates under a compressed directory, a file
with the NTCREATEX_OPTIONS_NO_COMPRESSION option. Then checks that the
newly created file doesn't inherit the parent compression state.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:45 -07:00
David Disseldorp
337a94f756
torture: add file_attribs arg to file create helper
...
Allows for the testing of file creation with FILE_ATTRIBUTE_COMPRESSED.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:41 -07:00
David Disseldorp
0ad2ca98ce
torture: add compressed file attribute ioctl test
...
After marking a file for compression via FSCTL_SET_COMPRESSION, the
FILE_ATTRIBUTE_COMPRESSED flag should be present. Test for this.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:37 -07:00
David Disseldorp
e1b45869de
torture: check for filesystem compression capability
...
Only run the compression tests if the compression capability is returned
by the server in response to an SMB2_QUERY_INFO(FS attribute info)
request.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:34 -07:00
David Disseldorp
f47ff9d227
torture: extend FSCTL_[GET/SET]_COMPRESSION tests
...
Check for inheritance of compression attributes from parent directories.
Also, test error handling for invalid requests.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:17 -07:00
Stefan Metzmacher
b706ca6e55
s3:libsmb: call smb2cli_logoff() from cli_ulogoff()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 15 10:53:21 CEST 2013 on sn-devel-104
2013-08-15 10:53:21 +02:00
Stefan Metzmacher
1d7bdfc4fe
s3:libsmb: make cli_ulogoff_send/recv static
...
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
e6be68fb5e
s3:libsmb: call smb2cli_tdis() from cli_tdis()
...
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
d732e9aab3
s3:libsmb: only set tcon to invalid in smb2cli_tdis*
...
This matches the behavior of cli_tdis*.
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
80d4f64352
s3:libsmb: make cli_tdis_send/recv static
...
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
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
Jeremy Allison
80758e4b07
s3:libsmb: Plumb cli_smb2_set_security_descriptor() inside cli_set_security_descriptor().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
1db7e90451
s3:libsmb: Plumb cli_smb2_query_security_descriptor() inside cli_query_security_descriptor().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
de895bf228
s3:libsmb: Plumb cli_smb2_qpathinfo_alt_name() inside cli_qpathinfo_alt_name().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
cba3ed0466
s3:libsmb: Plumb cli_smb2_qpathinfo_basic() inside cli_qpathinfo_basic().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
2bb3e251d5
s3:libsmb: Plumb cli_smb2_qfileinfo_basic() inside cli_qfileinfo_basic().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
e96309ca1b
s3:libsmb: Plumb cli_smb2_qpathinfo_streams() inside cli_qpathinfo_streams().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
f2f566b1cc
s3:libsmb: Plumb cli_smb2_qpathinfo2() inside cli_qpathinfo2().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
73255d3ba9
s3:libsmb: Plumb cli_smb2_list() inside cli_list().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
7e2d969deb
s3:libsmb: Plumb cli_smb2_get_ea_list_path() inside cli_get_ea_list_path().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
f8dfc50124
s3:libsmb: Plumb cli_smb2_set_ea_fnum() inside cli_set_ea_fnum().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
3276853e59
s3:libsmb: Plumb cli_smb2_set_ea_path() inside cli_set_ea_path().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
c1aeada4dd
s3:libsmb: Fix cli_set_ea_path() to use frame instead of talloc_tos().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
c6ed0b8831
s3:libsmb: Plumb cli_smb2_dskattr() inside cli_dskattr().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
75d2e18502
s3:libsmb: Plumb cli_smb2_getatr() inside cli_getatr().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
ea267a7e4b
s3:libsmb: Plumb cli_smb2_setatr() inside cli_setatr().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
83c410c99e
s3:libsmb: Plumb cli_smb2_setattrE() inside cli_setattrE().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
0bbc044621
s3:libsmb: Plumb cli_smb2_getattrE() inside cli_getattrE().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
85f60cc3d8
s3:libsmb: Plumb cli_smb2_close_fnum() inside cli_close().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
c1c4491d5e
s3:libsmb: Plumb cli_smb2_create_fnum() inside cli_ntcreate().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
04d396566b
s3:libsmb: Plumb cli_smb2_rmdir() inside cli_rmdir().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
46da267afd
s3:libsmb: Plumb cli_smb2_mkdir() inside cli_mkdir().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
179c27dd02
s3:libsmb: Plumb cli_smb2_unlink() inside cli_unlink().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
c748a959b4
s3:libsmb: Plumb cli_smb2_rename() inside cli_rename().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
28591dfd5d
s3:libsmb: Add in the core of the libsmb client SMB2 functions.
...
These create a synchronous cli_smb2_XXX() style interface
designed to plug directly into the libsmb/cliXXXX.c code.
https://bugzilla.samba.org/show_bug.cgi?id=9974
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
c80349e0fa
s3:lib: Factor read_ea_list_entry() and read_nttrans_ea_list() out so they can be used by the SMB2 client code.
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Stefan Metzmacher
2394f8788d
s3:client: fix compiler warning
...
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
9b4692f2d0
s3:client: use the default io size
...
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
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
7efdc323d1
libcli/smb: add smb2cli_conn_req_possible()
...
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
111f529a2a
libcli/smb: add smb1cli_conn_req_possible()
...
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
44b53937d5
libcli/smb: pass max_dyn_len to smb2cli_req_send()
...
This way we can calculate the correct credit charge
for requests with large output buffers.
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
4a3352020d
libcli/smb: pass max_dyn_len to smb2cli_req_create()
...
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
318735fd5e
libcli/smb: calculate the credit charge on the input and output dyn_len
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
1229881df6
libcli/smb: Change smb2cli_create() and smb2cli_create_recv() to return a parameter blob of the newly opened/created file.
...
Will use in the smb2 client code.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
00f784ec91
libcli/smb: Fix smb2cli_write_recv() and smb2cli_write() to return the bytes written.
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:05 +02:00