summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* rwrap: Bump version to 1.1.2.Andreas Schneider2015-01-131-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jan 13 19:19:25 CET 2015 on sn-devel-104
* rwrap: Fix ns_name_compress detection.Andreas Schneider2015-01-131-1/+3
| | | | | | | | On some platforms it is a macro and not a function. So we need to check if the macro exists. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* rwrap: Bump version to 1.1.1.Andreas Schneider2015-01-131-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* rwrap: Fix a possible NULL dereference.Andreas Schneider2015-01-131-1/+1
| | | | | | | | CID: #84271 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Guenther Deschner <gd@samba.org>
* rwrap: If we do not have ns_name_compress() use dn_comp().Andreas Schneider2015-01-132-0/+6
| | | | | | | | | | | This should fix older Linux versions which do not export ns_name_compress(). In newer glibc versions dn_comp() calls ns_name_compress(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11019 Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: move -fvisibility=hidden checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-7/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move '-fstack-protector' checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-4/+0
| | | | | | | | | | | This moves the check to the end of the configure run, which means we no longer use this on configure checks, but only for the real build. This behavior is similar than our developer cflags. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-13/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move compiler / cflags related stuff from lib/replace to wafsambaStefan Metzmacher2015-01-081-21/+0
| | | | | | | We should have this just in one central place. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib/util: Avoid collision which alread defined consumer DEBUG macro.Andreas Schneider2015-01-082-3/+8
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Jan 8 21:41:30 CET 2015 on sn-devel-104
* torture: NULL out after talloc_freeGarming Sam2014-12-301-0/+1
| | | | | | | | | | This appeared as a segmentation fault in rpc.spoolss.printer. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Dec 30 02:49:01 CET 2014 on sn-devel-104
* lib: Use iov_advance in writev_handlerVolker Lendecke2014-12-302-26/+10
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Simplify check_log_sizeVolker Lendecke2014-12-281-5/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use talloc_zero_array instead of memsetVolker Lendecke2014-12-271-3/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Sat Dec 27 01:27:08 CET 2014 on sn-devel-104
* lib/ldb-samba: Add comment dicouraging use of schemaUpgradeInProgressAndrew Bartlett2014-12-221-0/+10
| | | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Mon Dec 22 02:42:42 CET 2014 on sn-devel-104
* 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>