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

99485 Commits

Author SHA1 Message Date
Christof Schmitt
1d25a51591 sharesec: Remove error message for unmarshall_sec_desc failure
In a cluster setup, running sharesec -D results in an empty record that
triggers this message. The situation is correctly handled in the code
(unmarshall_sec_desc fails and sharesec uses the default), so simply
remove the message in this case.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-06 20:19:12 +02:00
Volker Lendecke
589de04178 docs: Document smbclient "notify" command
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul  3 18:30:21 CEST 2015 on sn-devel-104
2015-07-03 18:30:21 +02:00
Stefan Metzmacher
9ebf3804eb lib/util:charset/tests: improve strlen_m[_term[_null]]() testing
They differ in their "" vs. NULL handling.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jul  3 05:02:45 CEST 2015 on sn-devel-104
2015-07-03 05:02:45 +02:00
Stefan Metzmacher
bf6f032094 lib/util: let strlen_m_term[_null]() use strlen_m_ext_term[_null]()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
cd8bcecf18 lib/util: add strlen_m_ext_term_null() helper function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
3cdac4a855 s4:pyrpc: remove pointless alter_context() method
This will always result in a rpc protocol error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
84993440aa python:samba/tests: don't use the x.alter_context() method in dcerpc/bare.py
Establishing a new context on a given connection using alter_context
is supposed to be done by using y = ClientConnection(..., basis_connection=x)

The current x.alter_context() can work as it's not allowed to
change the abstract or transfer syntax of an existing presentation
context.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
828e1d3f83 s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED in torture_rpc_alter_context()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
58a874111b s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED when a dcerpc connection is not connected
We still also allow NT_STATUS_INVALID_HANDLE and NT_STATUS_IO_DEVICE_ERROR for now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
7e095eb334 libcli/smb: let tstream_smbXcli_np report connection errors as EPIPE instead of EIO
This maps to NT_STATUS_CONNECTION_DISCONNECTED instead of
NT_STATUS_IO_DEVICE_ERROR.

EPIPE, NT_STATUS_CONNECTION_DISCONNECTED matches what other tstream backends
e.g. tcp and unix report.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
793af3f2ae s3:winbindd: use check dcerpc_binding_handle_is_connected() instead of a specific status
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
24ea9175f4 python/samba/tests: add fallbacks for assert{Less,Greater}[Equal]()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
c7e9968cf8 python/samba/tests: let the output of hexdump() match our C code in dump_data_cb()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
7a07f6a764 python/samba/tests: move hexdump() from DNSTest to TestCase
This is useful in a lot of test cases.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
2b163012aa librpc/ndr: make use of dump_data_cb() in ndr_dump_data()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
4a0370bdfd lib/util: fix output format in dump_data*()
This changes:

  [0000] 4E 54 4C 4D 53 53 50 00   01 00 00 00 05 82 08 60   NTLMSSP. .......`
  [0010] 09 00 09 00 20 00 00 00   00 00 00 00 29 00 00 00   .... ... ....)...
  [0020] 57 4F 52 4B 47 52 4F 55   50                       WORKGROU P

into:

  [0000] 4E 54 4C 4D 53 53 50 00   01 00 00 00 05 82 08 60   NTLMSSP. .......`
  [0010] 09 00 09 00 20 00 00 00   00 00 00 00 29 00 00 00   .... ... ....)...
  [0020] 57 4F 52 4B 47 52 4F 55   50                        WORKGROU P

Note the alignment of 'WORKGROU P'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
8c9612e114 s4:pyrpc: add base.bind_time_features_syntax(features)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
e1498ac674 librpc/rpc: add dcerpc_[extract|construct]_bind_time_features()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
18dce19ef9 librpc/rpc: add dcerpc_fault_from_nt_status()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
1eef708729 librpc/rpc: add faultcode to nt_status mappings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
cb8c156671 midltests: add valid/midltests_DRS_EXTENSIONS.*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
f3f1c38925 auth/credentials: anonymous should not try to use kerberos
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-03 02:00:28 +02:00
Stefan Metzmacher
ebfb1e9dac s4:ntvfs/ipc: fix ipc_close()
Until now this always returned NT_STATUS_INVALID_LEVEL
for everything but RAW_CLOSE_CLOSE.

