summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2015-03-09talloc: version 2.1.2talloc-2.1.2Stefan Metzmacher3-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>
2015-03-09talloc: fix _talloc_total_limit_size prototypeStefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-03-08lib: talloc: Test suite for the new destructor reparent logic.Jeremy Allison1-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
2015-03-08lib: talloc: Allow destructors to reparent the object they're called on.Jeremy Allison1-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>
2015-03-08lib: talloc: Fix bug when calling a destructor.Jeremy Allison1-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>
2015-03-06Build python-ntdb bindings if ntdb was found but python-ntdb was not.Jelmer Vernooij1-7/+7
Change-Id: I54c248effa63fe65e2bef0d41535d8eec0ef28c0 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Remove 'external' python module support code - use the third_party directory ↵Jelmer Vernooij1-24/+0
instead. Change-Id: I2f5053bc5a42d3dfe71f5bd027eb6ead7d1b9752 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Remove bundled but unused mimeparse.Jelmer Vernooij6-291/+0
Change-Id: I245607c0d27dbeae638f2f50c3b4d560eb9b70f8 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Remove unused bundled python-extras module.Jelmer Vernooij14-554/+0
Change-Id: I6df0561ff4059c827d545d60a0865e17e9fefcf0 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Remove bundled testtools.Jelmer Vernooij81-19182/+0
Change-Id: Ic6ddb352e403c9591cbe4ad3fd36758ffcc2ddb9 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Remove bundled subunit.Jelmer Vernooij67-9783/+0
Change-Id: I18e19c3817de6f97fe2a9fb1b7faa4f8a0d27649 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06Bundle pyiso8601 for iso8601 time/date manipulation.Jelmer Vernooij1-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>
2015-03-06Inline outputting of subunit in libtorture.Jelmer Vernooij4-25/+24
Change-Id: I2c7045c530183a6961cb253540579312c2767330 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-04tevent: version 0.9.24tevent-0.9.24David Disseldorp2-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
2015-03-04pyldb: Add tests for type errorsPetr Viktorin1-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
2015-03-03pyldb: Report errors converting controls list to char**Petr Viktorin1-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>
2015-03-03pyldb: Better error reportingPetr Viktorin1-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>
2015-03-03pyldb: Type-check arguments parsed with PyArg_ParseTuple*Petr Viktorin1-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>
2015-03-03pyldb: Fix reference leaksPetr Viktorin1-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>
2015-03-03pyldb: Remove use of staticforward macroPetr Viktorin1-1/+1
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-03pyldb: Properly preallocate result control listPetr Viktorin1-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>
2015-03-03pyldb: Use the Py_TYPE macroPetr Viktorin1-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>
2015-03-03pyldb: Correct reference counting when returning boolsPetr Viktorin1-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>
2015-03-03lib: Fix CID 1273073 Assign instead of compareVolker Lendecke1-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>
2015-03-03tevent: Ignore unexpected signal events in the same way the epoll backend does.Jeremy Allison1-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
2015-03-03Fix the O3 developer buildVolker Lendecke1-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
2015-02-27MSDFS referral shufflingRobin McCorkell1-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>
2015-02-27lib/util: Build iov_buf library only when building sambaAmitay Isaacs1-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
2015-02-27tevent: version 0.9.23tevent-0.9.23Michael Adam2-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
2015-02-26param: Remove lib/param/generic.cVolker Lendecke3-298/+1
This seems completely unused. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-26lib: Simplify pidfile.cVolker Lendecke1-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
2015-02-26Fix whitespaceVolker Lendecke1-11/+11
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-26ntdb: always return int from tdb_store_flag_to_ntdb()David Disseldorp1-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
2015-02-25lib/crypto: Document nettle supported cryptoMichael Ledford1-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>
2015-02-24tsocket: Use iov_advanceVolker Lendecke2-51/+18
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-24iov_buf: Add an explaining commentVolker Lendecke1-0/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-24tsocket: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-24lib: Move "iov_buf.[ch]" to lib/utilVolker Lendecke4-1/+126
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-23swrap: Bump version to 1.1.3Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-23swrap: If we remove the socket_info also unlink the unix socketAndreas Schneider1-0/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-02-23swrap: Do not leak the socket_info we just removed.Andreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-23src: Add support for running with address sanitizer.Andreas Schneider1-0/+8
If address sanitzer will complain about our hack with variable function attributes. This disables the checking of it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2015-02-23swrap: Fix the loop for older gcc versions.Andreas Schneider1-2/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-17lib: texpect. Fix the build on Solaris.Tom Schulz2-1/+6
Bug 11092 - texpect requires routines err and errx https://bugzilla.samba.org/show_bug.cgi?id=11092 Signed-off-by: Tom Schulz <schulz@adi.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Feb 17 18:09:52 CET 2015 on sn-devel-104
2015-02-17Force rebuild of ldb if pyldb-util is not available.Jelmer Vernooij1-4/+4
This is necessary since pyldb-util uses ldb_private.h, so we want to build against the same source ldb. Change-Id: I802974b9eef7deb102fea15b67ec5f87e8e353bd Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-17wscript: Expand tabs.Jelmer Vernooij1-1/+1
Change-Id: I2746f775accceeb2eeb02679f2c91b02085560b6 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-17lib/crypto: Document what crypto code is used for, and if GnuTLS supports itAndrew Bartlett1-0/+97
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Feb 17 11:45:15 CET 2015 on sn-devel-104
2015-02-16debug: Set close-on-exec for the main log file FDAndrew Bartlett2-1/+4
This does not change the properties of dup2() of the fd as STDERR, however this is closed before we start smbd or winbindd as child processes. This is needed otherwise the logfile remains open in the child process, and logfile rotation can mean this old log remains on disk indefinatly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11100 Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Feb 16 11:42:47 CET 2015 on sn-devel-104
2015-02-15Add Solaris ports as a tevent backend.Jeremy Allison6-1/+798
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): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104
2015-02-13lib: Add talloc_report_str()Volker Lendecke3-0/+208
This creates a talloc report into a string and will replace the code used in source3/lib/tallocmsg.c Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>