summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pidl: Use NDR_ZERO_STRUCT(P) macrosAndreas Schneider2019-02-144-8/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc:ndr: Add NDR_ZERO_STRUCT(P) macrosAndreas Schneider2019-02-141-0/+7
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc:ndr: Implement ndr_zero_memory()Andreas Schneider2019-02-144-1/+271
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib:util: Add GPL header to tftw.cAndreas Schneider2019-02-141-0/+13
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib:util: Add missing "replace.h" header in tftwAndreas Schneider2019-02-141-0/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4 dsdb util: samdb_client_site_name clean upGary Lockyer2019-02-141-16/+14
| | | | | | | | | | | | * Initialise pointers to NULL * replace talloc_free with TALLOC_FREE * add goto exit to ensure memory deallocated correctly 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 Feb 14 06:53:14 CET 2019 on sn-devel-144
* s4 dsdb util: remove samdb_search_countGary Lockyer2019-02-141-20/+0
| | | | | | | | All the uses have been replaced with calls to dsdb_domain_count, so it is no longer needed. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4 dsdb util: samdb_client_site_name use dsdb_domain_countGary Lockyer2019-02-141-3/+14
| | | | | | | | | Replace the call to samdb_search_count with dsdb_domain_count. As this is the only remaining caller of samdb_search_count, replacing it will allow the removal of samdb_search_count. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4 rpc_server_samr: DomGeneralInformation use dsdb_domain_countGary Lockyer2019-02-142-14/+58
| | | | | | | | | | Use dsdb_domain_count instead of samdb_search_count to determine the number of users, groups and aliases. This gives a performance gain of around 10%, reduces the total memory allocated and fixes the incorrect count returned for aliases. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4 dsdb util: add dsdb_domain_countGary Lockyer2019-02-141-0/+178
| | | | | | | | | | | | This counts the number of objects that are in the domain, provided a domain SID was supplied (otherwise it just counts all the objects). This routine avoids allocating memory for the full result set by using a callback. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s2 decrpc samr: Add tests for QueryDomainInfoGary Lockyer2019-02-142-0/+56
| | | | | | | | | | | Add tests for the number of domain users, groups and aliases returned by QueryDomainInfo. These tests revealed that the existing code was not checking the returned elements to ensure they were part of the domain. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* .gitlab-ci.yml: Make docker image name more explicitTim Beale2019-02-141-4/+6
| | | | | | | | | | | | | | | | | | The 'image' YAML tag implies a docker image, but for people who find gitlab mysterious, let's make it blatantly obvious what we're doing here. + added a comment + added 'DOCKER' to the variable names + removed 'BUILD', as we've now dropped this from all the job-names + tried to make the variable names consistent, both within the file and WRT docker terminology Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 14 03:51:21 CET 2019 on sn-devel-144
* .gitlab-ci.yml: Include the actual command used by gitlabTim Beale2019-02-141-0/+3
| | | | | | | | | Someone who finds gitlab mysterious will have no idea what $CI_JOB_NAME should be, if they wanted to reproduce the autobuild job manually. It should be trivial to include the actual command being run in the logs. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* .gitlab-ci.yml: Re-indent comments on test timesAndrew Bartlett2019-02-142-10/+10
| | | | | | | (some of these need to be updated, but for now improve the formatting) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
* .gitlab-ci.yml: Use .extends to avoid duplication of autobuild commandAndrew Bartlett2019-02-142-77/+32
| | | | | | | | | | This should make our .gitlab-ci.yml file much less overwealming. The downside is that $CI_JOB_NAME is printed rather than the job name in the log, but the upside is that the names must now strictly match. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
* .gitlab-ci.yml: Fix the registry as "registry.gitlab.com"Andrew Bartlett2019-02-141-1/+2
| | | | | | | | | | This is important as our team docker images are only in this registry, but the .gitlab-ci.yml file is also run on other private GitLab hosts. This partially undoes 8989916b5af6fed9c4c63035d4488583396b8c5a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
* .gitlab-ci.yml: add retries on runner_system_failure/stuck_or_timeout_failureStefan Metzmacher2019-02-141-0/+5
| | | | | | | | | This hopefully avoids pipeline failures due too docker/runner errors. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* .gitlab-ci*.yml: use 'extends: ' instead of YAML AnchorsStefan Metzmacher2019-02-142-27/+33
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* .gitlab-ci*.yml: remove build_ prefixesStefan Metzmacher2019-02-142-24/+24
| | | | | | | | It's useless to see 'builf_samba_ad...' 7 times in the gitlab pipeline summary. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* .gitlab-ci.yml: print out more information in the before_script sectionStefan Metzmacher2019-02-141-0/+5
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add 'lsb_release -a' and 'mount' to system-info.txtStefan Metzmacher2019-02-141-0/+2
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest:Samba4: wait for DNS names being registeredStefan Metzmacher2019-02-141-0/+29
| | | | | | | We can't reliable start tests without registered dns names. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest:Samba4: report when samba is started and readyStefan Metzmacher2019-02-141-7/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: make rodc_dns_update() more robust against timing problemsStefan Metzmacher2019-02-141-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this we had an interesting race! The messaging_dgm code caches connected datagram sockets based on the destination pid for 1 second. The fact that samba_dnsupdate constantly recreates its messaging context (and the underlying datagram socket) means that we the winbindd messaging context may get a stale connection. As a result sending any message from winbindd back to samba_dnsupdate will result in ECONNREFUSED. That means the IRPC response from winbindd never reaches samba_dnsupdate, which will then hit a timeout. In turn samba_dnsupdate on the RODC times out. This was a workaround for the problem, by having just one global IRPC handle and thus just one messaging_dgm context. The actual problem is solved a few commits before ("messages_dgm: Properly handle receiver re-initialization"). But we keep this as an performance optimization, which hopefully means that the overall samba_dnsupdate is less likely to timeout after the hardcoded 20 seconds. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: make it clear that opts.use_file is active and we're not ↵Stefan Metzmacher2019-02-141-3/+6
| | | | | | | using nsupdate Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* winbindd_irpc: remove unused winbind_DsrUpdateReadOnlyServerDnsRecords from ↵Stefan Metzmacher2019-02-141-2/+0
| | | | | | | wb_irpc_forward_state Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:setup: register ${NTDSGUID}._msdcs.${DNSFOREST} first in dns_update_listStefan Metzmacher2019-02-141-1/+1
| | | | | | | | After the A and AAAA records for the ${HOSTNAME} this is the most important name. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* messages_dgm: Properly handle receiver re-initializationVolker Lendecke2019-02-142-1/+16
| | | | | | | | | | | | | | | | | | | | | This only properly covers the small-message nonblocking case. Covering the large-message and the blocking case is a much larger effort assuming we want to re-send the failed message if parts of the message has gone through properly. Don't do that for now. This was found by sanba_dnsupdate constantly recreating its irpc handle to winbindd in the RODC case. The messaging_dgm code cached connected datagram sockets based on the destination pid for 1 second. Which means the IRPC responses from winbindd are never delivered to samba_dnsupdate, which will then hit a timeout. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13786 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture3: Extend read3 for the "messaging target re-inits" failureVolker Lendecke2019-02-142-20/+25
| | | | | | | | | | Do ping_pong a hundred times, re-initializing the msg_ctx every time. https://bugzilla.samba.org/show_bug.cgi?id=13786 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* messages_dgm: Use saved errno valueVolker Lendecke2019-02-141-1/+1
| | | | | | | | | | | | In this case this is just a cleanup, the value has just been set by messaging_dgm_sendmsg. But as that already saves errno into a local variable, use that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13786 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: Check for libnscdChristof Schmitt2019-02-132-0/+4
| | | | | | | | | | | | | | The check was in the old autoconf, but not in waf. As the code is still in source3/lib/util_nscd.c, add the check for libnscd to allow building and using the code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13787 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Feb 13 17:58:33 CET 2019 on sn-devel-144
* Make sure results from GetAttrString are decref'ed where neededNoel Power2019-02-133-8/+32
| | | | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett abartlet@samba.org Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Wed Feb 13 14:51:12 CET 2019 on sn-devel-144
* Fix instances of PyDict_SetItem to decref the valueNoel Power2019-02-131-105/+241
| | | | | | | | | Although it would be better to use the BuildValue approach to create the dictionares here, unfortunately the dictionaries created here have key/values that are created dynamically (based on input params). Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett abartlet@samba.org
* Fix mem leak with PyBytes_FromStringAndSizeNoel Power2019-02-131-3/+6
| | | | Reviewed-by: Andrew Bartlett abartlet@samba.org
* selftest: Only set clockskew to 5 seconds for MIT KerberosAndrew Bartlett2019-02-131-4/+10
| | | | | | | | | | | | | | | | This was added in ac5427c6eba09134411f76a5e6f7e2643fa74eed as part of the MIT KDC effort, but makes some tests much less reliable under high load. As the Heimdal build does not need this, only specify for the MIT build. Tested with an MIT AD DC build with: make test TESTS="samba3.raw.session samba3.smb2.session" 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): Wed Feb 13 05:49:43 CET 2019 on sn-devel-144
* wafsamba/samba_utils.py: override symlink to allow force linkJoe Guo2019-02-132-2/+16
| | | | | | | | | | | | | | | | | | if bin is not empty and I have been sharing the samba tree into a Vagrant environment and we run make, we get annoying linking error like this: File "~/samba/lib/tevent/wscript", line 130, in build installdir='python') File "./buildtools/wafsamba/wafsamba.py", line 745, in SAMBA_SCRIPT os.symlink(link_src, link_dst) FileExistsError: [Errno 17] File exists: '~/samba/lib/tevent/tevent.py' -> '~/samba/bin/default/../python/tevent.py' Makefile:7: recipe for target 'all' failed Override the symlink method to allow force linking. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Change backup/restore testenvs to use 1 prefork childTim Beale2019-02-131-4/+8
| | | | | | | | | | | | | | | | | | | Recently the gitlab CI jobs were hitting memory resource limits and using swap, which then caused test failures. The process model used in the testenvs seemed to be contributing to this problem. We can reduce the memory overhead of the restore/backup testenvs by using 1 prefork child process instead of the default of 4 (kudos to Garming for the idea). The tests run against these testenvs are basic sanity-checks, rather than heavy-duty stress tests, so the number of prefork workers shouldn't matter. This is a bit of a tradeoff between testing the defaults that will actually be used in production vs using limited resources efficiently on shared CI runner machines. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Use default 'prefork children' smb.conf settingTim Beale2019-02-131-2/+0
| | | | | | | | The default setting should be 4, so there should be no need to specify this in the testenv smb.conf. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb_dn: don't free a known NULL pointerDouglas Bagnall2019-02-131-4/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb_dn: remove unreachable code in dn_explodeDouglas Bagnall2019-02-131-9/+0
| | | | | | | | Every time I look at this file, I spend a few minutes wondering how these bits of code are ever run. Never again. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: move a if (ret) closer to ret sourceDouglas Bagnall2019-02-131-4/+5
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb: check NULL guid strings in la_fix_linksDouglas Bagnall2019-02-131-3/+11
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb: linked attrs: check a talloc_new()Douglas Bagnall2019-02-131-1/+6
| | | | | | | Also we can defer it past a thing that doesn't need or check for it. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb: make get_parsed_dns_trusted() a common helper functionDouglas Bagnall2019-02-134-58/+57
| | | | | | | | | | | We are already using it in two places, and are about to add a third. The version in repl_meta_data.c did more work in the case that the parsed_dns can't really be trusted to conform to the expected format; this is now a wrapper called get_parsed_dns_trusted_fallback(). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* spelling of associatedDouglas Bagnall2019-02-133-5/+5
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils: Add missing NULL check in rpc_fetch_domain_aliases()Andreas Schneider2019-02-131-0/+4
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Feb 13 00:52:25 CET 2019 on sn-devel-144
* s3:locking: Add missing NULL checkAndreas Schneider2019-02-121-0/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* CI: split out "samba-ad-dc-ntvfs[-py2]" test targetsRalph Boehme2019-02-112-6/+30
| | | | | | | | | | | | | | | | | | | Many AD tests currently use the "samba" target. Split out a new target "samba-ad-dc-ntvfs" and have all tests that use the "ad_dc_ntvfs" env use the new target. This should greatly speed up the runtime for the "samba" target and avoid swapping. This reduces the total CI time by ~ 55%, I got an autobuild and a gitlab pipeline finished in just ~ 100 mins! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Feb 11 14:10:12 CET 2019 on sn-devel-144
* dsdb/tests/vlv: use only one toplevel dn that is correctly cleaned upStefan Metzmacher2019-02-111-9/+9
| | | | | | | | | Before "OU=vlvtestou2,%s" % (self.base_dn) was left behind after the test. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/dbcheck.sh: fix dbcheck_fix_one_way_links cleanupStefan Metzmacher2019-02-111-1/+1
| | | | | | | | | | | | | Commit 35bfc62a31c9ad73449594ddd48f76f50e0abade changed dbcheck to not regard old one-way-links as errors. At that time the relavant trigger changed from fix_all_string_dn_component_mismatch to fix_all_old_dn_string_component_mismatch. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>