bbaumbach/samba-autobuild/.git
5 years agodocs: add documentation for the samba-tool ntacl changedomsid command
Björn Baumbach [Wed, 19 Jun 2019 10:22:01 +0000 (12:22 +0200)]
docs: add documentation for the samba-tool ntacl changedomsid command

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoCVE-2019-12436 dsdb/paged_results: ignore successful results without messages
Douglas Bagnall [Fri, 17 May 2019 02:42:24 +0000 (14:42 +1200)]
CVE-2019-12436 dsdb/paged_results: ignore successful results without messages

So that we don't dereference result->msgs[0] when it doesn't exist.
This can happen when the object has changed in such a way that it no
longer matches the original search query.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Wed Jun 19 08:16:39 UTC 2019 on sn-devel-184

5 years agoCVE-2019-12435 rpc/dns: avoid NULL deference if zone not found in DnssrvOperation2
Douglas Bagnall [Wed, 22 May 2019 01:23:25 +0000 (13:23 +1200)]
CVE-2019-12435 rpc/dns: avoid NULL deference if zone not found in DnssrvOperation2

We still want to return DOES_NOT_EXIST when request_filter is not 0.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoCVE-2019-12435 rpc/dns: avoid NULL deference if zone not found in DnssrvOperation
Douglas Bagnall [Wed, 22 May 2019 00:58:01 +0000 (12:58 +1200)]
CVE-2019-12435 rpc/dns: avoid NULL deference if zone not found in DnssrvOperation

We still want to return DOES_NOT_EXIST when request_filter is not 0.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:client: Link smbspool_krb5_wrapper against krb5samba
Andreas Schneider [Tue, 18 Jun 2019 12:43:50 +0000 (14:43 +0200)]
s3:client: Link smbspool_krb5_wrapper against krb5samba

Heimdal doesn't provide krb5_free_unparsed_name(), so we need to use the
function we provide in krb5samba.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 18 18:10:40 UTC 2019 on sn-devel-184

5 years agowafsamba: Use native waf timer
Lukas Slebodnik [Wed, 12 Jun 2019 10:27:04 +0000 (12:27 +0200)]
wafsamba: Use native waf timer

  __main__:1: DeprecationWarning: time.clock has been deprecated in Python 3.3
  and will be removed from Python 3.8: use time.perf_counter
  or time.process_time instead

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

Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoselftest: add tests for samba-tool ntacl changedomsid
Björn Baumbach [Wed, 12 Jun 2019 19:02:43 +0000 (21:02 +0200)]
selftest: add tests for samba-tool ntacl changedomsid

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Jun 18 16:54:22 UTC 2019 on sn-devel-184

5 years agosamba-tool: add ntacl changedomsid command
Björn Baumbach [Tue, 11 Jun 2019 13:11:20 +0000 (15:11 +0200)]
samba-tool: add ntacl changedomsid command

This tool is meant to locally change all entries in acl_xattr when the
machine's SID has accidentially changed or the data set has been copied
to another box either via backup/restore or rsync.

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosamba-tool ntacl: consolidate code for getting the local domain sid
Björn Baumbach [Mon, 17 Jun 2019 12:20:56 +0000 (14:20 +0200)]
samba-tool ntacl: consolidate code for getting the local domain sid

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopython/ntacls: use correct "state directory" smb.conf option instead of "state dir"
Björn Baumbach [Wed, 12 Jun 2019 19:16:25 +0000 (21:16 +0200)]
python/ntacls: use correct "state directory" smb.conf option instead of "state dir"

samba-tool ntacl get testfile --xattr-backend=tdb --use-ntvfs
Fixes: Unknown parameter encountered: "state dir"
Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoselftest: add test for samba-tool ntacl get/set --use-ntvfs --xattr-backend=tdb
Björn Baumbach [Wed, 12 Jun 2019 19:00:01 +0000 (21:00 +0200)]
selftest: add test for samba-tool ntacl get/set --use-ntvfs --xattr-backend=tdb

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Deprecate "blocking locks" parameter
Volker Lendecke [Thu, 13 Jun 2019 19:21:09 +0000 (12:21 -0700)]
smbd: Deprecate "blocking locks" parameter

This parameter adds complexity to our brlock implementation that I don't think
is justified. Not a lot of complexity, but if we would want to really support
it we'd need tests. Instead of doing those, I think removing the parameter is
the better choice.

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): Tue Jun 18 14:47:08 UTC 2019 on sn-devel-184

