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

2665 Commits

Author SHA1 Message Date
Günther Deschner
17d94d0531 spoolss: rename spoolss_RpcSetJobNamedProperty to spoolss_SetJobNamedProperty
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
d64b316fed spoolss: rename spoolss_RpcGetJobNamedPropertyValue to spoolss_GetJobNamedPropertyValue
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
23f404b7f5 spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes
This change makes automatic mapping for PAR->RPRN opcodes easier.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
180fc18f49 s4-torture: also test NULL servername in spoolss_GetPrinterDriverPackagePath
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:26 +02:00
Günther Deschner
149da58ca6 s4-torture: use torture_comment in torture_rpc_connection()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:26 +02:00
Günther Deschner
bed0d84550 s4-torture: add test for spoolss_LogJobInfoForBranchOffice
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:25 +02:00
Günther Deschner
f9788a8424 s4-torture: also test CLUSCTL_CLUSTER_CHECK_VOTER_DOWN.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
4075d1c264 s4-torture: add test for CreateGroupEnum.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
8ce0aaef50 s4-torture: add test for CreateResTypeEnum().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
31d0ef96f8 s4-torture: test CLUSCTL_GROUP_GET_FLAGS GroupControl.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
058032c58b s4-torture: add test for clusapi_CreateGroupResourceEnum
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:16 +02:00
Günther Deschner
6ee7617207 s4-torture: add new tests for clusapi resourcetypes.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:15 +02:00
Günther Deschner
71d3abbdc4 s4-torture: Fix logic errors in node and group control clusapi tests.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:15 +02:00
Günther Deschner
be9a44a0f0 s4-torture: test multiple different cluster control codes.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-07 23:56:15 +02:00
Günther Deschner
d3e4106420 source4/torture/rpc/testjoin.c: prefer torture_comment() over printf().
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-07 12:09:16 +02:00
Günther Deschner
518b2a3f5f s4-torture: test GetPrinterData with server handle and 0 keylength.
This is what e.g. Windows 10 does a lot.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-09-06 23:17:21 +02:00
Andreas Schneider
a3852bc0b9 krb5_wrap: Remove unneded smb_krb5_free_error()
krb5_free_error() is availalbe in MIT and Heimdal. Both implementations
free the contents and the pointer. krb5_free_data_contents() is Heimdal
only. Which function you need to call depends.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-08-31 20:59:14 +02:00
Andreas Schneider
8aa97126a8 s4-torture: Enable tests for printer driver info level 8
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 23 05:00:13 CEST 2016 on sn-devel-144
2016-08-23 05:00:13 +02:00
Günther Deschner
e99c8b34fe s4-torture: add test for spoolss_GetPrinterDriverPackagePath().
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-23 01:06:25 +02:00
Günther Deschner
54eafcaa12 s4-torture: add test for spoolss_CorePrinterDriver().
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-23 01:06:24 +02:00
Andrew Bartlett
065dcc8a45 selftest: Merge alternate error codes into backupkey from backupkey_heimdal
This is from cea4a4b9b2 and
613d085a63ee554084cb99d2150921dd108f6b77

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  3 21:43:21 CEST 2016 on sn-devel-144
2016-08-03 21:43:21 +02:00
Andrew Bartlett
664bde19bf torture/backupkey: Allow WERR_INVALID_ACCESS, WERR_INVALID_PARAM or WERR_INVALID_DATA
The use of the wrong key can still create structures that parse as a SID,
therefore we can sometimes get an unusual error, which becomes a flapping test

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-08-03 18:00:35 +02:00
Stefan Metzmacher
54d32c262b s4:kdc: provide a PAC_UPN_DNS_INFO element for logons
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-22 23:34:22 +02:00
Stefan Metzmacher
fbd0610953 s4:torture/remote_pac: verify the order of PAC elements
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-22 23:34:20 +02:00
Stefan Metzmacher
2d9958e46c auth/credentials: also do a shallow copy of the krb5_ccache.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-22 23:34:20 +02:00
Garming Sam
cea4a4b9b2 tests: Allow alternative error code for backupkey test
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-12 23:24:13 +02:00
Dirk Godau
6ded4f5230 drsuapi tests for DsBind with w2k8
These are marked as known_fail pending the next patch ("Extend DsBind
and DsGetDomainControllerInfo to work with w2k8").

Signed-off-by: Dirk Godau <voidswitch@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-05-26 02:44:31 +02:00
Uri Simchoni
b2b951d14f heimdal make kvno unisgned internally
The folks at heimdal didn't like the patch in
commit 6379737b7d and insisted
that kvno should remain unsigned internally, even though it is
encoded as signed in packets. This patch reverts some of the
unsigned->signed changes in that commit, and resolves conversion
issues - in order to be aligned with upstream Heimdal.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue May 24 03:00:39 CEST 2016 on sn-devel-144
2016-05-24 03:00:39 +02:00
Michael Adam
ea668a28e0 s4:torture:rpc:samlogon: fix O3 error unused result of asprintf
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2016-05-13 00:16:16 +02:00
Uri Simchoni
6379737b7d heimdal: encode/decode kvno as signed integer
This patch changes the encoding/decoding of kvno (key version number)
in blobs and packets to signed integer, for compatibility with Windows.
Reportedly, MIT Kerberos does the same.

This patch effectively reverts commit 1124c4872dfb81bec9c4b527b8927ca35e39a599
in the heimdal tree.

According to the Kerberos spec (RFC 4120 5.2.9), the kvno field
in encrypted data object is an unsigned integer that fits in
32 bits. The Heimdal Kerberos component bundled with Samba
conforms to this. However, Windows deviates from the standard
and encodes kvno as a signed integer, and this creates
interoperability issues.

ASN.1 DER has no special encoding for unsigned integer. A 32-bit
unsigned integer is encoded as a signed integer, so while a signed
32-bit integer (covering the range of -0x80000000..0x7fffffff) is
encoded using up to 4 bytes, an unsigned integer (covering
0..0xffffffff) could require 5 bytes.

Normally, kvno for a given account starts at 1 and increments on
password changes. Kerberos defined this as unsigned because there's
no meaning for negative version numbers, so the standard writers figured
4 billion versions is better than 2 billion. It was not
expected for a kvno to really go past 0x7fffffff and the disctinction
usually does not matter. However, RODCs use kvnos which
have the most-significant bit set.

In Active Directory, RODCs have a private secret for the krbtgt,
because the assumption is that the RODC is less secure, and
recovering the domain krbtgt secret from the RODC would compromise
the security of the entire domain. The kvno field is being used
to identify the private krbtgt account that owns the key - the
upper 16 bits are the RODC id, and the lower 16 bits identify
the key version number for this specific RODC. It's common to
have an RODC id greater than 0x8000, and therefore to have a
kvno larger than 0x7fffffff, which would be DER-encoded using
5 bytes.

Windows encodes kvno as signed integer - basically taking the
32 bits and treating them as a signed integer rather than an
unsigned integer. This means that in Windows a kvno can
always be encoded using 4 bytes, and Windows DCs reject a kvno
encoded using more than 4 bytes without even generating an error
response (the DC assumes it's an attack).

Heimdal re-encodes the TGT when it creates a TGS request. Obviously
it cannot decode and encode the encrypted parts but it does re-encode
the plain parts, which include the kvno. That leads to a 5-byte
kvno in the TGS request, which is rejected without an error
response.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat May  7 21:14:21 CEST 2016 on sn-devel-144
2016-05-07 21:14:21 +02:00
Noel Power
39bbd40cda fix Invalid read of size 8
running rpc.dsgetinfo.DsGetReplicaInfo results in the following valgrind
trace

==14966== Invalid read of size 8
==14966==    at 0x88B2D5D: dcerpc_binding_handle_call (binding_handle.c:538)
==14966==    by 0x978F33B: dcerpc_drsuapi_DsUnbind_r (ndr_drsuapi_c.c:319)
==14966==    by 0x2E9F19: torture_dsgetinfo_tcase_teardown (dsgetinfo.c:431)
==14966==    by 0x95536EF: internal_torture_run_test (torture.c:452)
==14966==    by 0x9553A4B: torture_run_test_restricted (torture.c:542)
==14966==    by 0x260074: run_matching (smbtorture.c:110)
==14966==    by 0x25FF36: run_matching (smbtorture.c:95)
==14966==    by 0x260195: torture_run_named_tests (smbtorture.c:143)
==14966==    by 0x261E14: main (smbtorture.c:665)
==14966==  Address 0x28 is not stack'd, malloc'd or (recently) free'd
==14966==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Apr 25 14:01:33 CEST 2016 on sn-devel-144
2016-04-25 14:01:33 +02:00
Noel Power
9cb4b1b240 s4:torture:rpc: fix valgrind 'Syscall param writev(vector[...])' valgrind error
when running smbtorture rpc.samba3.regconfig.regconfig

Note: to fix this particular error only the action_taken variable needed
to be initialised. ZERO-ing the structs for completeness.

==14958== Syscall param writev(vector[...]) points to uninitialised byte(s)
==14958==    at 0xFB9FC87: writev (in /lib64/libc-2.19.so)
==14958==    by 0x106C8003: writev_handler (async_sock.c:340)
==14958==    by 0xF67407E: epoll_event_loop (tevent_epoll.c:728)
==14958==    by 0xF67469C: epoll_event_loop_once (tevent_epoll.c:926)
==14958==    by 0xF671586: std_event_loop_once (tevent_standard.c:114)
==14958==    by 0xF66AD42: _tevent_loop_once (tevent.c:533)
==14958==    by 0xF66CB9D: tevent_req_poll (tevent_req.c:256)
==14958==    by 0x5D19305: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==14958==    by 0x88B2DED: dcerpc_binding_handle_call (binding_handle.c:556)
==14958==    by 0xBBCE851: dcerpc_winreg_CreateKey_r (ndr_winreg_c.c:1430)
==14958==    by 0x3D47C5: torture_samba3_createshare (samba3rpc.c:3192)
==14958==    by 0x3D50AC: torture_samba3_regconfig (samba3rpc.c:3299)
==14958==    by 0x9553F42: wrap_simple_test (torture.c:632)
==14958==    by 0x955366F: internal_torture_run_test (torture.c:442)
==14958==    by 0x9553A4B: torture_run_test_restricted (torture.c:542)
==14958==    by 0x260074: run_matching (smbtorture.c:110)
==14958==    by 0x25FF36: run_matching (smbtorture.c:95)
==14958==    by 0x25FF36: run_matching (smbtorture.c:95)
==14958==    by 0x260195: torture_run_named_tests (smbtorture.c:143)
==14958==    by 0x261E14: main (smbtorture.c:665)
==14958==  Address 0x18868ec6 is 598 bytes inside a block of size 1,325 alloc'd
==14958==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==14958==    by 0xF45EE38: __talloc_with_prefix (talloc.c:668)
==14958==    by 0xF45EFF5: _talloc_pool (talloc.c:721)
==14958==    by 0xF45F167: _talloc_pooled_object (talloc.c:790)
==14958==    by 0xF66C664: _tevent_req_create (tevent_req.c:66)
==14958==    by 0xB0D49CF: smb1cli_req_create (smbXcli_base.c:1322)
==14958==    by 0xB0E1E3D: smb1cli_trans_send (smb1cli_trans.c:512)
==14958==    by 0xB0ED44D: tstream_smbXcli_np_readv_trans_start (tstream_smbXcli_np.c:901)
==14958==    by 0xB0EC817: tstream_smbXcli_np_writev_write_next (tstream_smbXcli_np.c:578)
==14958==    by 0xB0EC4A7: tstream_smbXcli_np_writev_send (tstream_smbXcli_np.c:505)
==14958==    by 0xC259DDA: tstream_writev_send (tsocket.c:695)
==14958==    by 0xC25AD44: tstream_writev_queue_trigger (tsocket_helpers.c:513)
==14958==    by 0xF66BF73: tevent_queue_immediate_trigger (tevent_queue.c:149)
==14958==    by 0xF66BBFB: tevent_common_loop_immediate (tevent_immediate.c:135)
==14958==    by 0xF674602: epoll_event_loop_once (tevent_epoll.c:907)
==14958==    by 0xF671586: std_event_loop_once (tevent_standard.c:114)
==14958==    by 0xF66AD42: _tevent_loop_once (tevent.c:533)
==14958==    by 0xF66CB9D: tevent_req_poll (tevent_req.c:256)
==14958==    by 0x5D19305: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==14958==    by 0x88B2DED: dcerpc_binding_handle_call (binding_handle.c:556)
==14958==    by 0xBBCE851: dcerpc_winreg_CreateKey_r (ndr_winreg_c.c:1430)
==14958==    by 0x3D47C5: torture_samba3_createshare (samba3rpc.c:3192)
==14958==    by 0x3D50AC: torture_samba3_regconfig (samba3rpc.c:3299)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:14 +02:00
Noel Power
c901d98d6e s4:torture:rpc: fix valgrind 'Syscall param writev(vector[...])' error
running smbtorture test rpc.samba3.winreg.winreg yields the following
valgrind trace

==18533== Syscall param writev(vector[...]) points to uninitialised byte(s)
==18533==    at 0xFBA2C87: writev (in /lib64/libc-2.19.so)
==18533==    by 0x106CB033: writev_handler (async_sock.c:340)
==18533==    by 0xF67812A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==18533==    by 0xF6765F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==18533==    by 0xF6727FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==18533==    by 0xF673ACE: tevent_req_poll (in /usr/lib64/libtevent.so.0.9.26)
==18533==    by 0x5D19325: tevent_req_poll_ntstatus (tevent_ntstatus.c:109)
==18533==    by 0x88B2E0D: dcerpc_binding_handle_call (binding_handle.c:556)
==18533==    by 0xBBD049F: dcerpc_winreg_EnumValue_r (ndr_winreg_c.c:2354)
==18533==    by 0x3D3E3E: enumvalues (samba3rpc.c:2982)
==18533==    by 0x3D40A5: enumkeys (samba3rpc.c:3042)
==18533==    by 0x3D4085: enumkeys (samba3rpc.c:3041)
==18533==  Address 0x1886edd6 is 598 bytes inside a block of size 1,325 alloc'd
==18533==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18533==    by 0xF464A73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==18533==    by 0xF67366D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==18533==    by 0xB0D49FF: smb1cli_req_create (smbXcli_base.c:1322)
==18533==    by 0xB0E1E6D: smb1cli_trans_send (smb1cli_trans.c:512)
==18533==    by 0xB0ED47D: tstream_smbXcli_np_readv_trans_start (tstream_smbXcli_np.c:901)
==18533==    by 0xB0EC847: tstream_smbXcli_np_writev_write_next (tstream_smbXcli_np.c:578)
==18533==    by 0xB0EC4D7: tstream_smbXcli_np_writev_send (tstream_smbXcli_np.c:505)
==18533==    by 0xC259DFA: tstream_writev_send (tsocket.c:695)
==18533==    by 0xC25AD64: tstream_writev_queue_trigger (tsocket_helpers.c:513)
==18533==    by 0xF673023: tevent_common_loop_immediate (in /usr/lib64/libtevent.so.0.9.26)
==18533==    by 0xF677EED: ??? (in /usr/lib64/libtevent.so.0.9.26)
==18533==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:14 +02:00
Noel Power
9e8d748db3 s4:torture:rpc: fix valgrind Syscall param writev(vector[...]) error
running smbtorture rpc.srvsvc.srvsvc\ (admin\ access).NetDiskEnum results
in the following valgrind trace

==30237== Syscall param writev(vector[...]) points to uninitialised byte(s)
==30237==    at 0xDD01C67: writev (in /lib64/libc-2.19.so)
==30237==    by 0xE1D09D4: writev_handler (async_sock.c:340)
==30237==    by 0xD81A12A: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30237==    by 0xD8185F6: ??? (in /usr/lib64/libtevent.so.0.9.26)
==30237==    by 0xD8147FC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.26)
==30237==    by 0xD815ACE: tevent_req_poll (in /usr/lib64/libtevent.so.0.9.26)
==30237==    by 0x5AC726D: tevent_req_poll_ntstatus (in /usr/lib64/libtevent-util.so.0.0.1)
==30237==    by 0x8120CEA: dcerpc_binding_handle_call (in /usr/lib64/libdcerpc-binding.so.0.0.1)
==30237==    by 0xA9AC6EC: dcerpc_srvsvc_NetDiskEnum_r (ndr_srvsvc_c.c:5388)
==30237==    by 0x2ADDF8: ??? (in /usr/bin/smbtorture)
==30237==    by 0x898DF8C: ??? (in /usr/lib64/libtorture.so.0.0.1)
==30237==    by 0x1F0816: ??? (in /usr/bin/smbtorture)
==30237==  Address 0x15952676 is 598 bytes inside a block of size 1,325 alloc'd
==30237==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30237==    by 0xCCCAA73: _talloc_pooled_object (in /usr/lib64/libtalloc.so.2.1.5)
==30237==    by 0xD81566D: _tevent_req_create (in /usr/lib64/libtevent.so.0.9.26)
==30237==    by 0xA2B7910: smb1cli_req_create (smbXcli_base.c:1322)
==30237==    by 0xA2BA4E3: smb1cli_trans_send (smb1cli_trans.c:512)
==30237==    by 0xA2C1F91: tstream_smbXcli_np_readv_trans_start (tstream_smbXcli_np.c:901)
==30237==    by 0xA2C23AE: tstream_smbXcli_np_writev_send (tstream_smbXcli_np.c:505)
==30237==    by 0xAC8E43C: tstream_writev_send (tsocket.c:695)
==30237==    by 0xAC8E9BA: tstream_writev_queue_trigger (tsocket_helpers.c:513)
==30237==    by 0xD815023: tevent_common_loop_immediate (in /usr/lib64/libtevent.so.0.9.26)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:14 +02:00
Stefan Metzmacher
847192d493 CVE-2016-2111: s4:torture/rpc: fix rpc.pac ntlmv2 test
The computer name of the NTLMv2 blob needs to match
the schannel connection.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-04-12 19:25:23 +02:00
Stefan Metzmacher
5adad299c2 CVE-2016-2111: s4:torture/rpc: fix rpc.samba3.netlogon ntlmv2 test
The computer name of the NTLMv2 blob needs to match
the schannel connection.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-04-12 19:25:23 +02:00
Stefan Metzmacher
bbaba64329 CVE-2016-2110: auth/credentials: pass server_timestamp to cli_credentials_get_ntlm_response()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11644

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-04-12 19:25:23 +02:00
Stefan Metzmacher
733ccd1320 s4:torture/rpc/schannel: don't use validation level 6 without privacy
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-03-17 17:17:16 +01:00
Stefan Metzmacher
50581689d9 s4:torture/rpc: correctly use torture_skip() for test_ManyGetDCName() without NCACN_NP
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-03-17 17:17:16 +01:00
Stefan Metzmacher
050a1d0653 s4:torture/rpc/samlogon: use DCERPC_SEAL for netr_LogonSamLogonEx and validation level 6
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-03-17 17:17:16 +01:00
Stefan Metzmacher
26e5ef6818 s4:torture/rpc/samr: use DCERPC_SEAL in setup_schannel_netlogon_pipe()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-03-17 17:17:16 +01:00
Stefan Metzmacher
1a7d8b8602 s4:torture/netlogon: add/use test_SetupCredentialsPipe() helper function
This create a schannel connection to netlogon, this makes the tests
more realistic.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-03-17 17:17:16 +01:00
Garming Sam
e8e0ffcc49 tests: Allow alternative error code for backupkey test
It appears that incorrect decryption triggers a different error code,
causing a test which fails every now and again, as sometimes the invalid
data will parse as a SID, and so pass one of the checks.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Mar 14 03:55:16 CET 2016 on sn-devel-144
2016-03-14 03:55:16 +01:00
Stefan Metzmacher
4335371323 s4:torture/lsa: improve debug message
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2016-03-13 20:10:33 +01:00
Stefan Metzmacher
af8c4ebf9b s4:torture:samba3rpc: use an authenticated SMB connection and an anonymous DCERPC connection on top
This is the only way to get a reliable transport session key.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-10 06:52:31 +01:00
Stefan Metzmacher
c793b23ddb s4:torture: the backupkey tests need to use ncacn_np: for LSA calls
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-10 06:52:31 +01:00
Stefan Metzmacher
0400f301e3 s4:torture/rpc: do testjoin only via ncalrpc or ncacn_np
ncacn_ip_tcp doesn't have the required session key.
It used to be the wellknown "SystemLibraryDTC" constant,
but that's not available in modern systems anymore.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-10 06:52:31 +01:00
Garming Sam
42fe66fa73 tests: Allow alternative error code for backupkey test
It appears that incorrect decryption triggers a different error code,
causing a test which fails every now and again, as sometimes the invalid
data will parse as a SID, and so pass one of the checks.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-09 10:32:16 +01:00
Günther Deschner
1c80f10299 s4-torture: fix gcc6 build warning.
source4/torture/rpc/forest_trust.c:408:22: warning: 'my_blob' defined but not
used [-Wunused-const-variable]

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:18 +01: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