nivanova/samba-autobuild/.git
5 years agoWHATSNEW: Start release notes for Samba 4.10.
Karolin Seeger [Thu, 12 Jul 2018 08:15:44 +0000 (10:15 +0200)]
WHATSNEW: Start release notes for Samba 4.10.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoVERSION: Bump version up to 4.10.0pre1...
Karolin Seeger [Thu, 12 Jul 2018 08:11:01 +0000 (10:11 +0200)]
VERSION: Bump version up to 4.10.0pre1...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoVERSION: Bump version up to 4.9.0rc1... samba-4.9.0rc1
Karolin Seeger [Thu, 12 Jul 2018 08:08:13 +0000 (10:08 +0200)]
VERSION: Bump version up to 4.9.0rc1...

and disable GIT_SNAPSHOT for the release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoWHATSNEW: Add release notes for Samba 4.9.0rc1.
Karolin Seeger [Thu, 12 Jul 2018 08:07:36 +0000 (10:07 +0200)]
WHATSNEW: Add release notes for Samba 4.9.0rc1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoWHATSNEW: Add information on new GPO features
Andrew Bartlett [Thu, 12 Jul 2018 04:14:27 +0000 (16:14 +1200)]
WHATSNEW: Add information on new GPO features

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoWHATSNEW.txt: CTDB updates for 4.9
Martin Schwenke [Mon, 26 Mar 2018 04:37:25 +0000 (15:37 +1100)]
WHATSNEW.txt: CTDB updates for 4.9

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoldb: version 1.4.1 ldb-1.4.1
Stefan Metzmacher [Wed, 11 Jul 2018 20:21:32 +0000 (22:21 +0200)]
ldb: version 1.4.1