5 years agosmbd: Slightly simplify smb_set_posix_lock()
Volker Lendecke [Tue, 11 Jun 2019 12:04:39 +0000 (05:04 -0700)]
smbd: Slightly simplify smb_set_posix_lock()

Avoid indentation by an early return;

Best viewed with git show -b

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Add a explanation for num_aio_requests
Volker Lendecke [Mon, 3 Jun 2019 11:41:30 +0000 (13:41 +0200)]
smbd: Add a explanation for num_aio_requests

We could have used talloc_array_length()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Align integer types in reply_lockingX
Volker Lendecke [Mon, 3 Jun 2019 09:16:33 +0000 (11:16 +0200)]
smbd: Align integer types in reply_lockingX

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Avoid casts
Volker Lendecke [Mon, 3 Jun 2019 19:31:26 +0000 (21:31 +0200)]
smbd: Avoid casts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbtorture: Match comment with test
Volker Lendecke [Sun, 2 Jun 2019 10:50:50 +0000 (12:50 +0200)]
smbtorture: Match comment with test

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Fix a typo
Volker Lendecke [Sat, 1 Jun 2019 12:46:55 +0000 (14:46 +0200)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: smbd_do_locking() does not use the "type" param anymore
Volker Lendecke [Mon, 3 Jun 2019 09:34:51 +0000 (11:34 +0200)]
smbd: smbd_do_locking() does not use the "type" param anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Simplify smbd_do_locking()
Volker Lendecke [Fri, 31 May 2019 10:19:25 +0000 (12:19 +0200)]
smbd: Simplify smbd_do_locking()

LOCKING_ANDX_CANCEL_LOCK only is used in SMB1. Move its handling out
of the shared smb1/smb2 code.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Slightly simplify reply_lockingX()
Volker Lendecke [Thu, 30 May 2019 09:42:16 +0000 (11:42 +0200)]
smbd: Slightly simplify reply_lockingX()

Make the data dependencies more obvious. "locks" and "ulocks" are used
only for short time spans. Any sane compiler will coalesce them to
just one stack variable.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Slightly simplify reply_lockingX()
Volker Lendecke [Thu, 30 May 2019 09:39:10 +0000 (11:39 +0200)]
smbd: Slightly simplify reply_lockingX()

The brltype only depends upon the central locktype, don't calculate it
every time in the loop parsing the lock requests

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Slightly simplify reply_lockingX()
Volker Lendecke [Thu, 30 May 2019 09:31:56 +0000 (11:31 +0200)]
smbd: Slightly simplify reply_lockingX()

Don't do an "else" after an early return

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Use cli_lockingx() in cli_unlock()
Volker Lendecke [Thu, 30 May 2019 07:52:22 +0000 (09:52 +0200)]
libsmb: Use cli_lockingx() in cli_unlock()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Use cli_lockingx() in cli_locktype()
Volker Lendecke [Thu, 30 May 2019 07:42:36 +0000 (09:42 +0200)]
libsmb: Use cli_lockingx() in cli_locktype()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Use cli_lockingx() in cli_oplock_ack()
Volker Lendecke [Thu, 30 May 2019 07:25:41 +0000 (09:25 +0200)]
libsmb: Use cli_lockingx() in cli_oplock_ack()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Add async cli_lockingx()
Volker Lendecke [Wed, 29 May 2019 15:45:19 +0000 (17:45 +0200)]
libsmb: Add async cli_lockingx()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Remove unused is_andx_req
Volker Lendecke [Thu, 30 May 2019 08:02:47 +0000 (10:02 +0200)]
libsmb: Remove unused is_andx_req

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Use smb1cli_is_andx_req()
Volker Lendecke [Thu, 30 May 2019 08:01:34 +0000 (10:01 +0200)]
smbd: Use smb1cli_is_andx_req()

We have two implementations of this -- use the one from common libs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Remove unused cli_[un]lock64()
Volker Lendecke [Thu, 30 May 2019 07:55:30 +0000 (09:55 +0200)]
libsmb: Remove unused cli_[un]lock64()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibsmb: Align integer types
Volker Lendecke [Thu, 30 May 2019 07:55:11 +0000 (09:55 +0200)]
libsmb: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Avoid a "?true:false" in smbd_do_locking
Volker Lendecke [Sun, 26 May 2019 08:59:01 +0000 (10:59 +0200)]
smbd: Avoid a "?true:false" in smbd_do_locking

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib/replace: Remove #undef TCP_NODELAY
Andrew Bartlett [Tue, 11 Jun 2019 12:44:14 +0000 (14:44 +0200)]
lib/replace: Remove #undef TCP_NODELAY

A duplicate define warning is better than not defining this at all.

Similar to a patch Torsten Werner submitted to the Samba Bugzilla in
2005.

Not tested on HP-UX

reverts fc84e916f628b4fb6f6667ad45d0ced0e9134b23 that was still present in
the new copy of nis.h created in c29d087e1ea4c92717ef86e372fe80f410580fdc

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 18 06:47:05 UTC 2019 on sn-devel-184

5 years agoautobuild: Fix autobuild for python3
Volker Lendecke [Fri, 14 Jun 2019 12:55:03 +0000 (14:55 +0200)]
autobuild: Fix autobuild for python3

"keys()" in python3 returns an unmodifiable view object. Two lines
down we might want to modify it, which python3 does not allow.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm ldb_kv
Gary Lockyer [Wed, 12 Jun 2019 20:49:16 +0000 (08:49 +1200)]
lib ldb ldb_key_value: csbuild unused parm ldb_kv

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_search.c: scope_hint: In
function ‘search_func’ lib/ldb/ldb_key_value/ldb_kv_search.c:308:47:
warning: unused parameter ‘ldb_kv’ [-Wunused-parameter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jun 13 08:27:12 UTC 2019 on sn-devel-184

5 years agolib ldb_key_value: csbuild unused parm key
Gary Lockyer [Fri, 7 Jun 2019 03:25:50 +0000 (15:25 +1200)]
lib ldb_key_value: csbuild unused parm key

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function ‘re_pack’
lib/ldb/ldb_key_value/ldb_kv_index.c:3416:21: warning: unused parameter
‘key’ [-Wunused-parameter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild fix unused parm data
Gary Lockyer [Fri, 7 Jun 2019 03:22:45 +0000 (15:22 +1200)]
lib ldb ldb_key_value: csbuild fix unused parm data

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘delete_index’
lib/ldb/ldb_key_value/ldb_kv_index.c:3221:19: warning: unused parameter
‘data’ [-Wunused-parameter]

Tags unused parameters in callback delete_index with _UNUSED_

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild fix signed unsigned compare
Gary Lockyer [Fri, 7 Jun 2019 03:19:25 +0000 (15:19 +1200)]
lib ldb ldb_key_value: csbuild fix signed unsigned compare

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_index_add1’
lib/ldb/ldb_key_value/ldb_kv_index.c:2601:15: warning: comparison of
integer expressions of different signedness: ‘int’ and ‘unsigned int’
[-Wsign-compare]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parms ldb_kv, key
Gary Lockyer [Fri, 7 Jun 2019 03:17:01 +0000 (15:17 +1200)]
lib ldb ldb_key_value: csbuild unused parms ldb_kv, key

Fixes csbuild errors.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘traverse_range_index’
lib/ldb/ldb_key_value/ldb_kv_index.c:1653:56: warning: unused parameter
‘ldb_kv’ [-Wunused-parameter]

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1654:20: warning: unused parameter
‘key’ [-Wunused-parameter]

Tags unused parameters in the callback function traverse_range_index with
_UNUSED_

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild ldb_kv_index_dn_not unused parms
Gary Lockyer [Fri, 7 Jun 2019 03:12:11 +0000 (15:12 +1200)]
lib ldb ldb_key_value: csbuild ldb_kv_index_dn_not unused parms

Fixes csbuild errors.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_index_dn_not’
lib/ldb/ldb_key_value/ldb_kv_index.c:1503:51: warning: unused parameter
‘module’ [-Wunus ed-parameter]

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1504:34: warning: unused parameter
‘ldb_kv’ [-Wunused-parameter]

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1505:40: warning: unused parameter
‘tree’ [-Wunused-parameter]

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1506:27: warning: unused parameter
‘list’ [-Wunused-parameter]

Tag unused parameters in ldb_kv_index_dn_not with _UNUSED_

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm ldb
Gary Lockyer [Fri, 7 Jun 2019 02:57:19 +0000 (14:57 +1200)]
lib ldb ldb_key_value: csbuild unused parm ldb

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘list_intersect’
lib/ldb/ldb_key_value/ldb_kv_index.c:1275:48: warning: unused parameter
‘ldb’ [-Wunused-parameter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm tdb
Gary Lockyer [Fri, 7 Jun 2019 02:54:03 +0000 (14:54 +1200)]
lib ldb ldb_key_value: csbuild unused parm tdb

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_index_traverse_store’
lib/ldb/ldb_key_value/ldb_kv_index.c:779:60: warning: unused parameter
‘tdb’ [-Wunused-parameter]

By tagging the tdb_context parameter in ldb_kv_index_traverse_store as
_UNUSED_

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild fix integer comparison
Gary Lockyer [Fri, 7 Jun 2019 02:48:53 +0000 (14:48 +1200)]
lib ldb ldb_key_value: csbuild fix integer comparison

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_key_dn_from_idx’
lib/ldb/ldb_key_value/ldb_kv_index.c:545:15: warning: comparison of
integer expressions of different signedness: ‘int’ and ‘unsigned int’
[-Wsign-compare]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm ldb_kv_timeout
Gary Lockyer [Fri, 7 Jun 2019 02:45:31 +0000 (14:45 +1200)]
lib ldb ldb_key_value: csbuild unused parm ldb_kv_timeout

Fixes csbuild errors.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c: scope_hint: In function ‘ldb_kv_timeout’
lib/ldb/ldb_key_value/ldb_kv.c:1675:51: warning: unused parameter ‘ev’
[-Wunused-parameter]

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c:1676:28: warning: unused parameter ‘te’
[-Wunused-parameter]

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c:1677:22: warning: unused parameter ‘t’
[-Wunused-parameter]

Tag the unused variables in ldb_kv_timeout with _UNUSED_

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb: csbuild add lib/util/attr.h to dist
Gary Lockyer [Wed, 12 Jun 2019 20:51:05 +0000 (08:51 +1200)]
lib ldb: csbuild add lib/util/attr.h to dist

Add lib/util/attr.h to the ldb distribution, to make the _UNUSED_ macro
available.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm ldb_kv
Gary Lockyer [Fri, 7 Jun 2019 02:38:59 +0000 (14:38 +1200)]
lib ldb ldb_key_value: csbuild unused parm ldb_kv

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c:158:33: warning: unused parameter
‘ldb_kv’ [-Wunused-parameter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm module
Gary Lockyer [Fri, 7 Jun 2019 02:34:44 +0000 (14:34 +1200)]
lib ldb ldb_key_value: csbuild unused parm module

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c: scope_hint: In function
‘ldb_kv_guid_to_key’
lib/ldb/ldb_key_value/ldb_kv.c:157:43: warning: unused parameter
‘module’ [-Wunused-parameter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib ldb ldb_key_value: csbuild unused parm module
Gary Lockyer [Fri, 7 Jun 2019 02:29:44 +0000 (14:29 +1200)]
lib ldb ldb_key_value: csbuild unused parm module

Fixes csbuild error.

Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c: scope_hint: In function ‘ldb_kv_key_dn’
lib/ldb/ldb_key_value/ldb_kv.c:109:49: warning: unused parameter
‘module’ [-Wunused-para
meter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib audit_logging tests: csbuild unused parms
Gary Lockyer [Fri, 7 Jun 2019 02:21:41 +0000 (14:21 +1200)]
lib audit_logging tests: csbuild unused parms

Fixes csbuild unused parameter error:
   warning: unused parameter ‘state’
   warning: unused parameter ‘argc’
   warning: unused parameter ‘argv’

By adding _UNUSED_ to paramter declaration.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoauth auth_log: csbuild unused parm transport_protection
Gary Lockyer [Fri, 7 Jun 2019 01:53:58 +0000 (13:53 +1200)]
auth auth_log: csbuild unused parm transport_protection

Fixes csbuild errors.

Error: COMPILER_WARNING:
auth/auth_log.c: scope_hint: In function
‘log_successful_authz_event_human_readable’
auth/auth_log.c:728:14: warning: unused parameter ‘transport_protection’
[-Wunused-param
eter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoauth auth_log: csbuild unused parm unix_username
Gary Lockyer [Fri, 7 Jun 2019 01:41:35 +0000 (13:41 +1200)]
auth auth_log: csbuild unused parm unix_username

Fixes csbuild errors

Error: COMPILER_WARNING:
auth/auth_log.c: scope_hint: In function ‘log_authentication_event_json’
auth/auth_log.c:146:14: warning: unused parameter ‘unix_username’
[-Wunused-parameter]

Error: COMPILER_WARNING:
auth/auth_log.c: scope_hint: In function
‘log_authentication_event_human_readable’
auth/auth_log.c:586:14: warning: unused parameter ‘unix_username’
[-Wunused-parameter]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agotorture: Use two connections in SMB2 sharemode tests
Christof Schmitt [Mon, 3 Jun 2019 18:51:14 +0000 (11:51 -0700)]
torture: Use two connections in SMB2 sharemode tests

This allows using the unclist option to specify multiple targets, e.g.
for testing against multiple nodes in a clustered Samba environment.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 12 20:02:26 UTC 2019 on sn-devel-184

5 years agolibcli/smb: harden smbXcli_session_shallow_copy against nonce reusage
Stefan Metzmacher [Tue, 11 Jun 2019 15:44:04 +0000 (17:44 +0200)]
libcli/smb: harden smbXcli_session_shallow_copy against nonce reusage

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jun 12 13:56:19 UTC 2019 on sn-devel-184

5 years agolibcli/smb: s/smbXcli_session_copy/smbXcli_session_shallow_copy
Stefan Metzmacher [Tue, 11 Jun 2019 15:42:38 +0000 (17:42 +0200)]
libcli/smb: s/smbXcli_session_copy/smbXcli_session_shallow_copy

We should make clear that this is a function for testing only,
with possible strange side effects.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos4:torture: force signing in the smb2.session.bind1 test
Stefan Metzmacher [Fri, 7 Jun 2019 17:38:26 +0000 (19:38 +0200)]
s4:torture: force signing in the smb2.session.bind1 test

This test is supposed to test which signing keys are used on
each of the channels, so it's important to require signing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibcli/smb: only fallback to the global smb2 signing key if we should sign
Andreas Schneider [Fri, 7 Jun 2019 17:00:25 +0000 (19:00 +0200)]
libcli/smb: only fallback to the global smb2 signing key if we should sign

We should only sign if we're asked for it. The signing keys are
always generated, so we were always using global signing key
and signed with it when signing was not asked for.

By luck this was the correct signing key for the 1st channel.

But multi channel connections where broken is the server nor the client
require/desire signing. It seems the tests only ever run against
Windows domain controllers, which always require signing.

Note that the following code in smb2cli_req_create() makes
sure that we always sign session binds:

  if (cmd == SMB2_OP_SESSSETUP &&
      !smb2_signing_key_valid(session->smb2_channel.signing_key) &&
      smb2_signing_key_valid(session->smb2->signing_key))
  {
          /*
           * a session bind needs to be signed
           */
          state->smb2.should_sign = true;
  }

This removed a logic changed introduced in commit
17e22e020fcb84fb9ddda350915369dc9ea28ef1. As

  if (!smb2_signing_key_valid(signing_key)) {

is not the same as:

  if (signing_key && signing_key->length == 0) {

it's the same as:

  if (signing_key == NULL || signing_key->length == 0) {

so we need:

  if (signing_key != NULL && !smb2_signing_key_valid(signing_key)) {

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
5 years agolibcli/smb: make sure the session->{smb2->,smb2_channel.}signing_key is never NULL!
Stefan Metzmacher [Fri, 7 Jun 2019 16:58:43 +0000 (18:58 +0200)]
libcli/smb: make sure the session->{smb2->,smb2_channel.}signing_key is never NULL!

Before commit 17e22e020fcb84fb9ddda350915369dc9ea28ef1 they we not a
pointer and always be present.

We used the local pointer variable 'signing_key = NULL' and logic like
this:

    if (state->smb2.should_sign) {
        signing_key = state->session->smb2_channel.signing_key;
    }

    if (signing_key != NULL ...

In order to keep this we need to nake sure
state->session->smb2_channel.signing_key is never NULL!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoRevert "libcli:smb: Fix signing with multichannel"
Stefan Metzmacher [Tue, 11 Jun 2019 15:47:33 +0000 (17:47 +0200)]
Revert "libcli:smb: Fix signing with multichannel"

This reverts commit 1817db965dc0caf55e4308fa4d9203ab4381dc90.

This was pushed to fast, the corrected commit follows.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoRevert "libcli/smb: add missing struct smb2_signing_key allocation in smb2cli_session...
Stefan Metzmacher [Tue, 11 Jun 2019 15:47:24 +0000 (17:47 +0200)]
Revert "libcli/smb: add missing struct smb2_signing_key allocation in smb2cli_session_set_channel_key()"

This reverts commit 08750166542f46644038d1ff9d839b270436addf.

This was pushed to fast, the corrected commit follows.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibcli/smb: add missing struct smb2_signing_key allocation in smb2cli_session_set_cha...
Stefan Metzmacher [Fri, 7 Jun 2019 16:58:43 +0000 (18:58 +0200)]
libcli/smb: add missing struct smb2_signing_key allocation in smb2cli_session_set_channel_key()

This was missing in commit 17e22e020fcb84fb9ddda350915369dc9ea28ef1
and causes all multi-channel tests to segfault.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 11 15:25:56 UTC 2019 on sn-devel-184

5 years agolibcli:smb: Fix signing with multichannel
Andreas Schneider [Tue, 11 Jun 2019 13:39:24 +0000 (15:39 +0200)]
libcli:smb: Fix signing with multichannel

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: net: Consider unprocessed in input buffer
Samuel Cabrero [Fri, 7 Jun 2019 19:12:12 +0000 (21:12 +0200)]
s3: net: Consider unprocessed in input buffer

If there is unprocessed data in the input buffer (ilen > 0), place new
data read after the unprocessed one.

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib/tdb/common: clang: Fix 'Value stored to 'last_ptr' is never read'
Noel Power [Mon, 27 May 2019 15:47:54 +0000 (15:47 +0000)]
lib/tdb/common: clang: Fix 'Value stored to 'last_ptr' is never read'

Fixes

lib/tdb/common/freelistcheck.c:96:3: warning: Value stored to 'last_ptr' is never read <--[clang]
                last_ptr = rec_ptr;
                ^          ~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Jun 11 13:31:01 UTC 2019 on sn-devel-184

5 years agolibrpc/ndr: clang: Fix Assigned value is garbage or undefined warning
Noel Power [Fri, 24 May 2019 14:16:40 +0000 (14:16 +0000)]
librpc/ndr: clang: Fix Assigned value is garbage or undefined warning

Fixes:

librpc/ndr/ndr_basic.c:170:5: warning: Assigned value is garbage or undefined <--[clang]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agolib/util: clang: Fix dereference of a null pointer warning
Noel Power [Fri, 24 May 2019 14:08:58 +0000 (14:08 +0000)]
lib/util: clang: Fix dereference of a null pointer warning

Fixes:

lib/util/rbtree.c:170:8: warning: Access to field 'rb_parent_color' results in a dereference of a null pointer (loaded from variable 'other') <--[clang]

We could avoid accessing the NULL pointer but previously the code would
have crashed here. Given this is a rbtree probably better to preserve the
fatal nature of encountering a NULL pointer here while satisfying the static
checker.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agolib/util: clang: Fix a dereference of a null pointer warning(s)
Noel Power [Fri, 24 May 2019 14:03:37 +0000 (14:03 +0000)]
lib/util: clang: Fix a dereference of a null pointer warning(s)

Fixes:

lib/util/ms_fnmatch.c:75:8: warning: Access to field 'predot' results in a dereference of a null pointer (loaded from variable 'max_n') <--[clang]
                        if (max_n->predot && max_n->predot <= n) {
                            ^
lib/util/ms_fnmatch.c:91:8: warning: Access to field 'predot' results in a dereference of a null pointer (loaded from variable 'max_n') <--[clang]
                        if (max_n->predot && max_n->predot <= n) {

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agolib/util/charset: clang: Fix Value stored to 'reason' is never read warning
Noel Power [Fri, 24 May 2019 13:37:00 +0000 (13:37 +0000)]
lib/util/charset: clang: Fix Value stored to 'reason' is never read warning

Fixes:

lib/util/charset/convert_string.c:301:5: warning: Value stored to 'reason' is never read <--[clang]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agolib/util: clang: Fix 'Null pointer passed as an argument...' warning
Noel Power [Fri, 24 May 2019 13:32:09 +0000 (13:32 +0000)]
lib/util: clang: Fix 'Null pointer passed as an argument...' warning

Fixes:

lib/util/debug.c:705:7: warning: Null pointer passed as an argument to a 'nonnull' parameter <--[clang]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agoDLIST_REMOVE: clang: Fix dereference of a null pointer warning
Noel Power [Fri, 24 May 2019 13:07:46 +0000 (13:07 +0000)]
DLIST_REMOVE: clang: Fix dereference of a null pointer warning

Fixes:

lib/tevent/tevent_wrapper.c:295:3: warning: Access to field 'next' results in a dereference of a null pointer (loaded from field 'prev') <--[clang]

Additionally fix similar instance of the same macro

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agolib/tevent: clang:
Noel Power [Fri, 24 May 2019 13:01:30 +0000 (13:01 +0000)]
lib/tevent: clang:

Fixes:

lib/tevent/tevent_wrapper.c:213:6: warning: Access to field 'destroyed' results in a dereference of a null pointer (loaded from variable 'glue') <--[clang]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agos4/torture/rpc: cppcheck: Fix ctunullpointer error
Noel Power [Fri, 24 May 2019 11:03:09 +0000 (11:03 +0000)]
s4/torture/rpc: cppcheck: Fix ctunullpointer error

Fixes

source4/torture/rpc/netlogon.c:307: error: ctunullpointer: Null pointer dereference: p <--[cppcheck]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer gary@catalyst.net.nz
5 years agos3/vfs_glusterfs_fuse: Avoid using NAME_MAX directly
Günther Deschner [Mon, 3 Jun 2019 14:28:36 +0000 (16:28 +0200)]
s3/vfs_glusterfs_fuse: Avoid using NAME_MAX directly

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jun 11 00:29:19 UTC 2019 on sn-devel-184

5 years agos3/vfs_glusterfs: Avoid using NAME_MAX directly
Günther Deschner [Mon, 3 Jun 2019 14:25:46 +0000 (16:25 +0200)]
s3/vfs_glusterfs: Avoid using NAME_MAX directly

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoRevert "s3/vfs_glusterfs_fuse: Dynamically determine NAME_MAX"
Günther Deschner [Mon, 3 Jun 2019 12:27:44 +0000 (14:27 +0200)]
Revert "s3/vfs_glusterfs_fuse: Dynamically determine NAME_MAX"

This reverts commit e28d172b00cadf492c22bd892e2dda3bf2fe2d70.

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoRevert "s3/vfs_glusterfs: Dynamically determine NAME_MAX"
Günther Deschner [Mon, 3 Jun 2019 12:27:18 +0000 (14:27 +0200)]
Revert "s3/vfs_glusterfs: Dynamically determine NAME_MAX"

This reverts commit 8e3a042eb9e502821b147f1bbb2d98d59f17a095.

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoWHATSNEW.txt: reindex performance, Bind9 logging
Gary Lockyer [Thu, 6 Jun 2019 22:01:14 +0000 (10:01 +1200)]
WHATSNEW.txt: reindex performance, Bind9 logging

Add entries for:
  Reindex performance improvements
  Bind9 logging
  LDAP referrals

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Autobuild-User(master): Tim Beale <timbeale@samba.org>
Autobuild-Date(master): Mon Jun 10 06:13:27 UTC 2019 on sn-devel-184

5 years agoRevert TestCaseInSubDir parts of "downgradedatabase: blackbox test"
Andrew Bartlett [Fri, 31 May 2019 00:47:13 +0000 (12:47 +1200)]
Revert TestCaseInSubDir parts of "downgradedatabase: blackbox test"

This reverts part of commit 74d15c9bf76f0a2fb5fa7b7b1d80971d10c4fe45.

TestCaseInSubDir should not have been modified in this way, instead
the downgradedatabase test should have removed the files it created
specifically (this is part of the test, it shows the right files were
created).

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jun  7 21:08:12 UTC 2019 on sn-devel-184

5 years agoselftest: Specifically remove files generated by provision
Andrew Bartlett [Fri, 31 May 2019 01:06:59 +0000 (13:06 +1200)]
selftest: Specifically remove files generated by provision

This allows the changes in 74d15c9bf76f0a2fb5fa7b7b1d80971d10c4fe45 to
be reverted, and aligns this test with others that use TestCaseInTempDir.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agopy3: Remove unused PyInt_AsSsize_t macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 04:04:19 +0000 (06:04 +0200)]
py3: Remove unused PyInt_AsSsize_t macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun  6 13:26:05 UTC 2019 on sn-devel-184

5 years agopy3: Remove unused PyInt_AsUnsignedLongLongMask macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 04:02:49 +0000 (06:02 +0200)]
py3: Remove unused PyInt_AsUnsignedLongLongMask macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyInt_AS_LONG macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 04:02:02 +0000 (06:02 +0200)]
py3: Remove unused PyInt_AS_LONG macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyInt_FromSize_t macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 04:01:16 +0000 (06:01 +0200)]
py3: Remove unused PyInt_FromSize_t macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyInt_FromSsize_t macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 04:00:41 +0000 (06:00 +0200)]
py3: Remove unused PyInt_FromSsize_t macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyInt_FromString macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:59:56 +0000 (05:59 +0200)]
py3: Remove unused PyInt_FromString macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyInt_CheckExact macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:59:17 +0000 (05:59 +0200)]
py3: Remove unused PyInt_CheckExact macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PY_DESC_PY3_STRING macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:57:43 +0000 (05:57 +0200)]
py3: Remove unused PY_DESC_PY3_STRING macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_AsUTF8String macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:54:36 +0000 (05:54 +0200)]
py3: Remove unused PyStr_AsUTF8String macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_Decode macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:53:44 +0000 (05:53 +0200)]
py3: Remove unused PyStr_Decode macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_InternFromString macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:52:54 +0000 (05:52 +0200)]
py3: Remove unused PyStr_InternFromString macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_InternInPlace macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:52:07 +0000 (05:52 +0200)]
py3: Remove unused PyStr_InternInPlace macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_Format macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:50:49 +0000 (05:50 +0200)]
py3: Remove unused PyStr_Format macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_Concat macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:50:19 +0000 (05:50 +0200)]
py3: Remove unused PyStr_Concat macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused PyStr_CheckExact macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:48:07 +0000 (05:48 +0200)]
py3: Remove unused PyStr_CheckExact macro from py3compat.h

