Andreas Schneider [Thu, 10 Nov 2016 10:47:54 +0000 (11:47 +0100)]
s3-printing: Allow printer names longer than 16 chars
Printers with long names are supported in the meantime. However we issue
a warning that if one printer exceeeds 15 chars we warn about it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12195
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 11 00:02:10 CET 2016 on sn-devel-144
Andreas Schneider [Wed, 9 Nov 2016 18:05:49 +0000 (19:05 +0100)]
s3-printing: Correctly encode CUPS printer URIs
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12183
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 4 Nov 2016 15:00:05 +0000 (16:00 +0100)]
s3-client: Sync in tool cmdline help with smbclient manpage
From smbclient manpage:
notify <dir name>
Query a directory for change notifications. This command issues a
recursive filechangenotify call for all possible changes.
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): Wed Nov 9 06:12:23 CET 2016 on sn-devel-144
Andreas Schneider [Tue, 8 Nov 2016 11:20:41 +0000 (12:20 +0100)]
s3-spoolss: Remove printer from registry if it is unpublished
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11665
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov 8 18:05:10 CET 2016 on sn-devel-144
Andreas Schneider [Tue, 8 Nov 2016 11:20:25 +0000 (12:20 +0100)]
s3-printing: Improve debug message
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Martin Schwenke [Fri, 4 Nov 2016 00:47:18 +0000 (11:47 +1100)]
ctdb-tests: Add tests for updated Debian style Samba start/stop
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12371
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Nov 7 08:01:28 CET 2016 on sn-devel-144
Mathieu Parent [Mon, 31 Oct 2016 14:17:34 +0000 (15:17 +0100)]
ctdb-scripts: Fix Debian init in samba eventscript
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12371
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Signed-off-by: Stefan Kania <stefan@kania-online.de>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Andrew Bartlett [Tue, 11 Oct 2016 22:28:26 +0000 (11:28 +1300)]
credentials: Add test for credentials behaviour
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Nov 7 03:51:11 CET 2016 on sn-devel-144
Andrew Bartlett [Tue, 11 Oct 2016 22:27:54 +0000 (11:27 +1300)]
pycredentials: Add bindings for {get,set}_principal, get_ntlm_username_domain
These will be used in testsuite for the credentials code
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Lumir Balhar [Wed, 19 Oct 2016 10:11:31 +0000 (12:11 +0200)]
python: samba.tests.credentials: Add tests
Newly tested functions:
- set_utf16_password
- set_old_password
- get_old_password
- set_old_utf16_password
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Lumir Balhar [Tue, 18 Oct 2016 12:30:28 +0000 (14:30 +0200)]
python: samba.tests.credentials: Fix DeprecationWarning
For historical reasons, TestCase methods have some aliases
which are deprecated since Python 2.7.
Change "assertEquals" to the preferred name, "assertEqual".
Deprecation notice: https://docs.python.org/2/library/unittest.html#deprecated-aliases
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Tue, 1 Nov 2016 03:29:53 +0000 (16:29 +1300)]
samba_tool/fsmo: Allocate RID Set when seizing RID manager
Seizing the role without allocating a RID set for itself is likely prone
to cause issues.
Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>
Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
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=9954
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Fri Nov 4 08:37:05 CET 2016 on sn-devel-144
Andrew Bartlett [Mon, 31 Oct 2016 23:38:48 +0000 (12:38 +1300)]
python-libnet: Use new NTSTATUSError, WERRORError and DsExtendedError exceptions
This will allow callers to catch specific errors rather than RuntimeException
As this slightly changes the exception, the timecmd test must be updated.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
Andrew Bartlett [Tue, 1 Nov 2016 03:09:20 +0000 (16:09 +1300)]
python: Add DsExtendedError Exception
This will be used for checking errors during a GetNCChanges EXOP like
RID Set allocation.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
Andrew Bartlett [Tue, 1 Nov 2016 03:03:09 +0000 (16:03 +1300)]
pyerrors: Add PyErr_Set{WERROR,HRESULT,NTSTATUS}_and_string()
This varient allows control of the text explaination string
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
Andrew Bartlett [Tue, 1 Nov 2016 02:23:58 +0000 (15:23 +1300)]
python: create NTSTATUSError, HRESULTError and WERRORError
The advantage of these over the previous use of just RuntimeError is that we can
catch just the errors we want, without having to catch all possible RuntimeError
cases and assume they decode to a tuple
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
Andrew Bartlett [Mon, 31 Oct 2016 03:25:51 +0000 (16:25 +1300)]
dsdb: Catch errors in extended operations (like allocating a RID Set)
There are cases where allocating a RID Set can reasonably fail. Catch those nicely.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
Andrew Bartlett [Mon, 31 Oct 2016 03:19:37 +0000 (16:19 +1300)]
dsdb: Rework DSDB code to use WERROR
The WERROR codes are more descriptive for DSDB issues, and almost all the code was
converting from WERROR to NTSTATUS. This will allow us to better catch specific
errors like WERR_DS_DRA_MISSING_PARENT
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
Andrew Bartlett [Sun, 30 Oct 2016 21:41:39 +0000 (10:41 +1300)]
dsdb: Create RID Set as SYSTEM
We do not want random users with add-user rights to own the new RID Set for this
server, and the ridSet class is thankfully system-only.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Andrew Bartlett [Thu, 3 Nov 2016 00:30:56 +0000 (13:30 +1300)]
dbcheck: Correctly initialise keep_transaction in missing_parent test
Otherwise there is no point to this variable, we are trying to work out
if the subsequent modify succeded
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954
Clive Ferreira [Thu, 27 Oct 2016 04:28:01 +0000 (17:28 +1300)]
dbcheck: confirm RID Set presence and consistency
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954
Andrew Bartlett [Fri, 28 Oct 2016 03:08:57 +0000 (16:08 +1300)]
dsdb: Add python hooks to allocate a RID set and allocate a RID pool
This will help us to correct errors during dbcheck
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954
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>
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
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
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
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
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
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
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
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
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
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
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
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
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>