summaryrefslogtreecommitdiff
path: root/lib/talloc/wscript
AgeCommit message (Collapse)AuthorFilesLines
2020-11-09lib: talloc: Fix memlimit on pool realloc.Jeremy Allison1-1/+1
We only have to do the memlimit check before any real malloc or realloc. Allocations out of a memory pool have already been counted in the memory limit, so don't check in those cases. This is an application-visible change (although fixing a bug) so bump the ABI to 2.3.1 -> 2.3.2. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-11-18talloc: Release talloc 2.3.1talloc-2.3.1Uri Simchoni1-1/+1
* Upgrade waf to 2.0.18 to fix a cross-compilation issue BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-22talloc: Release talloc 2.3.0talloc-2.3.0Andrew Bartlett1-1/+1
* add pytalloc_get_name() to safely access te talloc name in Python bindings * Use a new minor version to allow talloc updates in the 4.11 release stream Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz
2019-05-06talloc: Follow pattern of ldb and tdb to ensure "make test" depends on a buildAndrew Bartlett1-1/+7
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-03-21talloc: Release talloc 2.2.0talloc-2.2.0Andrew Bartlett1-1/+1
* Remove pytalloc_CObject_FromTallocPtr() * Remove --extra-python (a build time mode to produce Python2 and Python3 bindings at the same time) * New minor version to allow Samba 4.10 to release a talloc if required from that branch Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-03-21build: Standardise on calling conf.SAMBA_CHECK_PYTHON() in librariesAndrew Bartlett1-10/+2
We do this by removing the confusing mandatory option to conf.SAMBA_CHECK_PYTHON{,_HEADERS}(), instead just use the value of --disable-python internally This follows the default minimum of Python 3.4 and keeps things consistent with the main Samba build where --disable-python is required to skip building python bindings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-03-21build: Remove manual specification of minimum python versionAndrew Bartlett1-1/+1
We now used the default of 3.4 from conf.SAMBA_CHECK_PYTHON() Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-03-21build: Remove bld.gen_python_environments()Andrew Bartlett1-15/+14
This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2019-03-21build: Remove --extra-pythonAndrew Bartlett1-7/+0
This option is quite invasive in waf and was mainly for the python3 transition. Testing with multiple python versions can be done by testing a full compile against multiple versions, likewise multiple different binding versions can be created the same way. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-02-26talloc: version 2.1.16talloc-2.1.16Stefan Metzmacher1-1/+1
* Fix standalone build of talloc. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2019-01-15talloc: version 2.1.15talloc-2.1.15Stefan Metzmacher1-1/+1
* 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>
2018-09-16PY3: detect talloc_utils (for version of python running the build)Noel Power1-2/+2
It seems all combinations have potential to fail here :/ however for the moment making the assumption * if python2 driving the build you are building against libpython2 (with the option of having python3 as 'extra-python' * if python3 driving the build you are building against libpython3 (with the option of having python3 as 'extra-python' NOTE: this isn't inforced it probably should be !!!! In a system with python2 and python3 installed it seems waf needs PYTHON env variable to decide which libpython to build against. It's also an option that configure should use that too (to figure out which talloc_util to use or build) However.... right now I just want the thing to build Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-05lib/talloc/wscript: update to handle waf 2.0.4Alexander Bokovoy1-19/+17
Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-07-12talloc: version 2.1.14talloc-2.1.14Stefan Metzmacher1-1/+1
* 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>
2018-04-13wscript_build: make sure we link extra-python versions of librariesNoel Power1-1/+1
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-05talloc: version 2.1.13talloc-2.1.13Stefan Metzmacher1-1/+1
* Use atexit() again instead of a library destructor (bug #13366) Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Apr 5 15:53:16 CEST 2018 on sn-devel-144
2018-03-21talloc: version 2.1.12talloc-2.1.12Stefan Metzmacher1-1/+1
* Fix documentation typo * Fix compilation with -Wstrict-overflow=2 * Use a library destructor instead of atexit() if available (bug #7587) 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): Wed Mar 21 18:39:33 CET 2018 on sn-devel-144
2018-01-12talloc: version 2.1.11talloc-2.1.11Stefan Metzmacher1-1/+1
* disable-python - fix talloc wscript if bundling disabled * Do not disclose the random talloc magic in free()'ed memory Signed-off-by: Stefan Metzmacher <metze@samba.org>
2017-08-01waf: disable-python - fix talloc wscript if bundling disabledIan Stakenvicius1-9/+12
The pytalloc-util dependency logic in lib/talloc/wscript on a standalone build checks for pytalloc-util in a manner that will fail if bundling is disabled, this causes issues on --disable-python builds of ldb, tevent, and samba. This patch restructures the logic to skip checks if python is disabled, instead just setting the temporary state variable 'using_system_pytalloc_util' to False Successfully tested patch on ldb-1.1.31 and above, tevent-0.9.33, and samba-4.7_rc3 Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-07-21talloc: version 2.1.10talloc-2.1.10Stefan Metzmacher1-1/+1
* build, documentation and python3 improvements Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-07-04talloc: Fix execution of test_magic_differs from tarballLukas Slebodnik1-0/+2
make check failed in case of tarball because test_magic_differs.sh is in top level directory and not in sub-directory lib/talloc sh: ./lib/talloc/test_magic_differs.sh: No such file or directory magic differs test returned 127 Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-07-04talloc: Use libraries from build dir for testsuiteLukas Slebodnik1-0/+4
There was a failure when tests were executed after after extracting talloc tarball. sh$ make -j8 check WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$PATH waf test bin/talloc_testsuite: error while loading shared libraries: libtalloc.so.2: cannot open shared object file: No such file or directory sh: ./lib/talloc/test_magic_differs.sh: No such file or directory Traceback (most recent call last): File "test_pytalloc.py", line 11, in <module> import talloc ImportError: libtalloc.so.2: cannot open shared object file: No such file or directory Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-03-10waf: disable-python - align talloc's wscriptIan Stakenvicius1-7/+5
Drop the configure option for --disable-python as it is now global in wafsamba If samba is set to use a system copy of talloc, and talloc wasn't built with python support, then the system pytalloc-util will not be found. If samba is being built without python support then pytalloc-util is not needed, so do not bother to try and find it. The build configuration for pytalloc-util needs to exist even if it's not being built, so that dependency resolution can occur throughout the rest of the samba build system -- this required dropping the higher level conditional and using the enabled= parameter instead. Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-03-10talloc: use the system pytalloc-util for python3 as wellAndrew Bartlett1-14/+30
This involves installing a .pc file for the python3 library as well To get the .pc file generated and installed is quite a mission, we have to rework the talloc build system to ensure that the second 'env' created for EXTRA_PYTHON has everything set up on it, the TALLOC_VERSION in particular. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Incorportaing fixes by Petr Viktorin <pviktori@redhat.com> Signed-off-by: Petr Viktorin <pviktori@redhat.com>
2017-02-25talloc: version 2.1.9talloc-2.1.9Stefan Metzmacher1-1/+1
* fix some coverity defects * fix TALLOC_VERSION_MINOR and talloc_version_minor() * add new tests * add pytalloc_get_type() * add pytalloc_GenericObject_{steal,reference}[_ex]() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-22talloc: fix TALLOC_VERSION_* mismatch detectionStefan Metzmacher1-0/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 22 00:14:34 CET 2017 on sn-devel-144
2017-02-01talloc/wscript: avoid passing pointless enabled=True to SAMBA_PYTHON()Stefan Metzmacher1-2/+0
This is the default and should not be passed explicitly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Feb 1 18:16:58 CET 2017 on sn-devel-144
2016-07-28talloc: version 2.1.8talloc-2.1.8Stefan Metzmacher1-1/+1
* performance improvements * build fixes * documentation updates Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-05-05talloc: version 2.1.7talloc-2.1.7Stefan Metzmacher1-1/+1
* Fix memory leak when destructors reparent children. (bug #11901) Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 5 22:33:04 CEST 2016 on sn-devel-144
2016-03-08talloc: Bump version numberAndrew Bartlett1-1/+1
The removal of the macros and replacement with proper functions is a API, but not ABI break. Only code that incorrectly used the structure either in function signatures or to access the members directly will need to be modified before being built against this version of talloc. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08talloc: add _pytalloc_get_ptr/_pytalloc_get_mem_ctx helper functionsAndrew Bartlett1-1/+1
This allows us to check which type is involved, and dereference that type correctly Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08talloc: Improve testsuite by avoiding path issuesAndrew Bartlett1-1/+2
We now rely on waf to tell us where the helper binary is. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-01-13talloc: Only set public headers field when installing as a public library.Jelmer Vernooij1-2/+2
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
2015-11-05talloc: version 2.1.5talloc-2.1.5Stefan Metzmacher1-1/+1
* Minor build fixes Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-10-09talloc: Test that talloc magic differs between processes.talloc-2.1.4Adrian Cochrane1-1/+10
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Oct 9 23:15:06 CEST 2015 on sn-devel-104
2015-10-09talloc: Increment minor version due to added talloc_test_get_magic.Adrian Cochrane1-1/+1
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-10-09lib/talloc: Disrupt buffer overflow attacks on Samba by using random magicAndrew Bartlett1-0/+3
By setting the talloc magic to a random value, we make it much harder to overwrite a talloc_chunk in a valid way with a simple buffer overflow. The flags are placed before more senstive variables so they have to be overwritten first. Inspired by the exploit in: http://blog.csnc.ch/wp-content/uploads/2012/07/sambaexploit_v1.0.pdf Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-21talloc: version 2.1.3talloc-2.1.3Stefan Metzmacher1-1/+1
* improved python3 bindings * documentation fixes regarding talloc_reference() and talloc_unlink() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2015-05-19pytalloc: Test for all Python versionsPetr Viktorin1-9/+1
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-05-19buildtools: Add a helper to iterate through Python environmentsPetr Viktorin1-62/+27
This prevents code duplication to ensure the "extrapython" build is the same as the normal one. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-05-19pytalloc: Build for two Python versions at oncePetr Viktorin1-0/+37
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-05-19pytalloc: Port to Python 3Petr Viktorin1-5/+5
- Use native string for repr - Use rich comparison Removes the deprecated tp_compare in favor of tp_richcompare. Disparate types cannot be compared (except for == and !=), and True or False objects are returned explicitly. - Use Py_TYPE instead of ob_type This changed to conform to C aliasing rules, see http://legacy.python.org/dev/peps/pep-3123/ - Don't provide CObject creation function A PyCapsule based replacement would be possible, but might not be necessary considering the function is not used much. - Use new-style module initialization Build changes: - Use ABI flag in the lib name and pkg-config template - Use the SAMBA_CHECK_PYTHON macro for finding Python Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-04-24pytalloc: Add testsPetr Viktorin1-1/+18
Add tests for pytalloc. Since talloc objects can't be created from Python, a C extension with helpers is added. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-03-26Move waf into third_party/.Jelmer Vernooij1-1/+2
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-17lib: talloc: tests - add test_pthread_talloc_passing() testing talloc in a ↵Jeremy Allison1-1/+5
pthread environment. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo <simo@samba.org> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Mar 17 19:23:29 CET 2015 on sn-devel-104
2015-03-09talloc: version 2.1.2talloc-2.1.2Stefan Metzmacher1-1/+1
Changes: - Allow destructors to reparent the object - Allow destructors to remove itself - Build improvements Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2014-06-20talloc:build: improve detection of srcdirMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-05-16talloc: version 2.1.1talloc-2.1.1Stefan Metzmacher1-1/+1
Changes: - documentation updates - a fix for pytalloc-util.pc - performance improvements here and there - fixed compiler warnings Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri May 16 19:51:26 CEST 2014 on sn-devel-104
2013-09-08talloc: Add talloc_pooled_objectVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-14talloc: only provide the --enable-talloc-compat1 in standalone buildStefan Metzmacher1-4/+6
The compat library is already only built in standalone build, so we need the configure option also only in the standalone build. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>