* add some missing return value checks
* Fix several mem leaks in ldb_index ldb_search ldb_tdb (bug#13475)
* ldb_tdb: Use mem_ctx and so avoid leak onto long-term memory
  on duplicated add. (bug#13471)
* ldb: Fix memory leak on module context (bug#13459)
* Refused build of Samba 4.8 with ldb 1.4 (bug #13519)
* Prevent similar issues in the future at configure time (bug #13519)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jul 12 07:43:22 CEST 2018 on sn-devel-144

5 years agotalloc: version 2.1.14 talloc-2.1.14
Stefan Metzmacher [Wed, 11 Jul 2018 20:19:26 +0000 (22:19 +0200)]
talloc: version 2.1.14

* Fix some typos in the comments
* Remove extra 0x prefix for the "%p" format specifiers,
  avoiding 0x0x0 strings in the output.
* make sure we link extra-python versions of libraries

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotdb: version 1.3.16 tdb-1.3.16
Stefan Metzmacher [Wed, 11 Jul 2018 20:15:30 +0000 (22:15 +0200)]
tdb: version 1.3.16

* Fix build on AIX
* Python3 compatibility fixes
* Use tdb_wipe_all in "erase" command
* Harden allocating the tdb recovery area
* Make sure the hash size fits
* Harden tdb_check_used_record against overflow
* Harden tdb_rec_read
* Handle TDB_NEXT_LOCK_ERR in tdb_traverse_internal
* Fix build warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb: Refuse to build Samba against a newer minor version of ldb
Andrew Bartlett [Thu, 12 Jul 2018 00:34:56 +0000 (12:34 +1200)]
ldb: Refuse to build Samba against a newer minor version of ldb

Samba is not compatible with new versions of ldb (except release versions)

Other users would not notice the breakages, but Samba makes many
more assuptions about the LDB internals than any other package.

(Specifically, LDB 1.2 and 1.4 broke builds against released
Samba versions)

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agoldb: Ban ldb 1.4.x with Samba 4.8 and earlier
Andrew Bartlett [Wed, 11 Jul 2018 01:41:58 +0000 (13:41 +1200)]
ldb: Ban ldb 1.4.x with Samba 4.8 and earlier

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agodocs: Remove mention of --without-json-audit from the AD DC
Andrew Bartlett [Wed, 11 Jul 2018 23:56:40 +0000 (11:56 +1200)]
docs: Remove mention of --without-json-audit from the AD DC

This is no longer optional for the AD DC.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoWHATSNEW: Explain that Jansson is requied for AD DC, mention --without-json-audit
Andrew Bartlett [Wed, 11 Jul 2018 23:54:56 +0000 (11:54 +1200)]
WHATSNEW: Explain that Jansson is requied for AD DC, mention --without-json-audit

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoWHATSNEW: document sysvolreset improvement
Andrew Bartlett [Wed, 11 Jul 2018 04:12:53 +0000 (16:12 +1200)]
WHATSNEW: document sysvolreset improvement

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agotests/posixacl: Test with and without filling in the unix_token
Andrew Bartlett [Wed, 11 Jul 2018 05:08:34 +0000 (17:08 +1200)]
tests/posixacl: Test with and without filling in the unix_token

Sadly the unix token cannot be created without a running winbindd,
which is not available during provision and a domain restore.

(Internally in smbd a backup API via passdb is used, but this
is not connected to this function at this time)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agopython: Add samba.auth.session_info_fill_unix()
Andrew Bartlett [Wed, 11 Jul 2018 04:48:40 +0000 (16:48 +1200)]
python: Add samba.auth.session_info_fill_unix()

This fills in the unix portions of the token needed by smbd and the pysmbd bindings

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Joe Guo <joeg@catalyst.net.nz>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoselftest: Add tests for samba.auth.admin_session()
Andrew Bartlett [Wed, 11 Jul 2018 04:48:07 +0000 (16:48 +1200)]
selftest: Add tests for samba.auth.admin_session()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Pair-programmed-with: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoWHATSNEW: Fix spelling
Andrew Bartlett [Wed, 11 Jul 2018 10:01:29 +0000 (22:01 +1200)]
WHATSNEW: Fix spelling

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agodocs: Explain that "max xmit" is SMB1 only
Andrew Bartlett [Fri, 6 Jul 2018 20:51:59 +0000 (08:51 +1200)]
docs: Explain that "max xmit" is SMB1 only

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoWHATSNEW: Add note about defaults changes for the vfs_full_audit and acceptance of...
Timur I. Bakeyev [Sun, 8 Jul 2018 14:09:59 +0000 (16:09 +0200)]
WHATSNEW: Add note about defaults changes for the vfs_full_audit and acceptance of all syslog facilities for all audit modules.

Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agotests/posixacl: derive a new testcase to run same tests with session
Joe Guo [Thu, 5 Jul 2018 22:36:54 +0000 (10:36 +1200)]
tests/posixacl: derive a new testcase to run same tests with session

1. existing tests still run with session_info=None
2. new class override `get_session_info` to return a session, so same
set of tests will run again, but with session.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: move setUp and tearDown to top
Joe Guo [Thu, 5 Jul 2018 22:32:17 +0000 (10:32 +1200)]
tests/posixacl: move setUp and tearDown to top

Make it clear to find out what we have in test.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: rm duplicated test
Joe Guo [Wed, 4 Jul 2018 03:50:40 +0000 (15:50 +1200)]
tests/posixacl: rm duplicated test

There are 2 copy of `test_setposixacl_getposixacl`, this patch removed
the first copy, which was overwritten by the second one.

They are 99% the same except in the last line a_perm is 6 vs 7, and 7 is
the correct number.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: use assertRaises to simplify code
Joe Guo [Wed, 4 Jul 2018 03:35:14 +0000 (15:35 +1200)]
tests/posixacl: use assertRaises to simplify code

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: remove unused imports
Joe Guo [Wed, 4 Jul 2018 03:28:16 +0000 (15:28 +1200)]
tests/posixacl: remove unused imports

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: define global ACL to make code DRY
Joe Guo [Wed, 4 Jul 2018 03:25:56 +0000 (15:25 +1200)]
tests/posixacl: define global ACL to make code DRY

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: define global DOM_SID to make code DRY
Joe Guo [Wed, 4 Jul 2018 03:18:26 +0000 (15:18 +1200)]
tests/posixacl: define global DOM_SID to make code DRY

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agotests/posixacl: rm commented code
Joe Guo [Wed, 4 Jul 2018 02:52:02 +0000 (14:52 +1200)]
tests/posixacl: rm commented code

The example is already in code, no need to keep it here.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agoprovision/setsysvolacl: create helper function to simplify code
Joe Guo [Wed, 4 Jul 2018 01:03:44 +0000 (13:03 +1200)]
provision/setsysvolacl: create helper function to simplify code

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agoprovision/setsysvolacl: build session_info and pass down to setntacl
Joe Guo [Wed, 4 Jul 2018 00:07:25 +0000 (12:07 +1200)]
provision/setsysvolacl: build session_info and pass down to setntacl

Get the admin session info, and pass it down to setntacl.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agontacls: add session_info arg to setntacl and pass down to set_nt_acl api
Joe Guo [Tue, 3 Jul 2018 22:27:23 +0000 (10:27 +1200)]
ntacls: add session_info arg to setntacl and pass down to set_nt_acl api

Then underneath code can reuse the authentication info in session to
improve performance.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agontacls: reuse predefined SECURITY_SECINFO_FLAGS
Joe Guo [Mon, 2 Jul 2018 22:20:39 +0000 (10:20 +1200)]
ntacls: reuse predefined SECURITY_SECINFO_FLAGS

Use predefined SECURITY_SECINFO_FLAGS to replace bitwise or operations
on flag list.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agosmbd/posix_acls: reuse secutiry token from session info if exist
Joe Guo [Tue, 3 Jul 2018 23:09:50 +0000 (11:09 +1200)]
smbd/posix_acls: reuse secutiry token from session info if exist

If session info was passed down from upstream, then try to use it to get
security token, other then creating token every time.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agosmbd/msdfs: add null check for session_info.unix_info
Joe Guo [Tue, 3 Jul 2018 23:03:42 +0000 (11:03 +1200)]
smbd/msdfs: add null check for session_info.unix_info

When a session_info passed down to here, the unix_info could be NULL.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agopysmbd: add session_info arg to py_smbd_set_nt_acl
Joe Guo [Tue, 3 Jul 2018 22:18:30 +0000 (10:18 +1200)]
pysmbd: add session_info arg to py_smbd_set_nt_acl

Add session_info arg as optional and pass it down to get_conn_tos.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agopysmbd: add session_info arg to get_conn_tos
Joe Guo [Tue, 3 Jul 2018 22:05:50 +0000 (10:05 +1200)]
pysmbd: add session_info arg to get_conn_tos

Add session_info arg, so caller can pass it in to reuse authentication info
later. This will improve performance a lot while doing ntacl operations
on large amount of files, e.g.: sysvolreset.

Modification for upstream caller will come in following patches.

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

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agoWHATSNEW: Add entry for "Dynamic DNS record scavenging support"
Andrew Bartlett [Tue, 10 Jul 2018 05:13:48 +0000 (17:13 +1200)]
WHATSNEW: Add entry for "Dynamic DNS record scavenging support"

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython/tests: check setting values on dnsRecord attributes
Bob Campbell [Thu, 8 Dec 2016 20:13:11 +0000 (09:13 +1300)]
python/tests: check setting values on dnsRecord attributes

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

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests dns: dns_base.py remove flake8 warnings
Gary Lockyer [Tue, 3 Jul 2018 05:03:38 +0000 (17:03 +1200)]
tests dns: dns_base.py remove flake8 warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests dns: dns.py remove flake8 warnings
Gary Lockyer [Mon, 2 Jul 2018 04:51:00 +0000 (16:51 +1200)]
tests dns: dns.py remove flake8 warnings

Remove flake8 warnings from the code, this highlighted the issue with
test_update_add_null_char_rpc_to_dns fixed in the preceding commit.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests dns: fix rpc null byte test
Gary Lockyer [Mon, 2 Jul 2018 04:47:16 +0000 (16:47 +1200)]
tests dns: fix rpc null byte test

Fix update_add_null_char_rpc_to_dns so that the test matches the name.
It was not passing the embedded null to the rpc call.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: static records
Aaron Haslett [Thu, 7 Jun 2018 04:51:37 +0000 (16:51 +1200)]
dns: static records

Modifies bind9 and internal dns to match windows static records behaviour.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: update tool changed for scavenging
Aaron Haslett [Tue, 10 Jul 2018 01:14:18 +0000 (13:14 +1200)]
dns: update tool changed for scavenging

Now that scavenging is implemented, the DNS update tool needs to be changed so
that it always updates every name required by the DC.  Otherwise, the records
might be scavenged.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns+kcc: adding dns scavenging to kcc periodic run
Aaron Haslett [Tue, 29 May 2018 03:50:19 +0000 (15:50 +1200)]
dns+kcc: adding dns scavenging to kcc periodic run

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Pair-Programmed-With: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: dns record scavenging function (without task)
Aaron Haslett [Fri, 1 Jun 2018 04:07:46 +0000 (16:07 +1200)]
dns: dns record scavenging function (without task)

DNS record scavenging function with testing.  The logic of the custom match rule
in previous commit is inverted so that calculations using zone properties can
be taken out of the function's inner loop. Periodic task to come.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: Use ldb.SCOPE_SUBTREE in ldap_get_records() routine in tests/dns.py
Aaron Haslett [Tue, 10 Jul 2018 01:23:42 +0000 (13:23 +1200)]
dns: Use ldb.SCOPE_SUBTREE in ldap_get_records() routine in tests/dns.py

DNS records have the odd property that the DN can be reliably determined by the
name only, so we do not need a subtree search.

However by using a subtree search under the zone we can without
trapping exceptions confirm if the record exists or not in the tests.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agodns: custom match rule for DNS records to be tombstoned
Aaron Haslett [Mon, 2 Jul 2018 01:48:06 +0000 (13:48 +1200)]
dns: custom match rule for DNS records to be tombstoned

A custom match rule for records to be tombstoned by the scavenging process.
Needed because DNS records are a multi-valued attribute on name records, so
without a custom match rule we'd have entire zones into memory to search for
expired records.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: server side implementation of record aging
Aaron Haslett [Mon, 2 Jul 2018 01:43:33 +0000 (13:43 +1200)]
dns: server side implementation of record aging

Code for retrieving aging properties from a zone and using them for timestamp
setting logic during processing of DNS requests.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: moving name_equal func into common
Aaron Haslett [Tue, 5 Jun 2018 05:12:44 +0000 (17:12 +1200)]
dns: moving name_equal func into common

This function is duplicated in the BIND9 and RPC DNS servers.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorpc dns: reset dword aging related zone properties
Aaron Haslett [Tue, 3 Jul 2018 03:34:32 +0000 (15:34 +1200)]
rpc dns: reset dword aging related zone properties

This allows a user to set zone properties relevant to DNS record aging over RPC.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorpc dns: reading zone properties from LDB
Aaron Haslett [Tue, 3 Jul 2018 03:33:06 +0000 (15:33 +1200)]
rpc dns: reading zone properties from LDB

Reading zone properties from LDB on server connection initialisation, instead
of them being volatile fields.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: Reformat DNS with clang-format
Gary Lockyer [Tue, 10 Jul 2018 01:37:18 +0000 (13:37 +1200)]
dns: Reformat DNS with clang-format

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorpc dns: setting timestamp to 0 on RPC processed records
Aaron Haslett [Wed, 30 May 2018 06:56:16 +0000 (18:56 +1200)]
rpc dns: setting timestamp to 0 on RPC processed records

All records created by RPC DNS server calls should have timestamp set to 0
according to [MS-DNSP]

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

Signed-off-by: Aaron Haslett<aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodns: record aging tests
Aaron Haslett [Wed, 9 May 2018 06:02:28 +0000 (18:02 +1200)]
dns: record aging tests

First basic DNS record aging tests.  These check that we can
turn aging on and off, and that timestamps are written on DNS
add and update calls, but not RPC calls.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosmb.conf: add dns_zone_scavenging
Gary Lockyer [Wed, 11 Jul 2018 04:30:38 +0000 (16:30 +1200)]
smb.conf: add dns_zone_scavenging

Add parameter dns_zone_scavenging to control dns zone scavenging.
Scavenging is disabled by default, as due to
https://bugzilla.samba.org/show_bug.cgi?id=12451 the ageing properties of
existing DNS entries are incorrect.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agos4:messaging: make sure only imessaging_client_init() can be used with a wrapper...
Stefan Metzmacher [Fri, 18 May 2018 14:28:47 +0000 (16:28 +0200)]
s4:messaging: make sure only imessaging_client_init() can be used with a wrapper tevent_context wrapper

imessaging_client_init() can be used with a wrapper tevent_context,
but only if a global messaging_dgm_ref() already exist.

All other uses of imessaging_init() and imessaging_client_init()
require a raw tevent_context.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jul 12 02:23:37 CEST 2018 on sn-devel-144

5 years agos4:messaging: allow imessaging_post_handler() to free the messaging context from...
Stefan Metzmacher [Sat, 19 May 2018 08:14:25 +0000 (10:14 +0200)]
s4:messaging: allow imessaging_post_handler() to free the messaging context from a handler

In usecases like using messaging_client_init() with irpc processing we may
free the imessaging_context during the messaging handler.
imessaging_post_handler() is not yet really used, but it will change in
the next commits. imessaging_post_state is a child of imessaging_context
and might be implicitly free'ed before the explicit TALLOC_FREE(state).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:messages: allow messaging_filtered_read_send() to use wrapper tevent_context
Stefan Metzmacher [Fri, 23 Mar 2018 13:48:46 +0000 (14:48 +0100)]
s3:messages: allow messaging_filtered_read_send() to use wrapper tevent_context

As it gets 'messaging_context' as argument, we're sure a messaging context
with a raw tevent context already exist.

It means we can allow a wrapper tevent context that wrapps the main tevent
context of the messaging context.

The use of tevent_req_defer_callback() makes sure that the callers
callback function calls messaging_filtered_read_recv() from the
correct "wrapped" environment.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:messages: allow messaging_dgm_ref() to use wrapper tevent_context
Stefan Metzmacher [Fri, 23 Mar 2018 13:48:46 +0000 (14:48 +0100)]
s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context

This is only allowed if the raw tevent context is already registered.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use wrapper...
Stefan Metzmacher [Fri, 23 Mar 2018 13:48:46 +0000 (14:48 +0100)]
s3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use wrapper tevent_context

This is only allowed if the raw tevent context is already registered.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:messages: protect against usage of wrapper tevent_context objects for messaging
Stefan Metzmacher [Fri, 18 May 2018 14:28:47 +0000 (16:28 +0200)]
s3:messages: protect against usage of wrapper tevent_context objects for messaging

This makes a lot of assumtion easier to understand and the introduction
of wrapper tevent contexts will not change the existing behaviour.

We'll relax this a bit in the next commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowinbindd: Do request profiling
Volker Lendecke [Tue, 19 Jun 2018 09:13:19 +0000 (11:13 +0200)]
winbindd: Do request profiling

By default we log a request that takes more than 60 seconds. This can be
changed by setting

winbind:request profile threshold = <seconds>

Another parameter controls the depth of the request hierarchy printed:

winbind:request profile depth = <n>

The default request logged to syslog via DEBUG(0) looks like the
following for a wbinfo -P:

[struct process_request_state] ../source3/winbindd/winbindd.c:683 [2018/06/19 13:33:14.190365] ../source3/winbindd/winbindd.c:853 [2018/06/19 13:33:14.192737] [0.002372] -> TEVENT_REQ_DONE (2 0))
 [struct winbindd_ping_dc_state] ../source3/winbindd/winbindd_ping_dc.c:41 [2018/06/19 13:33:14.190369] ../source3/winbindd/winbindd_ping_dc.c:112 [2018/06/19 13:33:14.192681] [0.002312] -> TEVENT_REQ_DONE (2 0))
  [struct dcerpc_wbint_PingDc_state] default/librpc/gen_ndr/ndr_winbind_c.c:4335 [2018/06/19 13:33:14.190383] default/librpc/gen_ndr/ndr_winbind_c.c:4396 [2018/06/19 13:33:14.192680] [0.002297] -> TEVENT_REQ_DONE (2 0))
   [struct dcerpc_wbint_PingDc_r_state] default/librpc/gen_ndr/ndr_winbind_c.c:4251 [2018/06/19 13:33:14.190385] default/librpc/gen_ndr/ndr_winbind_c.c:4285 [2018/06/19 13:33:14.192678] [0.002293] -> TEVENT_REQ_DONE (2 0))
    [struct dcerpc_binding_handle_call_state] ../librpc/rpc/binding_handle.c:371 [2018/06/19 13:33:14.190387] ../librpc/rpc/binding_handle.c:520 [2018/06/19 13:33:14.192675] [0.002288] -> TEVENT_REQ_DONE (2 0))
     [struct dcerpc_binding_handle_raw_call_state] ../librpc/rpc/binding_handle.c:149 [2018/06/19 13:33:14.190400] ../librpc/rpc/binding_handle.c:203 [2018/06/19 13:33:14.192646] [0.002246] -> TEVENT_REQ_DONE (2 0))
      [struct wbint_bh_raw_call_state] ../source3/winbindd/winbindd_dual_ndr.c:89 [2018/06/19 13:33:14.190402] ../source3/winbindd/winbindd_dual_ndr.c:204 [2018/06/19 13:33:14.192644] [0.002242] -> TEVENT_REQ_DONE (2 0))
       [struct wb_domain_request_state] ../source3/winbindd/winbindd_dual.c:473 [2018/06/19 13:33:14.190404] ../source3/winbindd/winbindd_dual.c:708 [2018/06/19 13:33:14.192640] [0.002236] -> TEVENT_REQ_DONE (2 0))
        [struct wb_child_request_state] ../source3/winbindd/winbindd_dual.c:198 [2018/06/19 13:33:14.190411] ../source3/winbindd/winbindd_dual.c:273 [2018/06/19 13:33:14.192638] [0.002227] -> TEVENT_REQ_DONE (2 0))
         [struct tevent_queue_wait_state] ../lib/tevent/tevent_queue.c:336 [2018/06/19 13:33:14.190412] ../lib/tevent/tevent_queue.c:355 [2018/06/19 13:33:14.190415] [0.000003] -> TEVENT_REQ_DONE (2 0))
         [struct wb_simple_trans_state] ../nsswitch/wb_reqtrans.c:375 [2018/06/19 13:33:14.190424] ../nsswitch/wb_reqtrans.c:432 [2018/06/19 13:33:14.192630] [0.002206] -> TEVENT_REQ_DONE (2 0))
          [struct req_write_state] ../nsswitch/wb_reqtrans.c:158 [2018/06/19 13:33:14.190425] ../nsswitch/wb_reqtrans.c:194 [2018/06/19 13:33:14.190472] [0.000047] -> TEVENT_REQ_DONE (2 0))
           [struct writev_state] ../lib/async_req/async_sock.c:263 [2018/06/19 13:33:14.190432] ../lib/async_req/async_sock.c:412 [2018/06/19 13:33:14.190470] [0.000038] -> TEVENT_REQ_DONE (2 0))
          [struct resp_read_state] ../nsswitch/wb_reqtrans.c:222 [2018/06/19 13:33:14.190475] ../nsswitch/wb_reqtrans.c:275 [2018/06/19 13:33:14.192629] [0.002154] -> TEVENT_REQ_DONE (2 0))
           [struct read_packet_state] ../lib/async_req/async_sock.c:458 [2018/06/19 13:33:14.190476] ../lib/async_req/async_sock.c:546 [2018/06/19 13:33:14.192626] [0.002150] -> TEVENT_REQ_DONE (2 0))
 [struct resp_write_state] ../nsswitch/wb_reqtrans.c:307 [2018/06/19 13:33:14.192693] ../nsswitch/wb_reqtrans.c:344 [2018/06/19 13:33:14.192734] [0.000041] -> TEVENT_REQ_DONE (2 0))
  [struct writev_state] ../lib/async_req/async_sock.c:263 [2018/06/19 13:33:14.192694] ../lib/async_req/async_sock.c:412 [2018/06/19 13:33:14.192732] [0.000038] -> TEVENT_REQ_DONE (2 0))

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowinbindd: Convert process_request() to tevent_req
Volker Lendecke [Thu, 3 May 2018 13:12:55 +0000 (15:12 +0200)]
winbindd: Convert process_request() to tevent_req

