summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* [TMP] Port ldb to Python 3py3compat-34ad28dPetr Viktorin2015-03-115-290/+366
|
* [TMP] Port tdb to Python 3Petr Viktorin2015-03-113-97/+120
|
* pytalloc: Build for Python 3/extrapythonPetr Viktorin2015-03-113-16/+44
| | | | | | | This enables building, installing & testing two versions for pytalloc, for two versions of Python, at the same time. Signed-off-by: Petr Viktorin <pviktori@redhat.com>
* pytalloc: Port to Python 3Petr Viktorin2015-03-114-29/+57
| | | | | | | | | | | | | | | | | | | | | | - 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 Signed-off-by: Petr Viktorin <pviktori@redhat.com>
* pytalloc: Add a Python 3 compatibility headerPetr Viktorin2015-03-111-0/+126
| | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com>
* talloc build: Use SAMBA_CHECK_PYTHON for finding PythonPetr Viktorin2015-03-111-3/+1
| | | | | | Previously the code repeated most of SAMBA_CHECK_PYTHON explicitly. Signed-off-by: Petr Viktorin <pviktori@redhat.com>
* buildtools: Use 'pyfeature' instead of pyembed and pyext argumentsPetr Viktorin2015-03-112-2/+2
| | | | | | | This will allow defining other Python-related features, which will be passed through the stack the same way as the existing two. Signed-off-by: Petr Viktorin <pviktori@redhat.com>
* pytalloc: Add testsPetr Viktorin2015-03-113-1/+247
| | | | | | | | | 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>
* pytalloc: Fix comparison of disparate typesPetr Viktorin2015-03-111-1/+1
| | | | | | | | When fed Python objects of different types, pytalloc_default_cmp compared pointers to PyType objects that weren't part of an array, resulting in undefined behavior. This makes things a bit better (though it still casts ptrdiff_t to int).
* ,disable-slow-testPetr Viktorin2015-03-111-2/+2
|
* tdb: Fix CID 1034842 Resource leakHEADmasterVolker Lendecke2015-03-111-0/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Mar 11 00:23:20 CET 2015 on sn-devel-104
* tdb: Fix CID 1034841 Resource leakVolker Lendecke2015-03-101-3/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib: Fix CID 1034840 Resource leakVolker Lendecke2015-03-101-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib: Fix CID 1034839 Resource leakVolker Lendecke2015-03-101-0/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib: Fix CID 1034838 Resource leakVolker Lendecke2015-03-101-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* libreplace: Fix CID 1034926 Destination buffer too smallVolker Lendecke2015-03-101-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* talloc: version 2.1.2Stefan Metzmacher2015-03-093-1/+71
| | | | | | | | | | 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>
* talloc: fix _talloc_total_limit_size prototypeStefan Metzmacher2015-03-091-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib: talloc: Test suite for the new destructor reparent logic.Jeremy Allison2015-03-081-0/+82
| | | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Mar 8 20:52:43 CET 2015 on sn-devel-104
* lib: talloc: Allow destructors to reparent the object they're called on.Jeremy Allison2015-03-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | If a destructor returns failure (-1) when freeing a child, talloc must then reparent the child. Firstly it tries the owner of any reference, next the parent of the current object calling _talloc_free_children_internal(), and finally the null context in the last resort. If a destructor reparented its own object, which can be a very desirable thing to do (a destructor can make a decision it isn't time to die yet, and as the parent may be going away it might want to move itself to longer-term storage) then this new parent gets overwritten by the existing reparenting logic. This patch checks when freeing a child if it already reparented itself, and if it did doesn't then overwrite the new parent. Makes destructors more flexible. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib: talloc: Fix bug when calling a destructor.Jeremy Allison2015-03-081-1/+7
| | | | | | | | | | | If the destructor itself calls talloc_set_destructor() and returns -1, the new destructor set is overwritten by talloc. Dectect that and leave the new destructor in place. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* Build python-ntdb bindings if ntdb was found but python-ntdb was not.Jelmer Vernooij2015-03-061-7/+7
| | | | | | Change-Id: I54c248effa63fe65e2bef0d41535d8eec0ef28c0 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove 'external' python module support code - use the third_party directory ↵Jelmer Vernooij2015-03-061-24/+0
| | | | | | | | instead. Change-Id: I2f5053bc5a42d3dfe71f5bd027eb6ead7d1b9752 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove bundled but unused mimeparse.Jelmer Vernooij2015-03-066-291/+0
| | | | | | Change-Id: I245607c0d27dbeae638f2f50c3b4d560eb9b70f8 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove unused bundled python-extras module.Jelmer Vernooij2015-03-0614-554/+0
| | | | | | Change-Id: I6df0561ff4059c827d545d60a0865e17e9fefcf0 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove bundled testtools.Jelmer Vernooij2015-03-0681-19182/+0
| | | | | | Change-Id: Ic6ddb352e403c9591cbe4ad3fd36758ffcc2ddb9 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Remove bundled subunit.Jelmer Vernooij2015-03-0667-9783/+0
| | | | | | Change-Id: I18e19c3817de6f97fe2a9fb1b7faa4f8a0d27649 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Bundle pyiso8601 for iso8601 time/date manipulation.Jelmer Vernooij2015-03-061-0/+5
| | | | | | | | | (corrected lib/update-external.sh by Andrew Bartlett) Change-Id: I0f992b949b1717635ff26fa0db6073675cce4ad7 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* Inline outputting of subunit in libtorture.Jelmer Vernooij2015-03-064-25/+24
| | | | | | Change-Id: I2c7045c530183a6961cb253540579312c2767330 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tevent: version 0.9.24David Disseldorp2015-03-042-1/+89
| | | | | | | | | | * Ignore unsolicited signal wakeup in tevent_port event loop. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Mar 4 08:33:06 CET 2015 on sn-devel-104
* pyldb: Add tests for type errorsPetr Viktorin2015-03-041-0/+42
| | | | | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Mar 4 01:49:02 CET 2015 on sn-devel-104
* pyldb: Report errors converting controls list to char**Petr Viktorin2015-03-031-0/+20
| | | | | | | | | With this change, passing an unexpected type to the CRUD methods will result in an informative TypeError. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Better error reportingPetr Viktorin2015-03-031-2/+2
| | | | | | | | Provide more useful error messages for some type errors Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Type-check arguments parsed with PyArg_ParseTuple*Petr Viktorin2015-03-031-8/+8
| | | | | | | | | PyObject* arguments need to be type-checked before they're cast to subtypes. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Fix reference leaksPetr Viktorin2015-03-031-6/+12
| | | | | | | | | | | | | The parse_ldif and MessageElement.__iter__ functions leaked references to intermediate lists whose iterators they return. The MessageElement repr used the undocumented macro PyObject_REPR, which leaks references. (It was used internally in CPython before fatal errors, and will be removed in Python 3.5.) Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Remove use of staticforward macroPetr Viktorin2015-03-031-1/+1
| | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Properly preallocate result control listPetr Viktorin2015-03-031-1/+5
| | | | | | | | | | | The list was always allocated with size 1, so if there is more than 1 result control, the additional items would not be added in the list, and would become leaked references. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Use the Py_TYPE macroPetr Viktorin2015-03-031-3/+3
| | | | | | | | | | The "ob_type" member of Python objects is going away in Python 3 for compliance with C's strict aliasing rules. The Py_TYPE macro should be used instead. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Correct reference counting when returning boolsPetr Viktorin2015-03-031-4/+4
| | | | | | | | | Simply returning Py_True/PyFalse doesn't increment the bool object's reference count. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Fix CID 1273073 Assign instead of compareVolker Lendecke2015-03-031-1/+1
| | | | | | | This is a brown paper bag thingy, right? Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: Ignore unexpected signal events in the same way the epoll backend does.Jeremy Allison2015-03-031-3/+9
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11118 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Mar 3 17:33:06 CET 2015 on sn-devel-104
* Fix the O3 developer buildVolker Lendecke2015-03-031-1/+1
| | | | | | | | | | Different gcc versions complain at different places Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 3 13:14:53 CET 2015 on sn-devel-104
* MSDFS referral shufflingRobin McCorkell2015-02-271-0/+9
| | | | | | | | | | Shuffle MSDFS referral list in smbd in accordance with [MS-DFSC] 3.2.1.1 When parsing an MSDFS symlink, the names are shuffled with a Fisher-Yates algorithm. Signed-off-by: Robin McCorkell <rmccorkell@karoshi.org.uk> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Build iov_buf library only when building sambaAmitay Isaacs2015-02-271-5/+8
| | | | | | | | | | | | | lib/util can be built with SAMBA_UTIL_CORE_ONLY for building standalone ctdb. Any new libraries if not required by ctdb should be built only when SAMBA_UTIL_CORE_ONLY is not specified. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Fri Feb 27 09:06:01 CET 2015 on sn-devel-104
* tevent: version 0.9.23Michael Adam2015-02-272-1/+89
| | | | | | | | | | | | * Add Solaris ports as tevent backend. * Improvements to the tevent_data tutorial. * Remove use of the 'staticforward' macro. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Feb 27 03:48:57 CET 2015 on sn-devel-104
* param: Remove lib/param/generic.cVolker Lendecke2015-02-263-298/+1
| | | | | | | This seems completely unused. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Simplify pidfile.cVolker Lendecke2015-02-261-13/+6
| | | | | | | | 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): Thu Feb 26 18:28:31 CET 2015 on sn-devel-104
* Fix whitespaceVolker Lendecke2015-02-261-11/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ntdb: always return int from tdb_store_flag_to_ntdb()David Disseldorp2015-02-261-0/+1
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Feb 26 13:49:05 CET 2015 on sn-devel-104
* lib/crypto: Document nettle supported cryptoMichael Ledford2015-02-251-0/+21
| | | | | | Signed-off-by: Michael Ledford <michael@ledford.cc> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>