nivanova/samba-autobuild/.git
4 years agotests/ridalloc_exop: Add a new suite of tests for RID allocation
Garming Sam [Mon, 31 Oct 2016 02:24:49 +0000 (15:24 +1300)]
tests/ridalloc_exop: Add a new suite of tests for RID allocation

This moves some tests from getnc_exop.py regarding RID sets as well as
adding new tests for actions on join.

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

Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>

Signed-off-by: Andrew Bartlett <abartlet@samaba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoctdb-scripts: Fix calculation of CTDB_BASE
Amitay Isaacs [Thu, 3 Nov 2016 05:03:24 +0000 (16:03 +1100)]
ctdb-scripts: Fix calculation of CTDB_BASE

This is a regression introduced in f227c26178c2eaf3fae49f32a90ec905f85005f4.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Nov  3 10:10:31 CET 2016 on sn-devel-144

4 years agos3-winbind: Do not return NO_MEMORY if we have an empty user list
Andreas Schneider [Wed, 2 Nov 2016 16:19:09 +0000 (17:19 +0100)]
s3-winbind: Do not return NO_MEMORY if we have an empty user list

The domain child for the MACHINE ACCOUNT might fail with
NT_STATUS_NO_MEMORY because an emtpy user list is returned.

*pnum_info is already set to 0 at the beginngin so we should just
declare victory here!

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov  3 05:36:17 CET 2016 on sn-devel-144

4 years agocollect_tombstones: Allow links to recycled objects to be deleted
Garming Sam [Fri, 21 Oct 2016 02:50:09 +0000 (15:50 +1300)]
collect_tombstones: Allow links to recycled objects to be deleted

The reason we choose to provide the string DN is because extended_dn_in
will try to correct the <GUID=...> by searching on it (despite the fact
it does not exist and then failing on a ldb_dn_validate in
objectclass_attrs).

We can now also remove the dangling link test from the knownfail.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12385

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov  3 01:46:43 CET 2016 on sn-devel-144

4 years agotombstones-expunge: Add a test for deleting links to recycled objects
Garming Sam [Thu, 20 Oct 2016 22:40:51 +0000 (11:40 +1300)]
tombstones-expunge: Add a test for deleting links to recycled objects

Currently this fails because we rely on a GUID DN, which fails to
resolve in the case that the GUID no longer exists in the database (i.e.
when that object has been purged after 6 months).

The tests use a made up extended DN built from fred where the GUID has
been tweaked.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12385

4 years agolibcli: Increase the debug level for expired tickets
Volker Lendecke [Tue, 1 Nov 2016 15:32:57 +0000 (16:32 +0100)]
libcli: Increase the debug level for expired tickets

In libads/sasl.c we do a retry in this case. We should not
spam syslog with that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov  2 05:22:38 CET 2016 on sn-devel-144

4 years agoobjectclass_attrs: Only abort on a missing attribute when an attribute is both MUST...
Clive Ferreira [Tue, 11 Oct 2016 02:32:54 +0000 (15:32 +1300)]
objectclass_attrs: Only abort on a missing attribute when an attribute is both MUST and replicated

If an attribute is not replicated or constructed, it is quite normal for
it to be missing. This is the case with both rIDNextRid and
rIDPreviousAllocationPool. This currently prevents us switching the RID
master. On Windows, missing this attribute does not cause any problems
for the RID manager.

We may now remove the knownfail entry added earlier.

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz>

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

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Nov  2 01:28:44 CET 2016 on sn-devel-144

4 years agotypo: supprise -> surprise
Clive Ferreira [Thu, 20 Oct 2016 03:20:49 +0000 (16:20 +1300)]
typo: supprise -> surprise

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

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

4 years agotests/getnc_exop: Finish a comment in getnc_exop.py
Garming Sam [Thu, 20 Oct 2016 03:19:43 +0000 (16:19 +1300)]
tests/getnc_exop: Finish a comment in getnc_exop.py

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394

4 years agotests/getnc_exop: Improve the ridalloc test by performing an alloc against a new...
Bob Campbell [Mon, 10 Oct 2016 03:58:57 +0000 (16:58 +1300)]
tests/getnc_exop: Improve the ridalloc test by performing an alloc against a new master

