summaryrefslogtreecommitdiff
path: root/lib/talloc/wscript
AgeCommit message (Collapse)AuthorFilesLines
2025-02-06talloc: version 2.4.3talloc-2.4.3Jule Anger1-1/+1
* Testsuite and documenation fixes * Add LGPLv3 LICENSE file Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2024-09-28lib:talloc: Use memset_s() to avoid the call gets optimized outAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2024-01-29talloc: release 2.4.2talloc-2.4.2Jule Anger1-1/+1
- build with Python 3.12 (bug #15513) - documentation fixes BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2023-07-19talloc: release 2.4.1talloc-2.4.1Stefan Metzmacher1-1/+1
* Remove remaining, but broken python2 support * Spelling fixes * Remove unneeded va_copy() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-02-02Python: remove pydoctorRob van der Linde1-7/+0
Removes: * waf pydoctor * waf wafdocs * make pydoctor There is no "make wafdocs" it only appears to be in wscript. The reasoning being is these are broken and appear to not have been run for some time. Signed-off-by: Rob van der Linde <rob@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): Thu Feb 2 21:15:54 UTC 2023 on atb-devel-224
2023-01-18talloc: version 2.4.0talloc-2.4.0Stefan Metzmacher1-1/+1
* Add talloc_asprintf_addbuf() * Support python 3.12 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org>
2022-12-14lib: Move talloc_asprintf_addbuf() to tallocVolker Lendecke1-1/+1
I wanted to use this in debug.c, but this would have meant to pollute debug's deps with a lot of stuff. Also, looking through uses of talloc_asprint_append(), very many of those don't do NULL checks properly and could benefit from the _addbuf() flavor. We can add a vasprintf variant later if the need shows up. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-06-08talloc: version 2.3.4talloc-2.3.4Stefan Metzmacher1-1/+1
* Fix build problems BUG: https://bugzilla.samba.org/show_bug.cgi?id=15071 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-11-30nsswitch: reduce dependecies to private libraries and link static/builtin if ↵Stefan Metzmacher1-0/+1
possible Over the last month I got more and more reports, that it's not possible to use a custom Samba version on systems with sssd being installed, which depends on some specific samba libraries installed in the system. One major problem is that the custom libnss_winbind.so.2 depends on the libreplace-samba4.so of the custom build and also injects an RPATH into the running process. When sssd uses any nss library call it will get this, when it then tries to load some of its plugins via dlopen(), e.g. ldd /usr/lib64/sssd/libsss_ad.so| grep samba libsamba-util.so.0 => /lib64/libsamba-util.so.0 libreplace-samba4.so => /usr/lib64/samba/libreplace-samba4.so libsamba-security-samba4.so => /usr/lib64/samba/libsamba-security-samba4.so libsamba-errors.so.1 => /lib64/libsamba-errors.so.1 libsamba-debug-samba4.so => /usr/lib64/samba/libsamba-debug-samba4.so libgenrand-samba4.so => /usr/lib64/samba/libgenrand-samba4.so libsocket-blocking-samba4.so => /usr/lib64/samba/libsocket-blocking-samba4.so libtime-basic-samba4.so => /usr/lib64/samba/libtime-basic-samba4.so libsys-rw-samba4.so => /usr/lib64/samba/libsys-rw-samba4.so libiov-buf-samba4.so => /usr/lib64/samba/libiov-buf-samba4.so When that loads dlopen() will fail as a soname libreplace-samba4.so is already loaded, but the symbol version within the other one don't match, as the contain the exact version, e.g. replace_dummy@@SAMBA_4.13.3. This is just an example and similar things can happen in all situations where we provide libraries, which are potentially injected into every process of the running system. These should only depend on libc.so and related basic system libraries in order to avoid the problem. We have the following libraries, which are in the that category: - libnss_winbind.so.2 - libnss_wins.so.2 - pam_winbind.so - winbind_krb5_locator.so - async_dns_krb5_locator.so The rules of library loading are really complex and symbol versioning is not enough to solve it, only the combination of unique soname and unique symbol version suffix seem to solve the problem, but injecting an RPATH is still a problem. In order to solve the problem I experimented with adding SAMBA_SUBSYSTEM() definitions with 'hide_symbols=True' in order to do some static linking of selected components, e.g. bld.SAMBA_SUBSYSTEM('replace-hidden', source=REPLACE_SOURCE, group='base_libraries', hide_symbols=True, deps='dl attr' + extra_libs) It's relatively simple to get to the point where the following are completely static: - libnss_winbind.so.2 - libnss_wins.so.2 - pam_winbind.so - winbind_krb5_locator.so But 'async_dns_krb5_locator.so' links in almost everything! It seems we install the krb5 plugins into our own $MODULESDIR/krb5/, so it may not be so critical, as long it's the admin who created the desired symlinks into the location the kerberos libraries search for plugins. Note the at least the locator plugins are always loaded without any configuration, every .so in a special path are loaded with dlopen(). This is done by every application using kerberos, so we load a lot of samba libraries into them. Packagers should not put async_dns_krb5_locator.so (nor a symlink) into the path that's reachable by libkrb5.so. As a longterm solution we may want to change async_dns_krb5_locator.so to use a helper process with posix_spawn() instead of doing everything within the process. Note I added hiden_symbols=True to the nss modules for Linux and FreeBSD only, because these are the only platforms I'm able to test on. We most likely should do the same on other platforms, but some with access to the platform should provide a tested patch. In order to avoid manual definitions of SAMBA_SUBSYSTEMS() with '-hidden', I added the 'provide_builtin_linking=True' option, as the logic is very similar to what we already have with the '--builtin-libraries=BUILTIN_LIBRARIES' configure option. SAMBA_PLUGIN() is used in order to use SAMBA_LIBRARY() in order to make it more strict that these plugins can't be used as normal depedency by other subsystems and libraries. While being there it was easy enough to make libwbclient.so also standalone without dependecies to other samba libraries. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-07-14talloc: version 2.3.3talloc-2.3.3Stefan Metzmacher1-1/+1
- python: Ensure reference counts are properly incremented - Bug 9931: change pytalloc source to LGPL Signed-off-by: Stefan Metzmacher <metze@samba.org>
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>