summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* torture4: Make sure we copy the parent_lease_keyVolker Lendecke2014-07-072-6/+52
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Use BVALVolker Lendecke2014-07-071-8/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-tests: Add a test for ctdb restoredbAmitay Isaacs2014-07-071-0/+118
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Jul 7 16:06:39 CEST 2014 on sn-devel-104
* ctdb-tests: Check that ctdb wipedb cleans the databaseAmitay Isaacs2014-07-071-0/+10
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Do not thaw databases if recovery is activeAmitay Isaacs2014-07-074-6/+14
| | | | | | | | This prevents ctdb tool from thawing databases prematurely in thaw/wipedb/restoredb commands if recovery is active. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-recoverd: Set recovery mode before freezing databasesAmitay Isaacs2014-07-072-22/+22
| | | | | | | | | | Setting recovery mode to active is the only correct way to inform recovery daemon to run database recovery. Only freezing databases without setting recovery mode should not trigger database recovery, as this mechanism is used in tool to implement wipedb/restoredb commands. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tools: There is no need for forcing a recoveryAmitay Isaacs2014-07-071-13/+0
| | | | | | | | | | This effectively reverts commit 442953c540424ad0c64f4264b5ee27c45a3130e8. The correct way of telling recovery daemon to trigger a database recovery is by setting recovery mode to active. There is no need to freeze databases as recovery master will do that across the cluster anyway. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* Revert "It was possible for ->recovery_mode to get out of sync with the new ↵Amitay Isaacs2014-07-071-10/+1
| | | | | | | | | | | | | | three db priorities in such a way that" This reverts commit 6578a97bd94fc14d5b6df85b84e50447f7bdb2e3. This condition cannot happen since when recovery is triggered, all the databases would get frozen and thawed in the order of priority. The only other place where databases get frozen are for implementation of ctdb wipedb/restoredb commands. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Use SCHED_RESET_ON_FORK when setting SCHED_FIFOMartin Schwenke2014-07-071-1/+7
| | | | | | | | | | This makes the scheduler reset code a no-op. 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): Mon Jul 7 13:28:25 CEST 2014 on sn-devel-104
* ctdb-recoverd: Don't say "Election timed out"Martin Schwenke2014-07-071-1/+1
| | | | | | | | That makes people think there's a problem (and report bugs) so say something a bit less scary instead... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-recoverd: Log a message when releasing the recovery lockMartin Schwenke2014-07-071-0/+1
| | | | | | | | It is a non-trivial event and will make it easier to debug recovery lock issues. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Support NFS on RHEL7 with systemdMartin Schwenke2014-07-071-2/+4
| | | | | | | | | Need to be able to recognise a RHEL system. Still use "system" to start and stop service, since that still works and yields the smallest change. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* auth: Fix an incompatible pointer assignmentVolker Lendecke2014-07-071-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 7 10:58:30 CEST 2014 on sn-devel-104
* Order switch statementsSamuel Cabrero2014-07-076-50/+50
| | | | | | | | | Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jul 7 07:47:44 CEST 2014 on sn-devel-104
* idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfoSamuel Cabrero2014-07-079-7/+179
| | | | | | | Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* ctdb-recoverd: No need to set ctdbd_pid againAmitay Isaacs2014-07-051-2/+0
| | | | | | | | | | | This is unnecessary since ctdbd_pid is set very early in the code before creating any other processes including recovery daemon. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Sat Jul 5 09:20:27 CEST 2014 on sn-devel-104
* ctdb-daemon: Remove ctdbd_pid global variableMartin Schwenke2014-07-053-13/+7
| | | | | | | | | This duplicates ctdb->ctdbd_pid. Thanks to Sumit Bose <sbose@redhat.com> for the suggestion. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Check PID in ctdb_remove_pidfile(), not unreliable flagMartin Schwenke2014-07-052-9/+2
| | | | | | | | | | | | | | | | | | If something unexpectedly uses fork() then an exiting child will remove the PID file while the main daemon is still running. The real test is whether the current process has the PID of the main CTDB daemon, which is the process that calls setsid(). This could be done using getpgrp() instead. At the moment the eventscript handler harmlessly calls setpgid() - harmless because the atexit() handlers are cleared upon exec(). However, it is possible that process groups will be used more in future so it is probably better to rely on the session ID. Thanks to Sumit Bose <sbose@redhat.com> for the idea. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Exit if setting the session ID failsMartin Schwenke2014-07-051-1/+3
| | | | | | | | Currently ctdbd_wrapper depends on the session ID. Very soon PID file removal will too. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* smbd: do_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-043-6/+3
| | | | | | | | 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): Fri Jul 4 08:52:31 CEST 2014 on sn-devel-104
* smbd: brl_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-045-16/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_CANCEL_WINDOWSVolker Lendecke2014-07-048-25/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: do_lock does not need "blr" anymoreVolker Lendecke2014-07-046-18/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: brl_lock does not need "blr" anymoreVolker Lendecke2014-07-045-12/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_LOCK_WINDOWSVolker Lendecke2014-07-048-25/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove two outdated commentsVolker Lendecke2014-07-041-5/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use brl_delete_lock_struct in brl_lock_cancel_defaultVolker Lendecke2014-07-041-6/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Factor out unlocking from smbd_do_lockingVolker Lendecke2014-07-043-49/+62
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove an outdated commentVolker Lendecke2014-07-041-4/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-winbind: Use winbindd in the AD DC by defaultAndrew Bartlett2014-07-045-44/+22
| | | | | | | | | | | (Including changes to knownfail to match the new winbindd in use in each environment) Change-Id: I9e08086eba98e95e05a99afef28315e2857aae56 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Jul 4 05:19:54 CEST 2014 on sn-devel-104
* winbindd: Use a remote RPC server when we are an RODC when neededAndrew Bartlett2014-07-047-35/+72
| | | | | | | | | | | | | This allows us to operate against the local cache where possible, but to forward some operations to the read-write DC. Andrew Bartlett Change-Id: Idc78ae379a402969381758919fcede17568f094e Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* selftest: Use s4 RPC servers in the s4member environmentAndrew Bartlett2014-07-041-2/+15
| | | | | | Change-Id: I645669d551d7bb988c69da7b3805e3056ab1e8c8 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* s4-auth: Do not override the NT_STATUS_NOT_IMPLEMENTED error for winbinddAndrew Bartlett2014-07-044-6/+29
| | | | | | | | | This changes the auth code in winbindd to use this as a flag, and to therefore contact the RW DC. Change-Id: If4164d27b57b453b398642fdf7d46d03cd0e65f2 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* selftest: Make the wbinfo userinfo tests work properly with the qualified nameGarming Sam2014-07-042-3/+1
| | | | | | | | This eliminates a knownfail. Change-Id: I7331a4e62ef8c1f2a9999a78865023ae19beeaca Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* winbindd: Allow the AD-DC to call getdcnameGarming Sam2014-07-042-7/+16
| | | | | | | | This is particularly useful for RODC and eliminates a knownfail. Change-Id: Ia5089761dcabb1620eadd530dbc9b05580cddd1f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* secrets: Ensure we store the secureChannelType when written to secrets.ldbAndrew Bartlett2014-07-043-7/+21
| | | | | | | | | This will allow winbindd to know when we are an RODC without needing to dig into sam.ldb. Change-Id: Ibdfa37fe6269305ccc5db42479f4a8db5eea53f3 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* torture4: Make raw.lock.multilock fail after 20 secondsVolker Lendecke2014-07-041-1/+1
| | | | | | | | 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): Fri Jul 4 00:04:10 CEST 2014 on sn-devel-104
* torture4: Adapt comment to codeVolker Lendecke2014-07-031-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4: smbtorture: Add multi-lock test. Regression test for bug #10684.Jeremy Allison2014-07-031-0/+97
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock ↵Jeremy Allison2014-07-031-17/+80
| | | | | | | | | | | | | | | | | | (and the lock hasn't timed out). Keep the blocking lock record and the pending lock records consistent if we are dealing with multiple blocking lock requests in one SMB1 LockingX request. Ensure we re-add the records under the record lock, to avoid race conditions. Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - treat lock timeout the same as any other error.Jeremy Allison2014-07-031-53/+38
| | | | | | | | | | | | Allows the special case in process_blocking_lock_queue() that talks back to the client to be removed. Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - add and use utility function lock_timed_out().Jeremy Allison2014-07-031-3/+21
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - convert to using utility macro used elsewhere.Jeremy Allison2014-07-031-2/+1
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* torture3: Fix bug 10687Volker Lendecke2014-07-031-1/+1
| | | | | | | | 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 Jul 3 19:07:15 CEST 2014 on sn-devel-104
* ctdb-tests: Fix racy test for debugging hung scriptsMartin Schwenke2014-07-032-1/+10
| | | | | | | | | | | | | | | Debugging can still be running when a monitor event times out and scriptstatus output changes. When debugging a hung script to a log file, write to a temporary file and move the temporary file over the log file when done. The test then waits for the log file to appear. 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 3 08:19:23 CEST 2014 on sn-devel-104
* ctdb-scripts: Always print footer when debugging hung scriptMartin Schwenke2014-07-031-8/+6
| | | | | | | | | | | There shouldn't be an early exit for the "init" event. Just make the "ctdb scriptstatus" call conditional. While here, move the comment about only running a single instance to be near locking code. The comment is more useful there. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* s3-libnet: Improve error message.Andreas Schneider2014-07-021-1/+3
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jul 2 16:54:10 CEST 2014 on sn-devel-104
* s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().Jeremy Allison2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider: lock = start=110,size=10 pend_lock = 100, size=10 Do not overlap. However, (lock->start <= pend_lock->start + pend_lock->size) 110 100 10 is true, so it returns true (overlap). lock->start <= pend_lock->start + pend_lock->size should be: lock->start < pend_lock->start + pend_lock->size BUG: https://bugzilla.samba.org/show_bug.cgi?id=10685 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Jul 2 10:18:17 CEST 2014 on sn-devel-104
* make: Add gdbtestenv target.Andreas Schneider2014-07-021-0/+3
| | | | | | | | This starts the sever components in a xterm with gdb. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:winbindd - fix bad bugfix for bug #10280 - winbind panic if AD server is ↵Jeremy Allison2014-07-021-2/+2
| | | | | | | | | | | down. Previous bug fix reversed the sense of the test for out of memory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10280 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>