summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ldb: version 1.1.18ldb-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.2tdb-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>
* s3-libads: remove unused dn from ads_get_service_principal_names().Günther Deschner2014-11-281-7/+0
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Nov 28 16:46:20 CET 2014 on sn-devel-104
* 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>
* torture: Fix raw.open.chained-openxVolker Lendecke2014-11-281-2/+2
| | | | | | | | | | sizeof(buf) is 5. On FreeBSD10/clang this overwrites "ret". Not good. 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): Fri Nov 28 13:30:18 CET 2014 on sn-devel-104
* test: Fix samba3.blackbox.net.registry.checkVolker Lendecke2014-11-281-1/+1
| | | | | | | | | | On FreeBSD, "wc -l" returns whitespace. Cope with that. 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): Fri Nov 28 10:24:06 CET 2014 on sn-devel-104
* 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
* messaging4: Fix typesVolker Lendecke2014-11-271-2/+12
| | | | | | | | | | | | | | | | According to python docs, PyArg_ParseTuple takes "int" and "unsigned long long". With pointers down to functions, in particular with varargs, there is no automatic conversion. So we need to be very strict about types. Automatic conversion to for example uint64_t happes only with assignment. This fixes a crash on FreeBSD10/clang. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Nov 27 21:32:18 CET 2014 on sn-devel-104
* s4: torture: leases - Add test for leases and blocking locks.Jeremy Allison2014-11-271-0/+173
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Nov 27 19:08:24 CET 2014 on sn-devel-104
* s4: smb2 : torture: Add new dynamic_share leases test.Jeremy Allison2014-11-272-0/+200
| | | | | | | | | | | | Depends on new share "dynamic_share" being set up containing an %R in the path= statement. Shows we will break leases and fail to grant new ones if we get a lease_key+client guid pair match on files with different fileid's, as can happen on dynamic shares. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases - torture test for timeout of responding to lease break request.Jeremy Allison2014-11-271-0/+130
| | | | | | | Passes against W2K12. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/smb2: smb2.lease.breaking6 testStefan Metzmacher2014-11-271-0/+108
| | | | | | | | The client is allowed to downgrade a lease to a lower value than required. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking5 testStefan Metzmacher2014-11-271-0/+120
| | | | | | | | This is like breaking4, but with an initial "R" lease instead of "RH". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking4 testStefan Metzmacher2014-11-271-0/+146
| | | | | | | | This demonstrates that a confliciting open with NTCREATEX_DISP_OVERWRITE isn't delayed by a "RH" lease, even if a lease is in 'breaking' mode. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking3 testStefan Metzmacher2014-11-271-0/+189
| | | | | | | | | | | | | This demonstrates a race case where the client reuses a lease, while the server already sent a break. The open succeeds with SMB2_LEASE_FLAG_BREAK_IN_PROGRESS being set. This is more complex that smb2.lease.breaking[1-2] as it generates breaks from RWH => RH => R => NONE. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking2 testStefan Metzmacher2014-11-271-0/+152
| | | | | | | | | | This demonstrates that a conflicting open with NTCREATEX_DISP_OVERWRITE breaks a lease to NONE. It also shows which error codes are generated for unexpected lease break acks. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking1 testStefan Metzmacher2014-11-271-0/+108
| | | | | | | | | | This demonstrates a race case where the client reuses a lease, while the server already sent a break. The open succeeds with SMB2_LEASE_FLAG_BREAK_IN_PROGRESS being set. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: make it possible to skip the automatic ack of lease breaks.Stefan Metzmacher2014-11-271-3/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: add smb2.lease.v2_epoch[2|3] testsStefan Metzmacher2014-11-271-0/+210
| | | | | | | | | | | | They demonstrate that the lease version (v1 or v2) is selected by the first open. All following opens using the other version still get the lease version of the first open. This implies that the server has to remember the lease version more globaly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: add smb2.lease.[v2_]complex1 testsStefan Metzmacher2014-11-271-0/+273
| | | | | | | | These tests verify the lease state is consistent between two connections with the same client_guid. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: pass the expected flags to CHECK_LEASE()Stefan Metzmacher2014-11-271-26/+26
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: don't check the lease break connection against samba3Stefan Metzmacher2014-11-271-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: always verify the v2 lease epoch.Stefan Metzmacher2014-11-271-44/+71
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: verify lease_flags in CHECK_LEASE_BREAK()Stefan Metzmacher2014-11-271-2/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: lease per test fnamesStefan Metzmacher2014-11-271-18/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: make lease tests more reliable by calling ↵Stefan Metzmacher2014-11-271-36/+41
| | | | | | | | | torture_wait_for_lease_break() They now work against w2k8r2, w2012, w2012r2. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: skip lease tests if the server doesn't support themStefan Metzmacher2014-11-271-6/+56
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: initialize ls->lease_versionStefan Metzmacher2014-11-271-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: add new_epoch to struct smb2_lease_breakStefan Metzmacher2014-11-272-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:param: don't expand PROTOCOL_DEFAULT in lpcfg_smbcli_options()Stefan Metzmacher2014-11-271-1/+1
| | | | | | | We let the low-level smb1 or smb2 code assign what PROTOCOL_DEFAULT means. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: allow the caller to specify a specific value for max_protocol.Stefan Metzmacher2014-11-272-1/+10
| | | | | | | | The default is still PROTOCOL_LATEST. As smb2_connect*() is about SMB2/3 only we upgrade to PROTOCOL_LATEST if PROTOCOL_NT1 or lower is given. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: fix up the max_protocol value for the current transport ↵Stefan Metzmacher2014-11-271-0/+8
| | | | | | | | | | | | | connection This allows the caller to pass PROTOCOL_DEFAULT, which results in PROTOCOL_NT1. As smbcli_transport_init() is about SMB1 only we downgrade to PROTOCOL_NT1 if a higher value (for SMB2 or SMB3) was given. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb_composite: use the options on the transportStefan Metzmacher2014-11-271-1/+1
| | | | | | | | These are the options which really belong to the connection and might not be the the same as the hints given from the caller. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_create: send interim responses after 0.5 millisecondsStefan Metzmacher2014-11-271-7/+1
| | | | | | | | | | | | | | | | We don't have to care about delayed NT_STATUS_SHARING_VIOLATION anymore after the following commit: commit 4111fcfd4f570d39d46a0d414546ca62c7b609be Author: Jeremy Allison <jra@samba.org> Date: Thu May 2 11:12:47 2013 -0700 Only do the 1 second delay for sharing violations for SMB1, not SMB2. Match Windows behavior. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Revert "libcli/smb: mask off SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET for version 1"Stefan Metzmacher2014-11-271-1/+0
| | | | | | | | | This reverts commit a6affb7bb3ff595165e708c56ede2181f0bb570f. This is not really needed. The caller should ignore this flag. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gse_krb5: Avoid a segfault when we can not read the dedicated keytab fileAndrew Bartlett2014-11-272-33/+9
| | | | | | | | | | | | | | | This improved code simply cleans up the memory as soon as possible, rather than using memcmp(). Otherwise, we segfault if krb5_kt_start_seq_get fails, as it can set the fd element in the handle to -1. Change-Id: Ib4821ef944a7e12cd8a891ae07dbfc0567c65495 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> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Nov 27 07:38:02 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>
* wbinfo: create a more comprehensive test for sids2xidsGarming Sam2014-11-272-15/+73
| | | | | | | | | | | In particular, this tests that ID_TYPE_BOTH is cached correctly. Change-Id: I2475f22d3f4506c93b15d82b0d337d3729bbbd4c 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): Thu Nov 27 05:16:53 CET 2014 on sn-devel-104
* wbinfo: fix tests and lack of cache flushingGarming Sam2014-11-271-2/+2
| | | | | | Change-Id: I1a0a8f62522a6eb64d39bee48f4f71403d7c343a Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-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
* registry3: Fix a typoVolker Lendecke2014-11-261-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused get_share_params()David Disseldorp2014-11-262-24/+0
| | | | | | | | | | | Given a share name, get_share_params() returns corresponding snum inside a struct share_params. find_service() provides duplicate functionality. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 26 21:27:21 CET 2014 on sn-devel-104
* srv_srvsvc_nt: remove unneeded get_share_params() callDavid Disseldorp2014-11-261-8/+3
| | | | | | | | The snum and share name are already determined via the prior find_service() call. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli: SMB2: Pure SMB2-only negprot fix to make us behave as a Windows ↵Jeremy Allison2014-11-262-0/+11
| | | | | | | | | | client does. Required as some servers return zero when asked for zero credits in an initial SMB2-only negprot. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de>
* gencache: Request mutexes for gencache_notrans.tdbChristof Schmitt2014-11-261-1/+2
| | | | | | | | | | | The check in tdb_wrap ensures that mutexes are only used on systems that properly support them. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Nov 26 19:04:11 CET 2014 on sn-devel-104
* gencache: Convert gencache.tdb to tdb_wrapChristof Schmitt2014-11-261-30/+31
| | | | | | | | This change is not strictly necessary, but for consistency both gencache tdbs are now opened through tdb_wrap. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* gencache: Convert gencache_notrans to use tdb_wrapChristof Schmitt2014-11-261-25/+28
| | | | | | | This allows using on the mutex check in tdb_wrap. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:gencache: don't use transaction non non-persistent gencache_notrans.tdbMichael Adam2014-11-261-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gencache_notrans.tdb is a non-persistent cache layer above the persistent gencache.tdb. Despite its name, and despite the nature of non-persistent tdbs, the current stabilization code uses a transaction on gencache_notrans.tdb like this: transaction_start(cache) transaction_start(cache_notrans) traverse(cache_notrans, stabilize_fn) transaction_commit(cache) transaction_commit(cache_notrans) where stabilze_fn does this on a record: 1. store it to or delete it from cache (depending on the timeout) 2. delete it from the cache_notrans This patch changes gencache_notrans.tdb to avoid transactions by using an all-record lock like this: tdb_allrecord_lock(cache_notrans) transaction_start(cache) traverse(cache_notrans, stabilize_fn_mod) transaction_commit(cache) traverse(cache_notrans, wipe_fn) tdb_wipe_all(cache_notrans) tdb_allrecord_unlock(cache_notrans) with stabilize_fn_mod doing only: 1. store the record to or delete it from cache (depending on the timeout) and wipe_fn deleting the records from the gencache_notrans db. This is a step towards making non-persistent-db specific features like mutex locking usable for gencache_notrans.tdb. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:gencache: simply stabilize() a bit more: remove error from stateMichael Adam2014-11-261-5/+1
| | | | | | | | | | | state.error is set to true if and only if the traverse callback returns error (-1), and hence only if the traverse fails. Hence the the error state is redundant. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:gencache: fix logic in stabilization when deleting a record from stable cacheMichael Adam2014-11-261-3/+3
| | | | | | | | | | | | | Set state->written = true in the delete case if and only if the record has really been deleted. This does currently not seem to lead to an unneeded write to the DB, since failure to delete the record will cause the traverse and hence the transaction to cancel. But I think this is clearer. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>