summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* pytalloc: Correct description of pytalloc_Get{Base,}ObjectType behaviourAndrew Bartlett2016-03-151-6/+8
| | | | | | | | | | | | Thanks to Jelmer for spotting the static variable that causes this odd behaviour Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Mar 8 05:14:15 CET 2016 on sn-devel-144 (cherry picked from commit 20417945fed17a8f6ca2b0fc66c20890dc1f48b8)
* pytalloc: Add pytalloc_BaseObject_PyType_Ready() wrapperAndrew Bartlett2016-03-155-0/+23
| | | | | | | | | This avoids the need for the caller to set tp_base and tp_basicsize and so removes those as possible errors. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (cherry picked from commit d850991ee2284050916761ea2f0ccac45df4eb4f)
* talloc: Bump version numberAndrew Bartlett2016-03-154-1/+89
| | | | | | | | | | | | | | 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> (cherry picked from commit d7bbcbc510c6ecfcd9db47c15203bbdd13d1c06e)
* pytalloc: Add new BaseObjectAndrew Bartlett2016-03-157-31/+433
| | | | | | | | | | This new object not only avoids the ABI issues of talloc.Object it stores one more pointer, being the start of the array, and so can be used to fix the PIDL bindings/talloc refcount issue. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (cherry picked from commit 80f2b36efb6380defb646f7612f23c431acf8e1a)
* pytalloc: add a _pytalloc_get_type() helper function and generate ↵Stefan Metzmacher2016-03-152-4/+17
| | | | | | | | | PyExc_TypeError on mismatch Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (cherry picked from commit 528dce1b5326e00446f5fe233b8af52bcb1990a9)
* talloc: add _pytalloc_get_ptr/_pytalloc_get_mem_ctx helper functionsAndrew Bartlett2016-03-154-5/+17
| | | | | | | | | | | | 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> (cherry picked from commit 42eae4dec6209aa5cae0d48f17f33c1ab67b6f03)
* talloc: Improve testsuite by avoiding path issuesAndrew Bartlett2016-03-152-5/+8
| | | | | | | | 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> (cherry picked from commit cd8d9300213dcdeb5bdfbbb7a71ae4b82e042470)
* pyldb: Add warning about pyldb_MessageElement_AsMessageElement()Andrew Bartlett2016-03-151-0/+7
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (cherry picked from commit 02de793e013c1905cccc0c760bb64f45d37e3051)
* dbwrap: add dbwrap_purge[_bystring]Michael Adam2016-03-142-0/+19
| | | | | | | | | | | Variants of dbrwap_delete[_bysrting] that treats NOT FOUND as success. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 366b51a8ff30132185ff126e2cdd51801b07e6f4) BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
* dbwrap_util: improve a debug message in dbwrap_delete_action()Michael Adam2016-03-141-1/+2
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit d4408c495be851c684e7b4b5ff56e5eb82f16c06) BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
* ldb: version 1.1.26Stefan Metzmacher2016-03-144-1/+270
| | | | | | | | | | | | | | | | * let a timeout of -1 indicate no timeout for a given request * fix memory leaks in pyldb ldb.search() * build fixes * improve pyldb ldb.search() help message * add pyldb ldb.search_iterator() api * add LDB_ATTR_FLAG_FORCE_BASE64_LDIF as optional argument to ldb_schema_attribute_add() * add client support for LDB_CONTROL_DIRSYNC_EX Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit fb705e19e8a8e727908c8913604c4cbffdb30c96)
* ldb: add support for LDB_CONTROL_DIRSYNC_EXStefan Metzmacher2016-03-143-0/+100
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit ad2b5fae7f9b1437e6fcf73a0be3ca5d3ba0d5dc)
* ldb: add LDB_ATTR_FLAG_FORCE_BASE64_LDIF supportStefan Metzmacher2016-03-143-3/+21
| | | | | | | | | | This can be used to force ldb_write_ldif() to use base64 for a specific attribute. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit f721f27da5f9ebb41639b70986ad1acb83206ed6)
* pyldb: eliminate warnings from python api testMichael Adam2016-03-141-4/+4
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 6c8ab59d068101caa40f9b15ed70a115b5612f47)
* pyldb: add api tests for search_iterator()Stefan Metzmacher2016-03-141-0/+100
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 13e981d3d822876f6f6e741606dc5a772ab2cca5)
* pyldb: add ldb.search_iterator()Stefan Metzmacher2016-03-141-0/+372
| | | | | | | | | | | | | | | | | | | | | | This is able to handle async requests, e.g. with a notification control and processes results as they arrive instead of waiting for all results before returning. search_handle = ldb.search_iterator(...) for e in search_handle: if not isinstance(msg, ldb.Message): # referral continue name = e["name"][0] result = search_handle.result() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 77ca07801c81558d95b95e9120511cb2e00f3d03)
* pyldb: fix help message for ldb.search()Stefan Metzmacher2016-03-141-2/+2
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit e96fa7b10c5c6ee2cdd57c2aa553593c9372f87b)
* pyldb: fix memory leak in py_ldb_search()Stefan Metzmacher2016-03-141-1/+1
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 2c2a2540f4076debdf2993781958b546c269aa49)
* pyldb: Free correct context when pyldb_Object_AsDn() failsAndrew Bartlett2016-03-141-1/+1
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit e7bdd30be54f3652cf060f4252f9eed3ea82078f)
* ldb: allow a timeout of -1 result in no timeout timer at all.Stefan Metzmacher2016-03-143-16/+27
| | | | | | | | | | This is required in order to have long running async searches, e.g. with LDB_CONTROL_NOTIFICATION_OID. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 2b1cd4a1147a8d5ba10ddcef4c2d258df2bd5dd4)
* ldb-samba: fix the timeout setup in ildb_request_send()Stefan Metzmacher2016-03-141-5/+7
| | | | | | | | | | | We need to use the startime as reference not the current time. We also allow timeout == -1 to indicate no timeout at all. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 5db9f865bca818da8d2334208f3141f7f5c7286d)
* ldb:ABI: add missing pyldb-util.py3-1.1.25.sigsStefan Metzmacher2016-03-141-0/+2
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 8adf470af231718d334e282594079a67e4da9f05)
* ldb: Avoid a "talloc_steal"Volker Lendecke2016-03-141-4/+3
| | | | | | | | | There's only one caller of "next_chunk" that does a talloc_steal right after the call. Pass in a talloc context. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> (cherry picked from commit d56e42de64af84ad839749beaa22450f71bec58a)
* ldb: Fix some whitespaceVolker Lendecke2016-03-141-29/+29
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> (cherry picked from commit 11c5513bb121fd43f566eacfe7b2af64f3cb3a83)
* tevent: version 0.9.28Stefan Metzmacher2016-03-042-1/+91
| | | | | | | | | | | | * Fix memory leak when old signal action restored (bug #11742) 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): Fri Feb 19 19:12:25 CET 2016 on sn-devel-144 (cherry picked from commit da74d0c317be9ce67eb5d00d232167d466f68a1e)
* lib: tevent: Fix memory leak reported by Pavel Březina ↵Jeremy Allison2016-03-041-0/+4
| | | | | | | | | | | | | | <pbrezina@redhat.com> when old signal action restored. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11742 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 18 01:42:50 CET 2016 on sn-devel-144 (cherry picked from commit 833a2f474367624dd9980abb28227850e95fe976)
* tevent: version 0.9.27Stefan Metzmacher2016-03-042-1/+91
| | | | | | | | | | | | | | | * Fix bug in poll backend - poll_event_loop_poll() exits the for loop on POLLNVAL instead of continuing to find an event that is ready. * Fix ETIME handling for Solaris event ports (bug #11728). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Feb 16 00:00:51 CET 2016 on sn-devel-144 (cherry picked from commit 2267faddfa9863b205dfad580fbd45182916cb32)
* Fix ETIME handling for Solaris event ports.Nathan Huff2016-03-041-4/+18
| | | | | | | | | | | | | | | | | | It is possible for port_getn to return -1 with errno set to ETIME and still return events. If those events aren't processed the association is lost by samba since the kernel dissacociated them and samba never processed them so never reassociated them with the event port. The patch checks the nget return value in the case of ETIME and if it is non 0 it doesn't return and goes through the event processing loop. Signed-off-by: Nathan Huff <nhuff@acm.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sun Feb 7 11:26:35 CET 2016 on sn-devel-144 (cherry picked from commit 4953b1f73f8ec9387516be1058434d71937e1447)
* ldb: remove outdated comment about type argument in dlistMichael Adam2016-03-041-4/+0
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit d44f488317b431317963b42993cc56e2289a4d0d)
* tevent: remove outdated comment about type argument in dlistMichael Adam2016-03-041-4/+0
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 310da05710ed498b1657978286ca409ad8487161)
* dlist: remove outdated comment about type argumentMichael Adam2016-03-041-4/+0
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 025c59db066dc6d45beade963254b6be52e85f32)
* dlist: remove unneeded type argument from DLIST_CONCATENATE()Michael Adam2016-03-042-3/+2
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 2fd63ec80abd12a25ba652ff338c237c33668e33)
* tevent: remove unneeded type argument from DLIST_CONCATENATE()Michael Adam2016-03-041-2/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 0f6c00b6aef6ca824696a77d427248d0fa1aad04)
* ldb: remove unneeded argument type from DLIST_CONCATENATE()Michael Adam2016-03-041-2/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 1441824fe6a797e53fb182b00017a0f927ec42bf)
* tevent: remove uneeded type argument from DLIST_DEMOTE()Michael Adam2016-03-043-4/+3
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit be2a341d43158999667de90f7c84b6c21d6c5dc6)
* ldb: remove uneeded type argument from DLIST_DEMOTE()Michael Adam2016-03-041-2/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit a1c5d662d4846a66f70d9a48b86fdda95264b30e)
* dlist: remove unneeded argument from DLIST_DEMOTE()Michael Adam2016-03-042-3/+2
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit d6f5fc8c2d3db3daa2209850ef0487e822c7bb92)
* ldb: remove unneeded type arg from DLIST_ADD_ENDMichael Adam2016-03-043-7/+6
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 66af807fc45114d422d73c751a94e72117555113)
* tevent: remove unneeded type argument from DLIST_ADD_ENDMichael Adam2016-03-043-5/+4
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit a091c0ac6891a1ec3e15af7808a9c19533bcfb7c)
* dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam2016-03-043-12/+11
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 476672b647e44898a6de8894b23e598ad13b1fcf)
* lib/tsocket: workaround sockets not supporting FIONREADRalph Boehme2016-02-161-1/+61
| | | | | | | | | | | | | | | | | | | | Netlink sockets don't support querying pending bytes with ioctl(fd, FIONREAD, ...) and would return EOPNOTSUPP, so use recvmsg() with MSG_PEEK|MSG_TRUNC as a fallback. The MSG_TRUNC flag to recvmsg() is Linux only, but netlink is as well, so we're safe for now. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11714 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Feb 10 10:30:24 CET 2016 on sn-devel-144 (cherry picked from commit 574313a1e11d521ba3f7232ff0b4186b49658199)
* param: Fix str_list_v3 to accept ; againVolker Lendecke2016-02-161-1/+17
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 11 19:19:55 CET 2016 on sn-devel-144 https://bugzilla.samba.org/show_bug.cgi?id=11732
* lib:socket: fix CID 1350009 - illegal memory accesses (BUFFER_SIZE_WARNING)Michael Adam2016-02-161-0/+5
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11735 Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> (cherry picked from commit 8b36428b195f6e1d1063f1abccb718f2665d271f)
* lib/socket: Fix improper use of default interface speedAnoop C S2016-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | _get_interfaces() function from interfaces.c uses if_speed variable to store interface speed and is initialized with a default value at start. But if_speed populated via one iteration for a specific IP address will be treated as the default value for next iteration which is wrong. Therefore change is to move the initialization cum declaration of if_speed inside iteration of IP addresses loop. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11734 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat Feb 13 16:22:22 CET 2016 on sn-devel-144 (cherry picked from commit 9fb98e3e056f059e2a5fcdd54a6a0d60ecdb01b7)
* lib:socket: fix CID 1350010 - integer OVERFLOW_BEFORE_WIDENMichael Adam2016-02-161-1/+1
| | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11723 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 4 00:35:11 CET 2016 on sn-devel-144 (cherry picked from commit 498383afefccb8c7acd93da2c374b5bed1de6e4a)
* loadparm: introduce lp_parm_ulonglong() and lpcfg_parm_ulonglong()Uri Simchoni2016-01-262-0/+37
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib:socket: detect link speed with ethtool ioctl in get_interfaces (on linux)Anoop C S2016-01-261-0/+49
| | | | | | | | Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Anoop C S <anoopcs@redhat.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* build: detect support for ethtoolMichael Adam2016-01-261-0/+7
| | | | | | | | Pair-Programmed-With: Anoop C S <anoopcs@redhat.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib:socket: set defaults for linkspeed and capability in get_interfaces()Michael Adam2016-01-261-0/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib:socket: get interface index from kernelMichael Adam2016-01-261-0/+6
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>