Having a central tevent_req per winbind child request is prerequisite
for request profiling

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotorture: Test tevent_req_profile
Volker Lendecke [Wed, 2 May 2018 12:02:18 +0000 (14:02 +0200)]
torture: Test tevent_req_profile

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Add tevent_req_profile helpers
Volker Lendecke [Wed, 2 May 2018 11:59:57 +0000 (13:59 +0200)]
lib: Add tevent_req_profile helpers

Print and marshall/unmarshall tevent_req_profile structs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Multi-line a long line in wscript_build
Volker Lendecke [Wed, 2 May 2018 11:54:42 +0000 (13:54 +0200)]
lib: Multi-line a long line in wscript_build

Why? I'll add another file in a later commit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agotevent: version 0.9.37 tevent-0.9.37
Stefan Metzmacher [Thu, 14 Aug 2014 19:51:09 +0000 (21:51 +0200)]
tevent: version 0.9.37

* simplify "poll" and "poll_mt" backends
* make tevent_abort() reachable for backends
* add tevent_common_invoke_*_handler() functions
* add tevent_context_same_loop() function
* add tevent_context_wrapper_create() infrastructure
* add tevent_req_profile infrastructure

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: Add tevent_req_profile
Volker Lendecke [Wed, 2 May 2018 12:01:56 +0000 (14:01 +0200)]
tevent: Add tevent_req_profile