Now it maps everything correctly to RAW_CLOSE_GENERIC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:28 +02:00
Günther Deschner
d1e81df36e s4-torture: pull, push and compare a witness Notify struct in ndr test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
f0156ca154 s4-torture: add new torture_suite_add_ndr_pullpush_fn_test_flags().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
6d3f7620d2 s4-torture: add torture_ndr_push_struct_blob_flags() in order to manipulate push flags.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
c82aed878e libndr: reformat libndr torture_suite macros to make differences more visible.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
c328ade5cd s4-torture: using async dcerpc for witness async notifications.
This test toggles the online/offline resource state using the clusapi protocol
between the send and receive.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
e3cb9f721d lib/torture: be more verbose about ndr failures.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
6aeb0a08ab s4-torture: move torture_assert_sid_equal() out of ndr headers.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
34e4dac57b s4-torture: finally enable witness_AsyncNotify ndr test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
185896d988 s3-rpcclient: remove old extra hand marshalling from witness cmds.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
92709e9250 s4-torture: add clusapi resource online/offline toggle code to witness test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
ceebd509b1 s4-torture: make some clusapi torture tests public.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
0a2c933dc5 s3-rpcclient: close policy handle in cmd_clusapi_open_resource().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
126c6f06bf s3-rpcclient: use witness defines in witness rpcclient.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
5b95572a09 libndr: better debug message in ndr_pull_subcontext_start().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
d8dbbfcb0a s3-rpcclient: add clusapi_get_resource_state command.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
82c4b92661 witness: autogenerate the marshalling of the witness_notifyResponse_message.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
e324184224 witness: add default case to witness_notifyResponse_message union.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
cf738ccdb3 s3-rpcclient: add cmdline tools to toggle online/offline cluster resource state.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
cc3afec55d s4-torture: add some more tests for witness_AsyncNotify and RegisterEx with different timeouts.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
6e9c678c8b s4-torture: make setup of the clusapi pipe non-critical in witness test.
Samba currently does not implement clusapi.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
9cdb69c8dd s4-torture: minor cleanup in test_witness_Register().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Günther Deschner
1b70b1aa28 s4-torture: open a clusapi connection to get list of cluster nodes, etc.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-03 02:00:27 +02:00
Ralph Boehme
c6e044ea33 s4:torture:vfs_fruit: check offset and length when reading AFP_AfpInfo stream
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11363

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul  3 01:47:29 CEST 2015 on sn-devel-104
2015-07-03 01:47:28 +02:00
Ralph Boehme
25f302a47c vfs_fruit: check offset and length for AFP_AfpInfo read requests
fruit_pread doesn't check the offset and length parameters and instead
always writes 60 bytes, the size of the AFP_AfpInfo blob, to the the
passed buffer. If the passed in buffer is smaller, we overwrite
something somewhere.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11363

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-07-02 22:45:10 +02:00
Stefan Metzmacher
f87e70a930 s3:libads: improve debug levels/messages in ads_find_dc()
We should not flood the logs (and syslog) with fallback warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul  2 14:41:31 CEST 2015 on sn-devel-104
2015-07-02 14:41:31 +02:00
Günther Deschner
ddc4c6767a librpc: prevent invalid NULL pointer derref in dcerpc_binding_get_auth_info().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul  2 02:05:38 CEST 2015 on sn-devel-104
2015-07-02 02:05:37 +02:00
Ralph Boehme
20075e6b30 s3:vfs: copy_chunk buffer size
Use a dynamically allocated copy_chunk buffer size with an upper bound
of 8 MB for now.

The previous size of 64 KB has proven to really hurt performance,
especially with "strict locking = yes".

The SMB2 protocol level maximum allowed copy_chunk size is 1 MB, that's
what will be used as buffer size in the typical case.

With the AAPL copyfile extension the requested copy_chunk size is the
size whole file, which would then make use of a larger buffer up to the
limit of 8 MB.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-01 23:05:55 +02:00