Currently we fail against ourselves due to rIDNextRid and
rIDPreviousAllocationPool normally being unset, despite being mandatory
attributes (being the only attributes in this situation).

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394

4 years agoobjectclass_attrs: correctly indent a comment
Clive Ferreira [Tue, 11 Oct 2016 02:33:06 +0000 (15:33 +1300)]
objectclass_attrs: correctly indent a comment

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394

4 years agobuild: Fix build with perl on debian sid.
Andrew Bartlett [Tue, 25 Oct 2016 11:06:12 +0000 (00:06 +1300)]
build: Fix build with perl on debian sid.

build: Fix build with perl on debian sid.

It appears that "." is no longer in perl_inc

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12395
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat Oct 29 09:32:37 CEST 2016 on sn-devel-144

4 years agos3-waf: Move spoolssd into its own subsystem
Günther Deschner [Thu, 27 Oct 2016 13:51:39 +0000 (15:51 +0200)]
s3-waf: Move spoolssd into its own subsystem

More cleanup will follow later.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 28 22:30:54 CEST 2016 on sn-devel-144

4 years agos3-rpcclient: allow to pass down interface and transport to epmmap command
Günther Deschner [Wed, 26 Oct 2016 16:45:29 +0000 (18:45 +0200)]
s3-rpcclient: allow to pass down interface and transport to epmmap command

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoprovision: Add support for BIND 9.11.x
Amitay Isaacs [Mon, 26 Sep 2016 14:51:03 +0000 (00:51 +1000)]
provision: Add support for BIND 9.11.x

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 28 03:42:25 CEST 2016 on sn-devel-144

4 years agodlz-bind: Add support for BIND 9.11.x
Amitay Isaacs [Mon, 26 Sep 2016 14:51:03 +0000 (00:51 +1000)]
dlz-bind: Add support for BIND 9.11.x

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodlz-bind: Set DNS_CLIENTINFO_VERSION based on BIND version
Amitay Isaacs [Mon, 26 Sep 2016 15:00:34 +0000 (01:00 +1000)]
dlz-bind: Set DNS_CLIENTINFO_VERSION based on BIND version

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodlz-bind: Fix initialization of DLZ_DLOPEN_AGE
Amitay Isaacs [Mon, 26 Sep 2016 14:57:00 +0000 (00:57 +1000)]
dlz-bind: Fix initialization of DLZ_DLOPEN_AGE

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodlz-bind: Fix preprocessor checks for BIND versions
Amitay Isaacs [Mon, 26 Sep 2016 14:52:53 +0000 (00:52 +1000)]
dlz-bind: Fix preprocessor checks for BIND versions

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-packaging: Update required tdb version for tdb_storev()
Amitay Isaacs [Thu, 15 Sep 2016 06:36:33 +0000 (16:36 +1000)]
ctdb-packaging: Update required tdb version for tdb_storev()

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tools: Simplify using a local variable
Amitay Isaacs [Wed, 12 Oct 2016 04:46:17 +0000 (15:46 +1100)]
ctdb-tools: Simplify using a local variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tools: Simplify using tdb_storev
Amitay Isaacs [Wed, 12 Oct 2016 04:41:25 +0000 (15:41 +1100)]
ctdb-tools: Simplify using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tool: Simplify using tdb_storev
Amitay Isaacs [Wed, 12 Oct 2016 04:37:47 +0000 (15:37 +1100)]
ctdb-tool: Simplify using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-client: Simplify using tdb_storev
Amitay Isaacs [Wed, 12 Oct 2016 04:32:29 +0000 (15:32 +1100)]
ctdb-client: Simplify using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-client: Simplify using a local variable
Amitay Isaacs [Wed, 12 Oct 2016 04:32:17 +0000 (15:32 +1100)]
ctdb-client: Simplify using a local variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Simplify code using tdb_storev
Amitay Isaacs [Fri, 2 Sep 2016 07:53:32 +0000 (17:53 +1000)]
ctdb-daemon: Simplify code using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-common: Simplify code using tdb_storev
Amitay Isaacs [Fri, 2 Sep 2016 07:22:26 +0000 (17:22 +1000)]
ctdb-common: Simplify code using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Simplify code using local variable
Amitay Isaacs [Fri, 2 Sep 2016 07:51:36 +0000 (17:51 +1000)]
ctdb-daemon: Simplify code using local variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-common: Simplify code using local variables
Amitay Isaacs [Fri, 2 Sep 2016 07:11:17 +0000 (17:11 +1000)]
ctdb-common: Simplify code using local variables

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agos3-waf: Add winbindd to its own wscript_build file (already exists)
Günther Deschner [Mon, 26 Sep 2016 22:49:45 +0000 (00:49 +0200)]
s3-waf: Add winbindd to its own wscript_build file (already exists)

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 26 19:45:17 CEST 2016 on sn-devel-144