This allows detailed reporting where a tevent_req spends its time

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agotevent: add a test that frees wrapper_ev with pending events
Ralph Boehme [Sat, 16 Jun 2018 14:55:44 +0000 (16:55 +0200)]
tevent: add a test that frees wrapper_ev with pending events

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agotevent: add a simple wrapper test
Ralph Boehme [Sat, 16 Jun 2018 12:12:01 +0000 (14:12 +0200)]
tevent: add a simple wrapper test

This checks that for all supported event types the before and after
handlers are called.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agotevent: add tevent_context_wrapper_create() infrastructure
Stefan Metzmacher [Tue, 22 Jul 2014 14:51:38 +0000 (16:51 +0200)]
tevent: add tevent_context_wrapper_create() infrastructure

This allows to specify wrapper tevent_contexts, which adds the ability
to run functions before and after the event handler functions.

This can be used to implement impersonation hooks
or advanced debugging/profiling hooks.

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: make use of #include "system/threads.h"
Stefan Metzmacher [Tue, 22 May 2018 13:43:12 +0000 (15:43 +0200)]
tevent: make use of #include "system/threads.h"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: split out tevent_common_invoke_fd_handler()
Stefan Metzmacher [Tue, 22 Jul 2014 12:45:33 +0000 (14:45 +0200)]
tevent: split out tevent_common_invoke_fd_handler()

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: split out tevent_common_invoke_immediate_handler()
Stefan Metzmacher [Tue, 22 Jul 2014 11:08:42 +0000 (13:08 +0200)]
tevent: split out tevent_common_invoke_immediate_handler()

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: split out tevent_common_invoke_timer_handler()
Stefan Metzmacher [Tue, 22 Jul 2014 11:08:42 +0000 (13:08 +0200)]
tevent: split out tevent_common_invoke_timer_handler()

