1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

4579 Commits

Author SHA1 Message Date
Andreas Schneider
cee8ba1252 rwrap: Bump version to 1.1.1.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-01-13 16:57:11 +01:00
Andreas Schneider
6e187c0587 rwrap: Fix a possible NULL dereference.
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>
2015-01-13 16:57:10 +01:00
Andreas Schneider
931dbb3202 rwrap: If we do not have ns_name_compress() use dn_comp().
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>
2015-01-13 16:57:10 +01:00
Stefan Metzmacher
4683fc0f1d wafsamba: move -fvisibility=hidden checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
208be32c6a wafsamba: move '-fstack-protector' checks from lib/replace to wafsamba
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>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
0f4ce418ae wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
7a3dc66852 wafsamba: move compiler / cflags related stuff from lib/replace to wafsamba
We should have this just in one central place.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Andreas Schneider
87c176563b lib/util: Avoid collision which alread defined consumer DEBUG macro.
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
2015-01-08 21:41:30 +01:00
Garming Sam
0f9b35d4d4 torture: NULL out after talloc_free
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
2014-12-30 02:49:01 +01:00
Volker Lendecke
475cfb8dee lib: Use iov_advance in writev_handler
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-30 00:25:08 +01:00
Volker Lendecke
8aa67651db lib: Simplify check_log_size
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-28 01:57:08 +01:00
Volker Lendecke
bf1ad5051f lib: Use talloc_zero_array instead of memset
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
2014-12-27 01:27:08 +01:00
Andrew Bartlett
7cfe6e9117 lib/ldb-samba: Add comment dicouraging use of schemaUpgradeInProgress
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
2014-12-22 02:42:42 +01:00
Samuel Cabrero
5f47ca786e ldb-samba-tests: Add tests for transitive matching rule
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>
2014-12-22 00:18:09 +01:00
Samuel Cabrero
2a22ba34cd ldb-samba: Implement transitive extended matching
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>
2014-12-22 00:18:09 +01:00
Andrew Bartlett
02f6ab85a0 ldb: bump to version 1.1.19
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>
2014-12-22 00:18:09 +01:00
Samuel Cabrero
faa4be0535 ldb: Allow to register extended match rules
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>
2014-12-22 00:18:09 +01:00
Stefan Metzmacher
a1a90f74eb tdb: version 1.3.4
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
2014-12-19 11:41:26 +01:00
Stefan Metzmacher
f32747ddd0 tdb/toos: allow transactions with 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>
2014-12-19 09:20:07 +01:00
Stefan Metzmacher
5d5d91fae5 tdb/test: add tdb1-run-mutex-transaction1 test
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>
2014-12-19 09:20:06 +01:00
Stefan Metzmacher
d0839af9d6 tdb: allow transactions on on tdb's with TDB_MUTEX_LOCKING
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>
2014-12-19 09:20:06 +01:00
Stefan Metzmacher
0da7295fbc lib/texpect: prefer bsd/libutil.h if available
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
2014-12-18 16:31:48 +01:00
Andreas Schneider
7f00fcf558 addns: Remove support for dns_host_file.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-18 06:47:40 +01:00
Stefan Metzmacher
5f4c1542de lib/util: provide a dbgtext_va() function which takes va_list
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-12-17 09:26:07 +01:00
Volker Lendecke
bbc5c64191 dbwrap: Add code to marshall a db_context's db
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-16 18:56:03 +01:00
Volker Lendecke
972efb05e0 lib: Add server_id_db
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>
2014-12-16 18:56:03 +01:00
Volker Lendecke
5d7a183b9e lib: Add "strv" string handling routines
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>
2014-12-16 18:56:03 +01:00
Volker Lendecke
b306f16564 lib: Add tdb_fetch_talloc
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-16 18:56:03 +01:00
Volker Lendecke
7be1dfa05c lib: Add map_unix_error_from_tdb
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-16 18:56:03 +01:00
Martin Schwenke
0d0a0f79d3 lib/util: Fix incorrect month in timestamps
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
2014-12-12 05:02:32 +01:00
Volker Lendecke
e2ee1a42cf lib: Fix blank line endings
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-09 04:12:07 +01:00
Volker Lendecke
4debc30117 lib: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-09 04:12:07 +01:00
Andreas Schneider
78e8bafb32 socket_wrapper: Add missing prototype check for eventfd.
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>
2014-12-08 14:32:10 +01:00
Volker Lendecke
e60433efa1 lib: Simplify load_case_tables_library()
We don't really need a talloc context here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-08 00:33:06 +01:00
Volker Lendecke
a2d6511f90 Fix signed/unsigned comparisons
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-07 00:12:07 +01:00
Andreas Schneider
ecd0e6e985 rwrap: Bump version to 1.1.0.
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
2014-12-06 01:54:12 +01:00
Jakub Hrozek
5c0ada1d57 rwrap: Don't dereference NULL when skipping broken records.
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>
2014-12-05 23:32:07 +01:00
Jakub Hrozek
3b3fc1a218 rwrap: Support asking for A via CNAME
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>
2014-12-05 23:32:07 +01:00
Jakub Hrozek
f5c156aac2 rwrap: Recursively add additional data
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>
2014-12-05 23:32:07 +01:00
Jakub Hrozek
aa78268a49 rwrap: Make the rwrap_fake_* functions only fake RRs.
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>
2014-12-05 23:32:06 +01:00
Jakub Hrozek
27828774c3 rwrap: CNAME record can recurse into A, AAAA or 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>
2014-12-05 23:32:06 +01:00
Jakub Hrozek
917c3f0844 rwrap: SRV record can recurse into A or AAAA.
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>
2014-12-05 23:32:06 +01:00
Jakub Hrozek
0d128c5443 rwrap: Use the rwrap_fake_rr structure instead of raw uint8_t pointers.
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>
2014-12-05 23:32:06 +01:00
Jakub Hrozek
154fa401dc rwrap: Add data structures and functions to represent and manipulate RRs.
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>
2014-12-05 23:32:06 +01:00
Andreas Schneider
253753ca5b rwrap: Correctly calculate the response size and return it.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-05 23:32:06 +01:00
Andreas Schneider
849bfe09b8 rwrap: Handle trailing dot in dns names.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-05 23:32:06 +01:00
Jakub Hrozek
dab427e94e rwrap: Compare dns names case insensitive.
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>
2014-12-05 23:32:06 +01:00
Andreas Schneider
8bf949f343 lib: Add resolv_wrapper version 1.0.0.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-05 23:32:06 +01:00
Volker Lendecke
d6e2db6f52 lib: Fix signed/unsigned comparisons
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-05 18:37:10 +01:00
Jeremy Allison
44d2612822 s3:param: Add "smb2 leases" parameter. Default "false".
This is currently marked as experimental!

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:10 +01:00