4 years agos3-waf: Add wscript_build for nmbd
Günther Deschner [Mon, 26 Sep 2016 22:39:53 +0000 (00:39 +0200)]
s3-waf: Add wscript_build for nmbd

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3-waf: Create a wscript_build for the utils subdir
Günther Deschner [Mon, 26 Sep 2016 22:25:07 +0000 (00:25 +0200)]
s3-waf: Create a wscript_build for the utils subdir

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoidl: Remove unused DCERPC_FAULT_UNK_IF
Andreas Schneider [Wed, 26 Oct 2016 07:28:01 +0000 (09:28 +0200)]
idl: Remove unused DCERPC_FAULT_UNK_IF

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 26 15:06:44 CEST 2016 on sn-devel-144

4 years agos4-rpc_server: Use DCERPC_NCA_S_UNKNOWN_IF for fault code
Andreas Schneider [Wed, 26 Oct 2016 07:27:03 +0000 (09:27 +0200)]
s4-rpc_server: Use DCERPC_NCA_S_UNKNOWN_IF for fault code

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agopython/tests: add simple dcerpc orphaned tests
Stefan Metzmacher [Sun, 11 Sep 2016 21:25:49 +0000 (23:25 +0200)]
python/tests: add simple dcerpc orphaned tests

ORPHANED is mostly ignored. It's up to the application server
implementation to install a orphaned handler.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: add simple dcerpc co_cancel tests
Stefan Metzmacher [Sun, 11 Sep 2016 21:25:49 +0000 (23:25 +0200)]
python/tests: add simple dcerpc co_cancel tests

CO_CANCEL is mostly ignored. It's up to the application server
implementation to install a cancel handler.

The only implementation I found so far is the witness server
(see [MS-SWN] WitnessrAsyncNotify), which triggers a FAULT
with DCERPC_FAULT_SERVER_UNAVAILABLE.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: add simple dcerpc association group tests
Stefan Metzmacher [Tue, 27 Sep 2016 06:52:14 +0000 (08:52 +0200)]
python/tests: add simple dcerpc association group tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: add a second_connection() helper function
Stefan Metzmacher [Tue, 27 Sep 2016 06:33:31 +0000 (08:33 +0200)]
python/tests: add a second_connection() helper function

This can be used to create a 2nd connection.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: check context_id values of responses correctly
Stefan Metzmacher [Tue, 13 Sep 2016 22:27:02 +0000 (00:27 +0200)]
python/tests: check context_id values of responses correctly

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: make use of self.get_auth_context_creds() and self.do_generic_bind...
Stefan Metzmacher [Mon, 26 Sep 2016 05:46:43 +0000 (07:46 +0200)]
python/tests: make use of self.get_auth_context_creds() and self.do_generic_bind() in _test_spnego_bind_auth_level()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: make use of self.get_anon_creds() and self.get_user_creds()
Stefan Metzmacher [Mon, 26 Sep 2016 05:46:43 +0000 (07:46 +0200)]
python/tests: make use of self.get_anon_creds() and self.get_user_creds()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: make use of get_auth_context_creds() in _test_auth_type_level_bind_nak()
Stefan Metzmacher [Fri, 16 Sep 2016 09:13:14 +0000 (11:13 +0200)]
python/tests: make use of get_auth_context_creds() in _test_auth_type_level_bind_nak()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: make use of prepare_presentation() in _get_netlogon_ctx()
Stefan Metzmacher [Tue, 20 Sep 2016 19:07:13 +0000 (21:07 +0200)]
python/tests: make use of prepare_presentation() in _get_netlogon_ctx()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: make it possible to specific TARGET_HOSTNAME to raw_protocol.py
Stefan Metzmacher [Tue, 20 Sep 2016 19:06:39 +0000 (21:06 +0200)]
python/tests: make it possible to specific TARGET_HOSTNAME to raw_protocol.py