As side effect this avoids tricks with an extra
tevent_common_timed_deny_destructor().

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: split out tevent_common_invoke_signal_handler()
Stefan Metzmacher [Tue, 22 Jul 2014 11:01:01 +0000 (13:01 +0200)]
tevent: split out tevent_common_invoke_signal_handler()

As side effect this avoids tricks with tevent_se_exists_destructor() to
figure out if the event handler removed itself.

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: simplify tevent_signal_destructor()
Stefan Metzmacher [Tue, 17 Apr 2018 14:43:54 +0000 (16:43 +0200)]
tevent: simplify tevent_signal_destructor()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: use talloc_zero() in tevent_signal.c
Stefan Metzmacher [Tue, 27 Mar 2018 12:30:20 +0000 (14:30 +0200)]
tevent: use talloc_zero() in tevent_signal.c

This might not be strictly required, but it might
avoid problems in future...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: simplify tevent_cleanup_pending_signal_handlers()
Stefan Metzmacher [Tue, 22 Jul 2014 10:02:45 +0000 (12:02 +0200)]
tevent: simplify tevent_cleanup_pending_signal_handlers()

Calling tevent_signal_destructor() does the same as se->event_ctx is already
NULL.

This also makes sure we correctly cleanup the SA_SIGINFO array.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: add tevent_common_check_double_free() helper function
Stefan Metzmacher [Tue, 17 Apr 2018 14:33:47 +0000 (16:33 +0200)]
tevent: add tevent_common_check_double_free() helper function

