summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* ldb-samba-tests: Add tests for transitive matching ruleSamuel Cabrero2014-12-221-0/+473
| | | | | | | Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb-samba: Implement transitive extended matchingSamuel Cabrero2014-12-224-1/+373
| | | | | | | | | | | | | | | | | | Documented in [MS-ADTS] section 3.1.1.3.4.4.3 LDAP_MATCHING_RULE_TRANSITIVE_EVAL This allows a search filter such as: member:1.2.840.113556.1.4.1941:=cn=user,cn=users,dc=samba,dc=example,dc=com This searches not only the member attribute, but also any member attributes that point at an object with this member in them. All the various DN syntax types are supported, not just plain DNs. Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me> (abartlet: Fixed compile error: return makes integer from pointer without a cast) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: bump to version 1.1.19Andrew Bartlett2014-12-223-1/+266
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Allow to register extended match rulesSamuel Cabrero2014-12-224-36/+165
| | | | | | | | | | | | This allows to extend LDB by registering extended match rules from outside the library itself. This is necessary when the implementation requires knowledge about syntaxes implemented in samba extensions, like the LDAP_MATCHING_RULE_TRANSITIVE_EVAL match. Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me> Singed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* tdb: version 1.3.4Stefan Metzmacher2014-12-192-1/+69
| | | | | | | | | | | | Transactions are supported with TDB_MUTEX_LOCKING. This fixes https://bugzilla.samba.org/show_bug.cgi?id=11004 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Dec 19 11:41:26 CET 2014 on sn-devel-104
* tdb/toos: allow transactions with TDB_MUTEX_LOCKINGStefan Metzmacher2014-12-191-1/+0
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11004 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* tdb/test: add tdb1-run-mutex-transaction1 testStefan Metzmacher2014-12-192-0/+237
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11004 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* tdb: allow transactions on on tdb's with TDB_MUTEX_LOCKINGStefan Metzmacher2014-12-191-1/+1
| | | | | | | | | | | | | There's no real reason to disallow transactions as the allrecord lock is also available with mutexes enabled. E.g. ctdbd requires transactions also on non-persistent databases opened with TDB_CLEAR_IF_FIRST and TDB_MUTEX_LOCKING. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11004 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* lib/texpect: prefer bsd/libutil.h if availableStefan Metzmacher2014-12-182-2/+4
| | | | | | | Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu Dec 18 16:31:48 CET 2014 on sn-devel-104
* addns: Remove support for dns_host_file.Andreas Schneider2014-12-183-48/+57
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/util: provide a dbgtext_va() function which takes va_listStefan Metzmacher2014-12-172-5/+20
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* dbwrap: Add code to marshall a db_context's dbVolker Lendecke2014-12-162-0/+175
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add server_id_dbVolker Lendecke2014-12-163-0/+360
| | | | | | | | This is a mapping from names to server_ids. In the future, this will replace the namedb in source4/messaging. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add "strv" string handling routinesVolker Lendecke2014-12-163-0/+178
| | | | | | | | | | | | This is a little set of routines designed after the glibc argz routines. It is supposed to eventually replace our inefficient string_list routines. A talloc blob is an array of strings separated by the \0 character. See argz(3) on a Linux system for the ideas where this came from. Based on talloc strv is simpler because talloc knows about the size of the blob, so we don't have to explicitly maintain it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add tdb_fetch_tallocVolker Lendecke2014-12-162-0/+36
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add map_unix_error_from_tdbVolker Lendecke2014-12-162-1/+63
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Fix incorrect month in timestampsMartin Schwenke2014-12-121-1/+1
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11003 Reported-by: Youzhong Yang <Youzhong.Yang@mathworks.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Dec 12 05:02:32 CET 2014 on sn-devel-104
* lib: Fix blank line endingsVolker Lendecke2014-12-093-55/+55
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix a typoVolker Lendecke2014-12-091-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* socket_wrapper: Add missing prototype check for eventfd.Andreas Schneider2014-12-081-0/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10965 Newer glibc versions use and unsinged integer for the count instead of an integer. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Simplify load_case_tables_library()Volker Lendecke2014-12-081-8/+9
| | | | | | | We don't really need a talloc context here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix signed/unsigned comparisonsVolker Lendecke2014-12-072-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rwrap: Bump version to 1.1.0.Andreas Schneider2014-12-061-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Dec 6 01:54:12 CET 2014 on sn-devel-104
* rwrap: Don't dereference NULL when skipping broken records.Jakub Hrozek2014-12-051-6/+6
| | | | | | | | | | | CID: 83426 CID: 83425 Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Support asking for A via CNAMEJakub Hrozek2014-12-051-0/+7
| | | | | | | | | | | Adds support for querying for an A record using a name that only expands into a CNAME. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Recursively add additional dataJakub Hrozek2014-12-051-20/+119
| | | | | | | | | | | Change how we construct the fake answer such that the header and question are added first, then the answers and finally additional data. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Make the rwrap_fake_* functions only fake RRs.Jakub Hrozek2014-12-051-81/+62
| | | | | | | | | | | | | | | The rwrap_fake_common() function did too much. Remove it and use separate functions to add fake header and question sections. The rwrap_fake_$RR functions will receive packet including the header and question and only add its RR data. This will allow recursive processing later. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: CNAME record can recurse into A, AAAA or CNAMEJakub Hrozek2014-12-051-0/+21
| | | | | | | | Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: SRV record can recurse into A or AAAA.Jakub Hrozek2014-12-051-8/+47
| | | | | | | | | | | | When querying for a SRV record, we'll need to include A or AAAA records in additional section. Therefore, keep querying the host file until we can either recurse the A/AAAA records or reach the recursion limit Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Use the rwrap_fake_rr structure instead of raw uint8_t pointers.Jakub Hrozek2014-12-051-136/+143
| | | | | | | | | | | Currently only one instance of the rwrap_fake_rr structure is used. Recursion will be implemented in a future patch. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Add data structures and functions to represent and manipulate RRs.Jakub Hrozek2014-12-051-7/+173
| | | | | | | | | | | | | Adds a structure that, using unions represents all supported RRs. Add a bunch of utility functions that can be used to create these structures. Currently the functions are unused. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Correctly calculate the response size and return it.Andreas Schneider2014-12-051-67/+71
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Handle trailing dot in dns names.Andreas Schneider2014-12-051-8/+20
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rwrap: Compare dns names case insensitive.Jakub Hrozek2014-12-051-1/+1
| | | | | | | | Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Add resolv_wrapper version 1.0.0.Andreas Schneider2014-12-052-0/+1471
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Fix signed/unsigned comparisonsVolker Lendecke2014-12-052-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: Add "smb2 leases" parameter. Default "false".Jeremy Allison2014-12-041-0/+9
| | | | | | | This is currently marked as experimental! Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tdb: version 1.3.3Stefan Metzmacher2014-12-022-1/+69
| | | | | | | | | | | | This fixes the tdb1-run-mutex-openflags2 test when robust mutexes are available. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Dec 2 11:54:28 CET 2014 on sn-devel-104
* tdb/test: TDB_CLEAR_IF_FIRST | TDB_MUTEX_LOCKING, O_RDONLY is a valid ↵Stefan Metzmacher2014-12-021-2/+3
| | | | | | | | | | | | | | | combination This used to be invalid in the early developement code, but now we're able to open a tdb with mutex area and TDB_NOLOCK without problems. O_RDONLY implies TDB_NOLOCK... This should have been part of commit c8d05e934ea03fffbc34944d2d51a016b89a7eca. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* ldb: version 1.1.18Stefan Metzmacher2014-11-293-1/+265
| | | | | | | | | | | | | | This release contains: - fixes for segfaults in pyldb - documentation fixes - build system improvements Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Nov 29 14:45:56 CET 2014 on sn-devel-104
* tdb: version 1.3.2Stefan Metzmacher2014-11-292-1/+69
| | | | | | | | | | | | | | | The following bugs are fixed with this release: - Bug 10625 - tdb.h missing include of stdbool.h - Bug 10781 - smbstatus: locking.tdb - TDB_MUTEX_LOCKING requires TDB_CLEAR_IF_FIRST - Bug 10968 - tdb mutex runtime test clobbers stdout Bug: https://bugzilla.samba.org/show_bug.cgi?id=10625 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10968 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* ntdb: Fix control reaches end of non-void function.Andreas Schneider2014-11-288-0/+48
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* param: fix testparm to show hidden share defaultsGarming Sam2014-11-281-3/+4
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10864 Change-Id: I16710f70a3cbaeadf7adf139441dd2b017ef81ee Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Fri Nov 28 07:54:54 CET 2014 on sn-devel-104
* lib/param: Allow enum values to also be white-space insentive in comparisonAndrew Bartlett2014-11-271-1/+1
| | | | | | | | | This makes it easier to specify these in the --option= syntax on the command line. Change-Id: I6b2398d79d37407c5d82cd6b540651ede1d09106 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>
* param: Simplify get_parametric_helper()Volker Lendecke2014-11-271-15/+4
| | | | | | | | | | With variable sized arrays we don't need talloc_asprintf here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 27 01:41:09 CET 2014 on sn-devel-104
* tdb: Fix tdb_runtime_check_for_robust_mutexes()Volker Lendecke2014-11-261-4/+4
| | | | | | | | | | When using exit() instead of _exit(), the child will flush buffered stdout (and other stdio) content that it inherited from the parent process. In make test, this led to duplicate output from net registry which then confused the blackbox selftest. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib-pyldb: Block elements should be surrounded by {} in py_msg.setitem()Kamen Mazdrashki2014-11-251-1/+2
| | | | | | | | | Change-Id: I0d09374b27708fcaad3523d985a2db7983dbd81a Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Nov 25 07:24:12 CET 2014 on sn-devel-104
* lib-pyldb: Fix docstring for msg.add() method - it was "S.append()"Kamen Mazdrashki2014-11-251-1/+1
| | | | | | Change-Id: I9492d3c3993fc3d68d7bf24405db6e8cd746eaac Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib-ldb-test: Test copying message element from a message to a new messageKamen Mazdrashki2014-11-251-0/+14
| | | | | | Change-Id: Iefcafb418a170ee410aec900bb36eb8e01e946b1 Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib-pyldb: Avoid crash when copying MessageElements between Python Message ↵Kamen Mazdrashki2014-11-251-4/+22
| | | | | | | | | | | | | | | | | | | | objects This patch allows for following snipets in Python: res = ldb.search(...) m_from = res[0] m_to = Message() m_to.add(m_from["attrName"]) The problem previously is that we are trying to reference a ldb_message_element that may not be a memory context on its own. For instance, when search request from above example returns Messages with more than one attribute, this leads immediately to "Bad talloc magic value" crash, every message element beside the first one is not a memory context Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>