Now that we are no longer developing new py2/py3 compatible code we can remove
any aspects of this header we do not use.  This will make the eventual removal
easier.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove unused IS_PY3 macro from py3compat.h
Andrew Bartlett [Thu, 6 Jun 2019 03:46:27 +0000 (05:46 +0200)]
py3: Remove unused IS_PY3 macro from py3compat.h

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy3: Remove Python2 side of py3compat.h
Andrew Bartlett [Wed, 5 Jun 2019 15:13:00 +0000 (17:13 +0200)]
py3: Remove Python2 side of py3compat.h

This is unused as we do not support building python modules (etc) under py2.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests blackbox ndrdump: Clean up pep8 warnings
Gary Lockyer [Tue, 4 Jun 2019 22:34:17 +0000 (10:34 +1200)]
tests blackbox ndrdump: Clean up pep8 warnings

Clean up the test code and remove the pep8 warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun  6 04:58:18 UTC 2019 on sn-devel-184

5 years agontprinting.idl: remove decode functions
Gary Lockyer [Tue, 4 Jun 2019 01:07:06 +0000 (13:07 +1200)]
ntprinting.idl: remove decode functions

Remove the decode_* functions as they are no longer needed, and this
will reduce the amount of untested automatically generated code.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowinsrepl.idl: remove unused decode functions
Gary Lockyer [Mon, 3 Jun 2019 23:46:05 +0000 (11:46 +1200)]
winsrepl.idl: remove unused decode functions

Remove the decode_* functions as they are no longer needed, and this
will reduce the amount of untested automatically generated code.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosasl_helpers.idl: remove unused decode functions
Gary Lockyer [Mon, 3 Jun 2019 23:45:40 +0000 (11:45 +1200)]
sasl_helpers.idl: remove unused decode functions

Remove the decode_* functions as they are no longer needed, and this
will reduce the amount of untested automatically generated code.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agontp_signd.idl: remove unused decode functions
Gary Lockyer [Mon, 3 Jun 2019 23:44:46 +0000 (11:44 +1200)]
ntp_signd.idl: remove unused decode functions

Remove the decode_* functions as they are no longer needed, and this
will reduce the amount of untested automatically generated code.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>