This will be used to generically support TALLOC_FREE() on
event which are currently running.

It aborts on every explicit talloc_free(), but ignores implicit
cleanup when the talloc parent is about to go.

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: add tevent_threaded_schedule_immediate_destructor that just aborts
Stefan Metzmacher [Fri, 23 Mar 2018 09:32:15 +0000 (10:32 +0100)]
tevent: add tevent_threaded_schedule_immediate_destructor that just aborts

This will be active while the event is part of the ev->scheduled_immediates
list.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: use _tevent_schedule_immediate() to move events from a thread to the main_ev
Stefan Metzmacher [Fri, 23 Mar 2018 09:25:27 +0000 (10:25 +0100)]
tevent: use _tevent_schedule_immediate() to move events from a thread to the main_ev

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: use struct initializers for tevent_immediate
Stefan Metzmacher [Thu, 23 Oct 2014 05:15:14 +0000 (07:15 +0200)]
tevent: use struct initializers for tevent_immediate

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: use struct initializers for tevent_signal
Stefan Metzmacher [Thu, 23 Oct 2014 05:15:14 +0000 (07:15 +0200)]
tevent: use struct initializers for tevent_signal

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: use struct initializers for tevent_timer
Stefan Metzmacher [Thu, 23 Oct 2014 05:15:14 +0000 (07:15 +0200)]
tevent: use struct initializers for tevent_timer

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: use struct initializers for tevent_fd
Stefan Metzmacher [Thu, 23 Oct 2014 05:15:14 +0000 (07:15 +0200)]
tevent: use struct initializers for tevent_fd

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: make tevent_abort() available for backends
Stefan Metzmacher [Tue, 22 Jul 2014 13:10:00 +0000 (15:10 +0200)]
tevent: make tevent_abort() available for backends

