summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* lib:texpect: Use C99 initializer for poptOption in texpectAndreas Schneider2019-01-281-2/+14
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* tdb: Fix compatibility of wscript with older pythonLukas Slebodnik2019-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Traceback (most recent call last): File "tdb-1.3.17/third_party/waf/waflib/Scripting.py", line 158, in waf_entry_point run_commands() File "tdb-1.3.17/third_party/waf/waflib/Scripting.py", line 251, in run_commands ctx = run_command(cmd_name) File "tdb-1.3.17/third_party/waf/waflib/Scripting.py", line 235, in run_command ctx.execute() File "tdb-1.3.17/third_party/waf/waflib/Context.py", line 204, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "tdb-1.3.17/third_party/waf/waflib/Context.py", line 286, in recurse user_function(self) File "tdb-1.3.17/wscript", line 225, in testonly cmd = "BINDIR={} {}".format(blddir, sh_test) ValueError: zero length field name in format Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Jan 20 03:49:59 CET 2019 on sn-devel-144
* lib:mscat: Use size_t for len value to fix build issueAndreas Schneider2019-01-191-3/+6
| | | | | | | asn1_read_value_type() only uses it as an unsigned it, a negative value isn't assinged. Signed-off-by: Andreas Schneider <asn@samba.org>
* lib:mscat: Fix may be used uninitialized warningsAndreas Schneider2019-01-191-2/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Use gpfs.h from third_party on LinuxChristof Schmitt2019-01-182-5/+20
| | | | | | | | | | | | | | | | Update the logic for finding the gpfs.h header file: Look for the header file in the default location under /usr/lpp/mmfs/include. If it is not available there, default to the file in third_party/gpfs/ on Linux (AIX could be added if there is demand). The configure option --with-gpfs=GPFS_HEADERS_DIR can always be used to overwrite the default behavior with a specific location. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jan 18 17:21:02 CET 2019 on sn-devel-144
* ldb: version 1.5.2ldb-1.5.2Stefan Metzmacher2019-01-154-1/+285
| | | | | | | | | | | | | | | * Build fixes * dirsync: Allow arbitrary length cookies (bug #13686) * The build uses python3 by default: * --extra-python would take python2 now * To build with python2 only use: PYTHON=python2 ./configure PYTHON=python2 make PYTHON=python2 make install Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org>
* tevent: version 0.9.38tevent-0.9.38Stefan Metzmacher2019-01-152-1/+127
| | | | | | | | | | | | | | * Deprecate tevent wrapper api again * Build fixes * The build uses python3 by default: * --extra-python would take python2 now * To build with python2 only use: PYTHON=python2 ./configure PYTHON=python2 make PYTHON=python2 make install Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org>
* talloc: version 2.1.15talloc-2.1.15Stefan Metzmacher2019-01-154-1/+97
| | | | | | | | | | | | | | * Deprecate talloc_set_memlimit() and talloc_autofree_context() * Fix undefined behavior in talloc_memdup * The build uses python3 by default: * --extra-python would take python2 now * To build with python2 only use: PYTHON=python2 ./configure PYTHON=python2 make PYTHON=python2 make install Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org>
* addns: Async ads_dns_lookup_nsVolker Lendecke2019-01-152-358/+121
| | | | | | | | | | Use dns_lookup_send/recv to get NS records Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jan 15 11:16:00 CET 2019 on sn-devel-144
* addns: Async ads_dns_lookup_srvVolker Lendecke2019-01-153-207/+151
| | | | | | | | Use dns_lookup_send/recv to get SRV records. This avoids synchronous libresolv calls and provides the infrastructure to get dsgetdcname async. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* addns: Centralize siteless lookup fallbackVolker Lendecke2019-01-151-60/+29
| | | | | | | We had the same logic 3 times, coalesce into one Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/ldb: Use new PYARG_ES format for parseTupleNoel Power2019-01-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | While 'es' format works great for unicode (in python2) and str (in python3) The behaviour with str (in python2) is unexpected. In python2 the str type is (re-encoded) with the specified encoding. In python2 the 'et' type would be a better match, that ensures 'str' type is treated like it was with 's' (no reencoding) and unicode is encoded with the specified encoding. However in python3 'et' allows byte (or bytearray) params to be accepted (with no reencoding), we don't want this. This patch adds a new PYARG_STR_UNI format code which is a hybrid, in python2 it evaluates to 'et' and in python3 'es' and so gives the desired behaviour for each python version. Additionally remove the associated known fail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13616 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Sun Jan 13 03:53:00 CET 2019 on sn-devel-144
* lib/ldb/tests/python: Add test to pass utf8 encoded bytes to ldb.DnNoel Power2019-01-131-0/+15
| | | | | | | | | | | | This test should demonstrate an error with the 'es' format in python where a 'str' byte-string is passed (containing utf8 encoded bytes) with some characters that cannot be decoded as ascii. The same code if run in python3 should generate an error (needs string not bytes) Also Add knownfail for ldb.Dn passed utf8 encoded byte string Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* lib: remove unused function nttime_from_string()Swen Schillig2019-01-121-5/+0
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: deprecate tevent_wrapper api againStefan Metzmacher2019-01-127-5/+18
| | | | | | | | | | | | Samba doesn't use it anymore and we don't want to invite new users of that api without further discussion. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jan 12 03:12:09 CET 2019 on sn-devel-144
* Revert "pthreadpool: split out pthreadpool_tevent_job from ↵Ralph Boehme2019-01-111-172/+66
| | | | | | | | | | | | | | | | pthreadpool_tevent_job_state" This reverts commit 245d684d28dab630f3d47ff61006a1fe3e5eeefa. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add pthreadpool_tevent_job_cancel()"Ralph Boehme2019-01-111-40/+0
| | | | | | | | | | | | | | This reverts commit 791c05144ee9296024cc0fdebe4afeaaf67e26bc. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs"Ralph Boehme2019-01-112-43/+0
| | | | | | | | | | | | | | This reverts commit 25756425aaf5465e56ea809cd415b6a387848919. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add some lockless coordination between the main and job ↵Ralph Boehme2019-01-112-221/+5
| | | | | | | | | | | | | | | | threads" This reverts commit 9656b8d8ee11ee351870286f16ea8fbe49112292. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()"Ralph Boehme2019-01-111-34/+0
| | | | | | | | | | | | | | This reverts commit 9b73fda926eb8493e80012794483039be66d4e6c. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: maintain a list of job_states on each ↵Ralph Boehme2019-01-111-78/+24
| | | | | | | | | | | | | | | | pthreadpool_tevent_glue" This reverts commit aa9b64eccfd037941512bad108c4e3946714a502. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add a comment about a further optimization in ↵Ralph Boehme2019-01-111-17/+0
| | | | | | | | | | | | | | | | pthreadpool_tevent_job_destructor()" This reverts commit f23cac39b36b026650e0922c78fe0fd3fe567e35. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent ↵Ralph Boehme2019-01-111-434/+0
| | | | | | | | | | | | | | | | jobs/pools" This reverts commit 40d15260d24d0071732f47873f395fce29b8a6f4. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()"Ralph Boehme2019-01-112-33/+0
| | | | | | | | | | | | | | This reverts commit 12a45ee1a66379ba7562729b835ce0e2e4bfb3b3. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add tests for ↵Ralph Boehme2019-01-111-144/+0
| | | | | | | | | | | | | | | | pthreadpool_tevent_[current_job_]per_thread_cwd()" This reverts commit fbafdc99ef2cef11a1a28e795ffe965cb53ef7fa. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: call unshare(CLONE_FS) if available"Ralph Boehme2019-01-113-56/+0
| | | | | | | | | | | | | | This reverts commit 65e4742d168454df6507d9e74993749063435dd6. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()"Ralph Boehme2019-01-113-365/+0
| | | | | | | | | | | | | | This reverts commit 3c4cdb290723432b00ff9ff88b892cb4e66e76cd. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: implement pthreadpool_tevent_wrapper_create() ↵Ralph Boehme2019-01-112-433/+1
| | | | | | | | | | | | | | | | infrastructure" This reverts commit f9745d8b5234091c38e93ed57a255120b61f3ad7. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: test cancelling and freeing jobs of a wrapped ↵Ralph Boehme2019-01-111-573/+0
| | | | | | | | | | | | | | | | pthreadpool_tevent" This reverts commit fb6b6cf3e43165ced4b1039f2683d19f277c0792. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: we need to use pthreadpool_tevent_per_thread_cwd() on ↵Ralph Boehme2019-01-111-2/+1
| | | | | | | | | | | | | | | | the callers pool" This reverts commit ff863f2d98ac5e12073af824b794404c3d7198c5. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: ignore the return value of poll(NULL, 0UL, 1)"Ralph Boehme2019-01-111-2/+2
| | | | | | | | | | | | | | This reverts commit 6da0d68f49bbd82f5a08427779c9f5ebd6f755aa. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()"Ralph Boehme2019-01-111-1/+0
| | | | | | | | | | | | | | This reverts commit f68b5ee75f002ed542a8423070fb01e3b0e83f65. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* waf:lib/replace: fix a build error with non-gcc compilersBjörn Jacke2019-01-101-1/+1
| | | | | | | | | | 3a175830e579ab10231439657b23733338cd5634 added that variable which should have been an empty initialization here. -Wno-format-zero-length (which might be unsupported by the compiler) should not be set if we really only want to initialize the cflags. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: replace: snprintf: Whitespace clean upLadislav Michl via samba-technical2019-01-101-72/+72
| | | | | | | | | Remove spaces before tab, spaces at the end of line and white chars on blank line. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Fix typo and remove the sun and the cloudsSwen Schillig2019-01-101-1/+1
| | | | | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jan 10 06:14:27 CET 2019 on sn-devel-144
* Fix typos and ban the rams from sambatdb-1.3.17Swen Schillig2019-01-103-3/+3
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* paged results: new paged results module using GUID listAaron Haslett2018-12-212-454/+0
| | | | | | | | | Replacing paged results module to use GUID list instead of storing result list in memory, in order to improve memory performance. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib:util: Use memset_s() in data_blob_clear()Andreas Schneider2018-12-201-1/+1
| | | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-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 Dec 20 16:11:03 CET 2018 on sn-devel-144
* lib:util: Sync memory.h with replace.hAndreas Schneider2018-12-201-4/+8
| | | | | | | | | We can't remove memory.h as this is a public header file. So we need to duplicate them from replace.h Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib:util: Cleanup comments in memory.hAndreas Schneider2018-12-201-18/+20
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replace: Use memset_s for ZERO_* macrosAndreas Schneider2018-12-201-4/+8
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replace: Cleanup comments for ZERO_*Andreas Schneider2018-12-201-11/+13
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replace: Add memset_s to replacement functionsAndreas Schneider2018-12-202-1/+2
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: Add missing libreplace deps to pyldb*Andreas Schneider2018-12-201-2/+2
| | | | | | | | | This will require memset_s() because of a later commit moving ZERO_STRUCT to use memset_s(). Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/audit_logging: actually create tallocPhilipp Gesang2018-12-201-0/+6
| | | | | | | | | | | Heal damage of 79f494e51e.. That context is being passed around and freed but is never actually allocated on that stack. Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* debug: enable per debug-class logfilesRalph Boehme2018-12-201-2/+13
| | | | | | | | | This finally enables per debug-class logfiles by hooking into reopen_logs_internal() calls to reopen_one_log() per configured debug-class. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* debug: remove fd and debugf from state, use dbgc_config[DBGC_ALL]Ralph Boehme2018-12-201-25/+34
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* debug: update logsize checking for per debug-class logfilesRalph Boehme2018-12-201-0/+14
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* debug: update need_to_check_log_size() for per debug-class logfilesRalph Boehme2018-12-201-2/+15
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* debug: add support for per debug-class logfilesRalph Boehme2018-12-201-1/+14
| | | | | | | | | | | | | | | | | | | | This adds support for per debug-class logfiles to the function parsing the "log level" option. The enhanced syntax is: log level = CLASS:LEVEL[@PATH] [CLASS:LEVEL[@PATH] ... ] Eg log level = full_audit:1@/var/log/audit.logfile While the option is already parsed and stored in in the dbgc_config[] array, the feature is still effectively disabled, as reopen_logs_internal() still doesn't open the per debug-class logfiles. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>