SMB_CONF_PATH=/dev/null \
  SERVER=w2012r2-188.w2012r2-l6.base \
  USERNAME=administrator PASSWORD=A1b2C3d4 \
  python/samba/tests/dcerpc/raw_protocol.py -v -f TestDCERPC_BIND

or

SMB_CONF_PATH=/dev/null \
  SERVER=172.31.9.188 TARGET_HOSTNAME=w2012r2-188.w2012r2-l6.base \
  USERNAME=administrator PASSWORD=A1b2C3d4 \
  python/samba/tests/dcerpc/raw_protocol.py -v -f TestDCERPC_BIND

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython:tests: add more helper functions to RawDCERPCTest
Stefan Metzmacher [Fri, 16 Sep 2016 09:11:58 +0000 (11:11 +0200)]
python:tests: add more helper functions to RawDCERPCTest

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: we now pass test_no_auth_request_bind_pfc_CONC_MPX()
Stefan Metzmacher [Wed, 14 Sep 2016 23:18:28 +0000 (01:18 +0200)]
python/tests: we now pass test_no_auth_request_bind_pfc_CONC_MPX()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: add PyTypeObject objects for function structs
Stefan Metzmacher [Mon, 12 Sep 2016 07:20:44 +0000 (09:20 +0200)]
pidl:Python: add PyTypeObject objects for function structs

They provide get/set methods for the in_* and out_* elements
and the magic __ndr_{push,pull,print}_{in,out}__ hooks to enable
the marshalling via ndr_{push,pull,print}_{in,out}().

This provides an easy way to generate and parse the payload of
DCERPC requests and responses, which is very useful for writing
tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: split out a PythonElementGetSet() helper function
Stefan Metzmacher [Mon, 12 Sep 2016 07:20:04 +0000 (09:20 +0200)]
pidl:Python: split out a PythonElementGetSet() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:NDR: add ReturnTypeElement() helper function
Stefan Metzmacher [Tue, 13 Sep 2016 07:06:50 +0000 (09:06 +0200)]
pidl:NDR: add ReturnTypeElement() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython:ndr: add ndr_{pack,unpack,print}_{in,out} helper functions
Stefan Metzmacher [Tue, 13 Sep 2016 03:51:42 +0000 (05:51 +0200)]
python:ndr: add ndr_{pack,unpack,print}_{in,out} helper functions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython:ndr: verify the object type ndr_print() and ndr_unpack()
Stefan Metzmacher [Tue, 13 Sep 2016 03:51:42 +0000 (05:51 +0200)]
python:ndr: verify the object type ndr_print() and ndr_unpack()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: the py_{import,export}_*() functions can be static now.
Stefan Metzmacher [Mon, 12 Sep 2016 23:06:18 +0000 (01:06 +0200)]
pidl:Python: the py_{import,export}_*() functions can be static now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:pyrpc: remove unused py_{import,export}_netr_* prototypes
Stefan Metzmacher [Tue, 13 Sep 2016 02:48:13 +0000 (04:48 +0200)]
s4:pyrpc: remove unused py_{import,export}_netr_*  prototypes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: make use of the pyrpc_{import,export}_union() functions
Stefan Metzmacher [Mon, 12 Sep 2016 14:33:38 +0000 (16:33 +0200)]
pidl:Python: make use of the pyrpc_{import,export}_union() functions