We'll undo the 0.9.36 ABI change on the 0.9.37 release
at the end of this patchset.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: allow tevent_abort() to cope with ev == NULL
Stefan Metzmacher [Thu, 22 Mar 2018 15:51:01 +0000 (16:51 +0100)]
tevent: allow tevent_abort() to cope with ev == NULL

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent/testsuite: return after torture_fail()
Stefan Metzmacher [Thu, 23 Oct 2014 04:54:10 +0000 (06:54 +0200)]
tevent/testsuite: return after torture_fail()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent.h: improve tevent_req documentation
Ralph Boehme [Wed, 23 Sep 2015 02:27:53 +0000 (04:27 +0200)]
tevent.h: improve tevent_req documentation

Document tevent_req naming conventions.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agotevent: rewrite/simplify tevent_poll and maintain ev->fd_events correctly
Stefan Metzmacher [Mon, 18 Jun 2018 17:49:52 +0000 (19:49 +0200)]
tevent: rewrite/simplify tevent_poll and maintain ev->fd_events correctly

The following patches will rely on having all valid fd events in
ev->fd_events, even if they are temporary disabled with
tevent_set_fd_flags(fde, 0);

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: make use of tevent_common_wakeup() in the poll and poll_mt backends
Stefan Metzmacher [Mon, 18 Jun 2018 15:59:40 +0000 (17:59 +0200)]
tevent: make use of tevent_common_wakeup() in the poll and poll_mt backends

