summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "ldb-samba: Implement transitive extended matching"Andrew Bartlett2015-08-174-373/+1
| | | | | | | | | | | | This reverts commit 2a22ba34cd6f28950246b54c6577c922c61f4fdb. selftest/knownfail entries are added to ensure 'make test' continues to pass BUG: https://bugzilla.samba.org/show_bug.cgi?id=10493 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit dc2d5ccd56ff8c59f3686a652ec3082069914bb4)
* tdb: Fix broken build with --disable-pythonMartin Schwenke2015-08-041-5/+6
| | | | | | | | | | | | | | With --disable-python, we should not install any python files. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11424 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): Thu Jul 23 18:50:25 CEST 2015 on sn-devel-104 (cherry picked from commit 509c37da1300b843e089dfcd6657e68fa8c8c746)
* lib: replace: Add strsep function (missing on Solaris).Jeremy Allison2015-08-043-2/+27
| | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11359 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@wakeful.net> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 29 02:24:55 CEST 2015 on sn-devel-104 (cherry picked from commit f07b746ad3f3ee2fcbb65a0d452ed80f07c9e8f9)
* build: fix build with gpfs support - add missing dependency to samba-debugBjörn Baumbach2015-08-041-0/+3
| | | | | | | | | | | | | | | Fix for bug #11421 part 2. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11421 Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Jul 29 13:38:59 CEST 2015 on sn-devel-104 (cherry picked from commit d57e4ac3de5f53346a8d7c3f96825c1345b58f6a)
* configure: add --with-gpfs option for selecting directory with gpfs headersBjörn Baumbach2015-08-042-1/+5
| | | | | | | | | | Fix for bug #11421 part 1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11421 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> (cherry picked from commit b9bef361d95daf0f38363acbdec9c23f094ffaca)
* ldb: version 1.1.21ldb-1.1.21Stefan Metzmacher2015-07-213-1/+266
| | | | | | | | * build fixes * improved python bindings Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* tdb: version 1.3.7tdb-1.3.7Stefan Metzmacher2015-07-212-1/+70
| | | | | | | | | * first fix deadlock in the interaction between fcntl and mutex locking (bug #11381) * improved python3 bindings Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* talloc: version 2.1.3talloc-2.1.3Stefan Metzmacher2015-07-213-1/+71
| | | | | | | | * improved python3 bindings * documentation fixes regarding talloc_reference() and talloc_unlink() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* tdb python binding: raise KeyError(key) when the key doesn't existAurelien Aptel2015-07-211-1/+5
| | | | | | | | | | This change makes tdb dicts more consistent with Python dicts. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7416 Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pytdb: Add tests for text interfacePetr Viktorin2015-07-211-23/+141
| | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pyldb: Add a text-based interface for Python 3Petr Viktorin2015-07-213-0/+163
| | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pytdb: Use new dict API on Python 3Petr Viktorin2015-07-212-11/+47
| | | | | | | | | - Remove has_key() method, add a fast "in" operator - Rename iterkeys() to keys() Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pytdb: Build for two versions of Python at oncePetr Viktorin2015-07-211-8/+8
| | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pytdb: Port to Python 3Petr Viktorin2015-07-213-94/+141
| | | | | | | | | | | | - Use bytes for all data, text strings for repr() - Use PyLong instead of PyInt on py3 - Use new module initialization - Update tests - Run tests in "make test" Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pytdb: Allow nextkey() to be calledPetr Viktorin2015-07-211-1/+1
| | | | | | | | nextkey() was defined to take no arguments but expected one. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap_rbt: Make "key" and "value" aligned to 16 byteVolker Lendecke2015-07-201-12/+39
| | | | | | | | | | Reported by Uri Simchoni <urisimchoni@gmail.com>. Thanks! Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Jul 20 23:18:23 CEST 2015 on sn-devel-104
* lib/tls: Change default supported TLS versions.Andrew Bartlett2015-07-201-1/+1
| | | | | | | | | The new default is to disable SSLv3, as this is no longer considered secure after CVE-2014-3566. Newer GnuTLS versions already disable SSLv3. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz>
* lib/tls: Add new 'tls priority' optionAndrew Bartlett2015-07-202-0/+9
| | | | | | | | | | This adds a new option to the smb.conf to allow administrators to disable TLS protocols in GnuTLS without changing the code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11076 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>
* lib/util: include config.h before any glibc headersUri Simchoni2015-07-172-2/+2
| | | | | | | | | | | | | config.h may have some flags which affect glibc behavior, e.g. _FILE_OFFSET_BITS=64. To make sure these flags have the desired effect, config.h must be included before any glibc header files. This commit does not fix a specific known bug. It changes the code to comply with coding conventions. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
* tdbrestore: include config.h before any glibc headersUri Simchoni2015-07-171-1/+1
| | | | | | | | | | | | | config.h may have some flags which affect glibc behavior, e.g. _FILE_OFFSET_BITS=64. To make sure these flags have the desired effect, config.h must be included before any glibc header files. This commit does not fix a specific known bug. It changes the code to comply with coding conventions. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
* async_req: check for errors when monitoring socket for readabilityUri Simchoni2015-07-152-5/+44
| | | | | | | | | | | | | | | | | | Add an option to wait_for_read_send(), so that the request, upon calling back, report whether the socket actually contains data or is in EOF/error state. EOF is signalled via the EPIPE error. This is useful for clients which do not expect data to arrive but wait for readability to detect a closed socket (i.e. they do not intend to actually read the socket when it's readable). Actual data arrival would indicate a bug in this case, so the check can be used to print an error message. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11397 Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/krb5: add new KRB5_ERROR_CODE() abstraction macro.Günther Deschner2015-07-141-0/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/util/charset: reduce loglevel for push_ucs2_talloc errorRalph Boehme2015-07-141-2/+2
| | | | | | | | | | | push_ucs2_talloc() may have failed because of EILSEQ, not a failing malloc. Log the failure with DBG_WARNING instead of level 0. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 14 03:59:05 CEST 2015 on sn-devel-104
* util.c: fix order of inclusion to correctly consume config.hUri Simchoni2015-07-091-1/+1
| | | | | | | | | | | | | | | | replace.h has to be the first file included in order to correctly act upon the definitions in config.h. Specifically, this change fixes 32-bit i686 builds, which depend upon _FILE_OFFSET_BITS=64 to be set before any standard library file is included. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 9 12:32:03 CEST 2015 on sn-devel-104
* tdb: Reproducer for Bug 11381Volker Lendecke2015-07-092-0/+204
| | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11381 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: Fix bug 11381, deadlockVolker Lendecke2015-07-091-1/+13
| | | | | | | | | | | | | | | | | This fixes a deadlock in tdb that is a bad interaction between tdb_lockall and tdb_traverse. This deadlock condition has been around even before tdb mutexes, it's just that the kernel fcntl EDEADLK detection protected us from this ABBA lock condition to become a real deadlock stalling processes. With tdb mutexes, this deadlock protection is gone, so we do lock dead. This patch glosses over this particular ABBA condition, making tdb with mutexes behave the same as tdb without mutexes. Admittedly this is no real fix, but it works around a real user's problem. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11381 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gpfswrap: Use gpfs.h instead of gpfs_fcntl.hChristof Schmitt2015-07-082-2/+2
| | | | | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Wed Jul 8 05:55:13 CEST 2015 on sn-devel-104
* gpfswrap: Remove unused wrapper for gpfs_fnctlChristof Schmitt2015-07-082-13/+0
| | | | | | | | With the removal of the fileset quota check this wrapper function is longer used. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* param: Make "kernel change notify" globalVolker Lendecke2015-07-071-2/+2
| | | | | | | | With a central notifyd, we can't do this per share anymore. Notifyd will only look at absolute paths, not shares. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: Make "change notify" globalVolker Lendecke2015-07-071-2/+2
| | | | | | | | With a central notifyd, we can't do this per share anymore. Notifyd will only look at absolute paths, not shares. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add server_id_db_pid()Volker Lendecke2015-07-072-0/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add server_id_db_prune_nameVolker Lendecke2015-07-072-11/+22
| | | | | | | | With this you can remove a foreign mapping. Required to clean up dead processes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Add tevent_req_poll_unixVolker Lendecke2015-07-072-0/+12
| | | | | | | This makes sync wrappers a bit shorter Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-mdssvc: add new option 'spotlight'Ralph Boehme2015-07-071-0/+8
| | | | | | | | | Per share option: it reflects whether a share is indexed by Tracker or not. The global switch that controls whether Spotlight is enabled or not, are the mdsvc RPC switches. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Introduce setting "desired" for 'smb encrypt' and 'client/server signing'Michael Adam2015-07-072-0/+2
| | | | | | | | | | | This should trigger the behaviour where the server requires signing when the client supports it, but does not reject clients that don't support it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11372 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib/util:charset/tests: improve strlen_m[_term[_null]]() testingStefan Metzmacher2015-07-031-1/+13
| | | | | | | | | | They differ in their "" vs. NULL handling. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Jul 3 05:02:45 CEST 2015 on sn-devel-104
* lib/util: let strlen_m_term[_null]() use strlen_m_ext_term[_null]()Stefan Metzmacher2015-07-031-15/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib/util: add strlen_m_ext_term_null() helper functionStefan Metzmacher2015-07-032-1/+20
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib/util: fix output format in dump_data*()Stefan Metzmacher2015-07-031-1/+1
| | | | | | | | | | | | | | | | | | | This changes: [0000] 4E 54 4C 4D 53 53 50 00 01 00 00 00 05 82 08 60 NTLMSSP. .......` [0010] 09 00 09 00 20 00 00 00 00 00 00 00 29 00 00 00 .... ... ....)... [0020] 57 4F 52 4B 47 52 4F 55 50 WORKGROU P into: [0000] 4E 54 4C 4D 53 53 50 00 01 00 00 00 05 82 08 60 NTLMSSP. .......` [0010] 09 00 09 00 20 00 00 00 00 00 00 00 29 00 00 00 .... ... ....)... [0020] 57 4F 52 4B 47 52 4F 55 50 WORKGROU P Note the alignment of 'WORKGROU P'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib/torture: be more verbose about ndr failures.Günther Deschner2015-07-031-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: move torture_assert_sid_equal() out of ndr headers.Günther Deschner2015-07-031-0/+10
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: add and use debug class for teventRalph Boehme2015-07-013-0/+5
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Jul 1 23:04:00 CEST 2015 on sn-devel-104
* debug: get rid of DBGC_MAX_FIXEDRalph Boehme2015-07-012-34/+30
| | | | | | | | | Simplify class table by using designated array initializers and ARRAY_SIZE macro. Signed-off-by: Ralph Boehme <slow@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib: Trim blocking.cVolker Lendecke2015-07-011-7/+0
| | | | | | | | 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): Wed Jul 1 17:12:48 CEST 2015 on sn-devel-104
* Revert "lib: Fix deps for LIBCRYPTO"Douglas Bagnall2015-06-281-2/+2
| | | | | | | | | | | | | | | | | This reverts commit 30bfb8d63804f0c98312fadaadcb104120dadafb. Talloc is still needed by LIBCRYPTO, because arcfour.h includes lib/util/data_blob.h which includes talloc.h. It seems arcfour only uses the DATA_BLOB struct (in e.g. arcfour_crypt and arcfour_init). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Jun 28 11:47:16 CEST 2015 on sn-devel-104
* Byte order reversal shouldn't assume size_t is 64 bit.Douglas Bagnall2015-06-241-1/+1
| | | | | | | | | | | This fixes compilation on 32 bit i386 with -WError. ../lib/crypto/aes_gcm_128.c:213:2: error: right shift count >= width of type [-Werror] ../lib/crypto/aes_gcm_128.c:213:2: error: left shift count >= width of type [-Werror] Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Fix CID 710685 Unchecked return value from libraryVolker Lendecke2015-06-231-1/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix CID 1273234 Untrusted value as argumentVolker Lendecke2015-06-231-1/+1
| | | | | | | | buf->size has been sanitized in the checks done in talloc_array(). This makes the "trust" flow more explicit. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix CID 1034723 Explicit null dereferencedVolker Lendecke2015-06-231-7/+8
| | | | | | | Do an early return if there's nothing to receive Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix CID 1272913 Calling risky functionVolker Lendecke2015-06-231-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>