This avoids the linking problems at C shared object level.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__(...
Stefan Metzmacher [Mon, 12 Sep 2016 14:33:38 +0000 (16:33 +0200)]
pidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__() hooks

These are wrappers around the currently public C functions
'py_import_*() and 'py_export_*().

In order to let other python module use these function, we should
resolve the needed type object and call the __import__() or __export__()
hooks instead of linking to the other shared module at C level.

We already do the same for structs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:pyrpc: add pyrpc_{im,ex}port_union() helper functions
Stefan Metzmacher [Tue, 13 Sep 2016 02:48:13 +0000 (04:48 +0200)]
s4:pyrpc: add pyrpc_{im,ex}port_union() helper functions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax
Stefan Metzmacher [Sat, 24 Sep 2016 22:48:29 +0000 (00:48 +0200)]
pidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax

The <module>.abstract_syntax alias is only kept as legacy for
the first interface in a module.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: prettify names of constants
Stefan Metzmacher [Fri, 23 Sep 2016 04:49:13 +0000 (06:49 +0200)]
pidl:Python: prettify names of constants

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:NDR: keep interface->{ORIGINAL}
Stefan Metzmacher [Tue, 13 Sep 2016 05:57:25 +0000 (07:57 +0200)]
pidl:NDR: keep interface->{ORIGINAL}

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: improve the .doc string for the get/set elements
Stefan Metzmacher [Tue, 13 Sep 2016 07:07:32 +0000 (09:07 +0200)]
pidl:Python: improve the .doc string for the get/set elements

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()
Stefan Metzmacher [Mon, 12 Sep 2016 13:12:24 +0000 (15:12 +0200)]
pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS
Stefan Metzmacher [Sat, 24 Sep 2016 23:07:14 +0000 (01:07 +0200)]
pidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopidl:Python: check the return values of talloc_ptrtype()
Stefan Metzmacher [Mon, 12 Sep 2016 13:12:50 +0000 (15:12 +0200)]
pidl:Python: check the return values of talloc_ptrtype()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:selftest: run rpc.echo with an object based binding string
Stefan Metzmacher [Sat, 24 Sep 2016 06:47:44 +0000 (08:47 +0200)]
s4:selftest: run rpc.echo with an object based binding string

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:librpc/rpc: pass the object guid to the binding handle if required
Stefan Metzmacher [Fri, 23 Sep 2016 22:22:41 +0000 (00:22 +0200)]
s4:librpc/rpc: pass the object guid to the binding handle if required

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibrpc/rpc: verify the passed table against the table on the handle
Stefan Metzmacher [Sat, 24 Sep 2016 00:24:11 +0000 (02:24 +0200)]
librpc/rpc: verify the passed table against the table on the handle

Now that all callers of dcerpc_binding_handle_create() are fixed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibrpc/rpc: make sure we use the object from the handle in dcerpc_binding_handle_raw_...
Stefan Metzmacher [Fri, 23 Sep 2016 22:22:12 +0000 (00:22 +0200)]
librpc/rpc: make sure we use the object from the handle in dcerpc_binding_handle_raw_call_send()

If there's an object set on the binding handle, we need to use that
and disallow per request passing of object.

The normal client code will always have the object on the binding handle.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:rpc_server: pass the full ndr_interface_table to rpc_pipe_open_internal()
Stefan Metzmacher [Sat, 24 Sep 2016 00:08:47 +0000 (02:08 +0200)]
s3:rpc_server: pass the full ndr_interface_table to rpc_pipe_open_internal()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:librpc/rpc: no longer set FLAG_OBJECT_PRESENT and FLAG_BIGENDIAN for ndr_push_ncac...
Stefan Metzmacher [Tue, 20 Sep 2016 19:19:28 +0000 (21:19 +0200)]
s4:librpc/rpc: no longer set FLAG_OBJECT_PRESENT and FLAG_BIGENDIAN for ndr_push_ncacn_packet()

This is no longer required, it's done inside.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibrpc/rpc: no longer set FLAG_OBJECT_PRESENT and FLAG_BIGENDIAN for ndr_{pull,push...
Stefan Metzmacher [Tue, 20 Sep 2016 19:19:28 +0000 (21:19 +0200)]
librpc/rpc: no longer set FLAG_OBJECT_PRESENT and FLAG_BIGENDIAN for ndr_{pull,push}_ncacn_packet()

This is no longer required, it's done inside.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agodcerpc.idl: set LIBNDR_FLAG_* flags based on DCERPC_PFC_FLAG_OBJECT_UUID and DCERPC_D...
Stefan Metzmacher [Tue, 13 Sep 2016 15:03:47 +0000 (17:03 +0200)]
dcerpc.idl: set LIBNDR_FLAG_* flags based on DCERPC_PFC_FLAG_OBJECT_UUID and DCERPC_DREP_LE

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: implement DCERPC_PFC_FLAG_CONC_MPX ordering restrictions
Stefan Metzmacher [Fri, 16 Sep 2016 10:35:54 +0000 (12:35 +0200)]
s4:rpc_server: implement DCERPC_PFC_FLAG_CONC_MPX ordering restrictions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server/remote: pass through DCERPC_PFC_FLAG_CONC_MPX if it was used by the...
Stefan Metzmacher [Thu, 15 Sep 2016 16:18:46 +0000 (18:18 +0200)]
s4:rpc_server/remote: pass through DCERPC_PFC_FLAG_CONC_MPX if it was used by the client

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: support DCESRV_CALL_STATE_FLAG_MULTIPLEXED by default
Stefan Metzmacher [Thu, 15 Sep 2016 16:18:01 +0000 (18:18 +0200)]
s4:rpc_server: support DCESRV_CALL_STATE_FLAG_MULTIPLEXED by default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:librpc/rpc: make sure the DCERPC_CONCURRENT_MULTIPLEX and DCERPC_PFC_FLAG_CONC_MPX...
Stefan Metzmacher [Thu, 15 Sep 2016 16:17:44 +0000 (18:17 +0200)]
s4:librpc/rpc: make sure the DCERPC_CONCURRENT_MULTIPLEX and DCERPC_PFC_FLAG_CONC_MPX are in sync

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:torture/rpc: concurrent dcerpc_echo_TestSleep requests require a connection with...
Stefan Metzmacher [Thu, 15 Sep 2016 06:45:51 +0000 (08:45 +0200)]
s4:torture/rpc: concurrent dcerpc_echo_TestSleep requests require a connection with DCERPC_CONCURRENT_MULTIPLEX

Concurrent requests are only allowed if the client asked for
DCERPC_PFC_FLAG_CONC_MPX in the DCERPC_BIND.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:torture/rpc: add extra_flags to torture_rpc_connection_transport()
Stefan Metzmacher [Thu, 15 Sep 2016 06:36:32 +0000 (08:36 +0200)]
s4:torture/rpc: add extra_flags to torture_rpc_connection_transport()

This can be used to pass DCERPC_CONCURRENT_MULTIPLEX, which
sends DCERPC_PFC_FLAG_CONC_MPX in the DCERPC_BIND.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: return the context_id of a RESPONSE in the same way as windows
Stefan Metzmacher [Tue, 13 Sep 2016 23:17:19 +0000 (01:17 +0200)]
s4:rpc_server: return the context_id of a RESPONSE in the same way as windows

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: return the context_id of a FAULT in a same way as windows
Stefan Metzmacher [Tue, 13 Sep 2016 23:17:19 +0000 (01:17 +0200)]
s4:rpc_server: return the context_id of a FAULT in a same way as windows

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: fill call->context on the first fragment
Stefan Metzmacher [Tue, 13 Sep 2016 23:16:19 +0000 (01:16 +0200)]
s4:rpc_server: fill call->context on the first fragment

This allows us to get fault responses right.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopython/tests: add DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN tests to dcerpc raw...
Stefan Metzmacher [Fri, 23 Oct 2015 13:39:34 +0000 (15:39 +0200)]
python/tests: add DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN tests to dcerpc raw protocol tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: implement DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN support
Stefan Metzmacher [Tue, 6 Oct 2015 08:18:06 +0000 (10:18 +0200)]
s4:rpc_server: implement DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN support

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: ignore CO_CANCEL and ORPHANED PDUs
Stefan Metzmacher [Fri, 26 Jun 2015 06:10:46 +0000 (08:10 +0200)]
s4:rpc_server: ignore CO_CANCEL and ORPHANED PDUs

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: list all connection oriented pdu types explicitly
Stefan Metzmacher [Tue, 13 Oct 2015 12:36:56 +0000 (14:36 +0200)]
s4:rpc_server: list all connection oriented pdu types explicitly

See DCE-RPC-1.1.pdf Section 12.6 Connection-oriented RPC PDUs Page 588.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:selftest: run some rpcclient tests with "packet"
Stefan Metzmacher [Fri, 23 Sep 2016 02:30:03 +0000 (04:30 +0200)]
s3:selftest: run some rpcclient tests with "packet"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:selftest: run some tests with "packet"
Stefan Metzmacher [Mon, 19 Sep 2016 05:29:59 +0000 (07:29 +0200)]
s4:selftest: run some tests with "packet"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3-rpcclient: add packet auth level command
Günther Deschner [Tue, 6 Sep 2016 15:11:29 +0000 (17:11 +0200)]
s3-rpcclient: add packet auth level command

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3-rpcclient: support [packet] in rpcclient binding strings.
Günther Deschner [Tue, 6 Sep 2016 15:07:32 +0000 (17:07 +0200)]
s3-rpcclient: support [packet] in rpcclient binding strings.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:rpc_server: add support for DCERPC_AUTH_LEVEL_PACKET
Stefan Metzmacher [Thu, 22 Sep 2016 22:16:13 +0000 (00:16 +0200)]
s3:rpc_server: add support for DCERPC_AUTH_LEVEL_PACKET

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:cli_pipe: add support for DCERPC_AUTH_LEVEL_PACKET
Günther Deschner [Tue, 30 Aug 2016 13:52:41 +0000 (15:52 +0200)]
s3:cli_pipe: add support for DCERPC_AUTH_LEVEL_PACKET

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:dcerpc_helpers: correctly support DCERPC_AUTH_LEVEL_PACKET
Stefan Metzmacher [Thu, 22 Sep 2016 22:11:03 +0000 (00:11 +0200)]
s3:dcerpc_helpers: correctly support DCERPC_AUTH_LEVEL_PACKET

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:librpc/rpc: add support for DCERPC_AUTH_LEVEL_PACKET
Günther Deschner [Tue, 30 Aug 2016 13:52:41 +0000 (15:52 +0200)]
s4:librpc/rpc: add support for DCERPC_AUTH_LEVEL_PACKET

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4-torture: test support for [packet] binding string option.
Günther Deschner [Wed, 31 Aug 2016 15:51:12 +0000 (17:51 +0200)]
s4-torture: test support for [packet] binding string option.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibrpc: support "packet" for packet level authentication in binding strings
Günther Deschner [Tue, 30 Aug 2016 13:44:40 +0000 (15:44 +0200)]
librpc: support "packet" for packet level authentication in binding strings

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: convert dcesrv_auth_response() into a generic dcesrv_auth_pkt_push()
Stefan Metzmacher [Fri, 23 Oct 2015 14:06:17 +0000 (16:06 +0200)]
s4:rpc_server: convert dcesrv_auth_response() into a generic dcesrv_auth_pkt_push()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: make use of dcerpc_ncacn_push_pkt_auth() in dcesrv_auth_response()
Stefan Metzmacher [Fri, 23 Oct 2015 14:06:17 +0000 (16:06 +0200)]
s4:rpc_server: make use of dcerpc_ncacn_push_pkt_auth() in dcesrv_auth_response()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: convert dcesrv_auth_request() into a generic dcesrv_auth_pkt_pull()
Stefan Metzmacher [Wed, 28 Oct 2015 12:04:38 +0000 (13:04 +0100)]
s4:rpc_server: convert dcesrv_auth_request() into a generic dcesrv_auth_pkt_pull()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:rpc_server: make use of dcerpc_ncacn_pull_pkt_auth() in dcesrv_auth_request()
Stefan Metzmacher [Wed, 28 Oct 2015 12:04:38 +0000 (13:04 +0100)]
s4:rpc_server: make use of dcerpc_ncacn_pull_pkt_auth() in dcesrv_auth_request()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:librpc/rpc: make use of dcerpc_ncacn_push_pkt_auth() in ncacn_push_request_sign()
Stefan Metzmacher [Thu, 8 Sep 2016 13:07:36 +0000 (15:07 +0200)]
s4:librpc/rpc: make use of dcerpc_ncacn_push_pkt_auth() in ncacn_push_request_sign()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4:librpc/rpc: convert ncacn_pull_request_auth() into a generic ncacn_pull_pkt_auth()
Stefan Metzmacher [Tue, 13 Oct 2015 13:42:32 +0000 (15:42 +0200)]
s4:librpc/rpc: convert ncacn_pull_request_auth() into a generic ncacn_pull_pkt_auth()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>