This simplifies the "poll_mt" logic a lot.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowinbindd: Remove ads.h include from nss_info
Christof Schmitt [Tue, 26 Jun 2018 20:30:06 +0000 (13:30 -0700)]
winbindd: Remove ads.h include from nss_info

nss_info does not use libads. Removing this include
fixes a compile error when trying to compile with a
system provided heimdal library:

[2188/3043] Compiling source3/winbindd/nss_info.c
In file included from ../source3/libads/kerberos_proto.h:33:0,
                 from ../source3/include/ads.h:154,
                 from ../source3/winbindd/nss_info.c:24:
../lib/replace/system/kerberos.h:33:10: fatal error: krb5.h: No such file or directory
 #include <krb5.h>
          ^~~~~~~~

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Jul 11 22:39:36 CEST 2018 on sn-devel-144

5 years agoctdb-scripts: Provide a gstack function if gstack is not available
Martin Schwenke [Sat, 2 Dec 2017 09:06:25 +0000 (20:06 +1100)]
ctdb-scripts: Provide a gstack function if gstack is not available

gstack isn't widely available, so provide a simple function that does
the same thing if it gstack can't be found.

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): Wed Jul 11 14:47:21 CEST 2018 on sn-devel-144

5 years agoctdb-tests: Drop residual CTDB_MANAGED_<service> variables
Martin Schwenke [Sat, 7 Jul 2018 10:16:42 +0000 (20:16 +1000)]
ctdb-tests: Drop residual CTDB_MANAGED_<service> variables

These no longer do anything.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Drop event script CTDB_MANAGED_<service> variables
Martin Schwenke [Sat, 7 Jul 2018 10:06:47 +0000 (20:06 +1000)]
ctdb-scripts: Drop event script CTDB_MANAGED_<service> variables

Enable required event scripts to manage services.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Drop event script tests where CTDB_MANAGED_<service>=no
Martin Schwenke [Sat, 7 Jul 2018 09:58:38 +0000 (19:58 +1000)]
ctdb-tests: Drop event script tests where CTDB_MANAGED_<service>=no

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Ensure some event scripts are enabled for cluster tests
Martin Schwenke [Sat, 7 Jul 2018 12:07:54 +0000 (22:07 +1000)]
ctdb-tests: Ensure some event scripts are enabled for cluster tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-packaging: Enable some standard event scripts if none are enabled
Martin Schwenke [Sat, 7 Jul 2018 05:58:06 +0000 (15:58 +1000)]
ctdb-packaging: Enable some standard event scripts if none are enabled

CTDB needs the legacy/00.ctdb event script to be able to function
properly.  If this script is not enabled then assume a first-time
install or an upgrade to a version that requires events scripts to be
enabled via symlinks.  In these cases enable this script and other
commonly used scripts.

Remove links during uninstall (but not during upgrade).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-build: Enable some standard event scripts if none are enabled
Martin Schwenke [Sat, 7 Jul 2018 05:23:27 +0000 (15:23 +1000)]
ctdb-build: Enable some standard event scripts if none are enabled

CTDB needs the legacy/00.ctdb event script to be able to function
properly.  If this script is not enabled then assume a first-time
install or an upgrade to a version that requires events scripts to be
enabled via symlinks.  In these cases enable this script and other
commonly used scripts.

Only do this for a direct install.  If DESTDIR is being used then
assume a package is being built and let the packager handle this case.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>