summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:rpc_server/netlogon: use samdb_domain_guid()/dsdb_trust_local_tdo_info() ↵Stefan Metzmacher2018-09-041-18/+91
| | | | | | | | | | | | | | | | to build our netr_OneDomainInfo values The logic for constructing the values for our own primary domain differs from the values of trusted domains. In order to make the code easier to understand we have a new fill_our_one_domain_info() helper that only takes care of our primary domain. The cleanup for the trust case will follow in a separate commit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/common: add samdb_domain_guid() helper functionStefan Metzmacher2018-09-041-0/+55
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb:util_trusts: add dsdb_trust_local_tdo_info() helper functionStefan Metzmacher2018-09-041-0/+16
| | | | | | | | | | This is similar to dsdb_trust_xref_tdo_info(), but will also work if we ever support more than one domain in our forest. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb/util_trusts: domain_dn is an input parameter of ↵Stefan Metzmacher2018-09-041-6/+0
| | | | | | | | | | | | | dsdb_trust_crossref_tdo_info() We should not overwrite it within the function. Currently it doesn't matter as we don't have multiple domains within our forest, but that will change in future. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc/netlogon: verify the trusted domains output of ↵Stefan Metzmacher2018-09-042-1/+130
| | | | | | | | | | | | LogonGetDomainInfo() This makes sure we don't treat trusted domains in the same way we treat our primary domain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture/rpc/netlogon: assert that ↵Stefan Metzmacher2018-09-041-0/+16
| | | | | | | | | | | | cli_credentials_get_{workstation,password} don't return NULL This is better that generating a segfault while dereferencing a NULL pointer later. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dbwrap_tool: We don't do "listwatchers" anymoreVolker Lendecke2018-09-031-3/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Sep 3 21:38:40 CEST 2018 on sn-devel-144
* dbwrap_tool: Avoid an unnecessary "else"Volker Lendecke2018-09-031-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* dbwrap_tool: Simplify persistent/non-persistent checkVolker Lendecke2018-09-031-3/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* dbwrap_tool: Simplify listkey_fnVolker Lendecke2018-09-031-2/+3
| | | | | | | To me dbwrap_record_get_key(rec).dsize just looks a bit ugly Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* dbwrap_tool: Simplify dbwrap_tool_eraseVolker Lendecke2018-09-031-10/+3
| | | | | | | That's what dbwrap_wipe is for :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* smbd: Fix a memleak in async search ask sharemodeVolker Lendecke2018-09-031-8/+5
| | | | | | | | | | | | | fetch_share_mode_unlocked_parser() takes a "struct fetch_share_mode_unlocked_state *" as "private_data". fetch_share_mode_send() used a talloc_zero'ed "struct share_mode_lock". This lead to the parser putting a "struct share_mode_lock on the NULL talloc_context where nobody really picked it up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13602 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* ctdb-tests: Don't run valgrind or other tracing in simple_test_command()Martin Schwenke2018-09-031-1/+1
| | | | | | | | | | | | | | | | | | This function is used to run a extra command to check a result. This command is usually a script (often a stub) or an external command, so no need to trace it with valgrind or whatever else might be specified. In the worst case the command being run is a shell function, which valgrind won't be able to find. There is little use running the event script tests under valgrind. However, when the whole test suite is being run under valgrind then it should work. 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 Sep 3 14:04:00 CEST 2018 on sn-devel-144
* ctdb-tests: Use known install paths in local daemon testsMartin Schwenke2018-09-031-13/+10
| | | | | | | | | | | | | | The in-tree local daemons tests don't work from a top-level Samba compile. The simple test suite was the first test suite and things have generally worked, so it has been slow to adopt general test infrastructure changes. Instead of re-calculating script and helper locations, use the paths from script_install_paths.sh. The bin/ directory is already added to PATH in common.sh, so don't add it here. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: If bin/ isn't in ctdb/ then look one level higherMartin Schwenke2018-09-032-6/+8
| | | | | | | | CTDB's test suite doesn't work from a top-level compile. The first step to fixing this is to correctly locate the bin/ directory. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Process the whole config file even if an error occursMartin Schwenke2018-09-033-6/+17
| | | | | | | | | | | At the moment multiple errors will be encountered one at a time, on each load or validate. Instead, allow all configuration errors to printed in a single pass. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Avoid ENOENT for unknown conf optionsMartin Schwenke2018-09-033-8/+8
| | | | | | | | | Only use ENOENT for missing configuration file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Avoid ENOENT for unknown conf type tagsMartin Schwenke2018-09-031-2/+2
| | | | | | | | | Only use ENOENT for missing configuration file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Log a message when an invalid conf value is encounteredMartin Schwenke2018-09-031-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Log a message for unknown conf optionMartin Schwenke2018-09-033-0/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Fix log message for conf option with unknown sectionMartin Schwenke2018-09-032-3/+4
| | | | | | | | | | This covers both options that appear before a section and options in unknown sections. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Drop incorrect log messageMartin Schwenke2018-09-031-1/+1
| | | | | | | | | | | The message is incorrect because the actual failure was loading the config file. Instead of fixing the message, drop it because ctdb_config_load() already logs the failure. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Log complete eventd startup commandMartin Schwenke2018-09-031-2/+6
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* selftest: Split up password_lockout into tests with and without a call to ↵Andrew Bartlett2018-09-031-142/+157
| | | | | | | | | | | | | | sleep() This means we can have a long observation window for many of the tests and so make them much more reliable. Many of these cause frustrating flapping failures in our CI systems. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 3 06:14:55 CEST 2018 on sn-devel-144
* selftest: Prepare to allow override of lockout duration in password_lockout ↵Andrew Bartlett2018-09-032-7/+13
| | | | | | | | | tests This will make it easier to avoid flapping tests. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s4/selftest: enable samba.tests.samba_tool.user_virtualCryptSHA for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/netcmd: PY2/PY3 changes required for user_virtualCryptSHA testNoel Power2018-09-031-5/+10
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.user for py3Noel Power2018-09-031-2/+2
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/tests: Adjust teardown so second run of tests succeedsNoel Power2018-09-031-0/+8
| | | | | | | | A second run of this test (e.g. with --extra-python) or even an manual re-run and the cache is still there. use of '--cache-ldb-initialize' will fail and so with the test Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/tests: PY2/PY3 required changes for samba.tests.samba_tool.userNoel Power2018-09-032-6/+8
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.dcerpc.raw_protocol for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/test/dcerpc: Py3 port of samba.tests.dcerpc.raw_protocolNoel Power2018-09-032-180/+188
| | | | | | Port code to allow this test run with either py2 or py3 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/tests: ensure byte content (not strings)Noel Power2018-09-031-5/+5
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.dcerpc.dnsserver(ad_dc) for python3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.dcerpc.dnsserver for python3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Update known fail with py3 variant of samba.tests.dcerpc.dnsserverNoel Power2018-09-031-0/+3
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.dnscmd for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: Enable samba.tests.samba_tool.sites for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.help for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/tests: Py2/Py2 enable samba.tests.samba_tool.help to runNoel Power2018-09-031-2/+3
| | | | | | | Ensure bytes output is converted to text type for PY3 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: Enable samba.tests.samba_tool.provision_password_check for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/netcmd: Fix password usage for py2/py3 compatabilityNoel Power2018-09-032-3/+8
| | | | | | | | | getpass returns str (e.g. bytes) in python2 and str (unicode) in py3. Adapt code to so we don't do illegal things (like try and decode) a string in python3 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.ntacl for Py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/provision: remove use of str() func for binary dataNoel Power2018-09-031-2/+2
| | | | | | | | | Python 2 code works with str(policy["nTSecurityDescriptor"]) however this cannot work with Python 3. One could argue even the str method doesn't make sense at all (returning a string) for data. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/samba/netcmd: changes for samab.tests.samba_tool.computerNoel Power2018-09-034-5/+5
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.ou for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.group for py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/sambe/tests/samba_tool: PY3 port for tests.samba_tool.groupNoel Power2018-09-031-2/+2
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.user_check_password_script py3Noel Power2018-09-031-1/+1
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/selftest: enable samba.tests.samba_tool.user_wdigest for python3Noel Power2018-09-032-2/+3
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>