summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* smbd: Make messaging_send_to_children staticChristof Schmitt2014-06-302-4/+2
| | | | | | | | | | This function is only used in server.c 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): Mon Jun 30 17:20:00 CEST 2014 on sn-devel-104
* smbd: Use common function for FORCE_DIS and KILL_CLIENT_IP in parentChristof Schmitt2014-06-301-22/+11
| | | | | | | | | The parent smbd process only forwards the message to the child processes. Use a common function instead of two separate ones that do the same thing. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: SMB2 : Fix leak of blocking lock records in the database.Jeremy Allison2014-06-301-0/+1
| | | | | | | | | | | | | | | | | | Based on a fix from Hemanth Thummala <hemanth.thummala@gmail.com> Bug #10673 - Increasing response times for byte range unlock requests. The previous refactoring makes it obvious we need to call remove_pending_lock() in all places where we are returning from the SMB2 blocking lock call. https://bugzilla.samba.org/show_bug.cgi?id=10673 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jun 30 14:59:16 CEST 2014 on sn-devel-104
* s3: smb2: Simplify logic in reprocess_blocked_smb2_lock().Jeremy Allison2014-06-301-30/+25
| | | | | | | | | SMB2 blocking locks can only have one lock per request, so there can never be any other locks to wait for. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: smb2: Remove unused code from remove_pending_lock().Jeremy Allison2014-06-301-13/+0
| | | | | | | | | SMB2 blocking locks can only have one lock per request, so there can never be any previous locks to remove. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* ctdb-packaging: Update configure.rpm with minimum library versionsAmitay Isaacs2014-06-301-0/+1
| | | | | | | | | | This makes configure command consistent with spec file. 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 Jun 30 11:23:18 CEST 2014 on sn-devel-104
* ctdb-packaging: Minimum required tevent library is 0.9.16Amitay Isaacs2014-06-301-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3-shadow-copy2: Protect against already converted namesVolker Lendecke2014-06-271-0/+28
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jun 27 09:03:53 CEST 2014 on sn-devel-104
* s3-shadow-copy2: Add more debugsVolker Lendecke2014-06-271-0/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3-shadow-copy2: Fix incorrect case submountsVolker Lendecke2014-06-271-10/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3-shadow-copy2: Remove TODO and fix commentsChristof Schmitt2014-06-271-7/+8
| | | | | | | | | The patch "s3-shadow-copy2: Fix dir/@GMT-2012.10.15-13.48.43 form of paths" takes care of a case marked as TODO, remove it and adjust the comments accordingly. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-shadow-copy2: Fix dir/@GMT-2012.10.15-13.48.43 form of pathsVolker Lendecke2014-06-271-2/+2
| | | | | | | | | | The previous clause in shadow_copy2_strip_snapshot would only handle @GMT- at the end of a pathname if it was the *only* pathname component. XP seems to send @GMT- at the end under certain circumstances even with a path prefix. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3-shadow-copy2: Add extreme debug output to shadow_copy2_strip_snapshotVolker Lendecke2014-06-271-0/+8
| | | | | | | This is sooo hairy to debug when things go wrong :-( Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* dbwrap: Print wait times with full precisionVolker Lendecke2014-06-271-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smb2: Fix smb2_lease_stateVolker Lendecke2014-06-261-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jun 26 17:30:00 CEST 2014 on sn-devel-104
* tdb: defragment the freelist in tdb_allocate_from_freelist()Michael Adam2014-06-261-0/+55
| | | | | | | | | | | | | | | | | | | | While we are traversing the freelist anyways, merge a record with the left if it is also a free list record. That partially makes up for the fragmentation introduced by the lack of merging with right records in tdb_free(). Note there is a potential slight downside: If the left record we merge the current record into was earlier in the chain and has hence already been met in traverse, then we can not use the enlarged record even if it might be a new best fit. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jun 26 12:16:03 CEST 2014 on sn-devel-104
* tdb: add "freelist_size" sub-command to tdbtoolMichael Adam2014-06-261-0/+15
| | | | | | | | | With the new code, this has the side effect of merging adjacent records in the freelist if the database is not read-only. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: use tdb_freelist_merge_adjacent in tdb_freelist_size()Michael Adam2014-06-261-4/+29
| | | | | | | | So that we automatically defragment the free list when freelist_size is called (unless the database is read only). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: add tdb_freelist_merge_adjacent()Michael Adam2014-06-261-0/+59
| | | | | | | | | | | | | | | | This is intended to be called to reduce the fragmentation in the freelist. This is to make up the deficiency of the freelist to be not doubly linked. If the freelist were doubly linked, we could easily avoid the creation of adjacent freelist entries. But with the current singly linked list, it is only possible to cheaply merge a new free record into a freelist entry on the left, not on the right... This can be called periodically, e.g. in the vacuuming process of a ctdb cluster. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: add utility function check_merge_ptr_with_left_record()Michael Adam2014-06-261-0/+53
| | | | | | | | Variant of check_merge_with_left_record() that reads the record itself if necessary. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: simplify tdb_free() using check_merge_with_left_record()Michael Adam2014-06-261-17/+9
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: add utility function check_merge_with_left_record()Michael Adam2014-06-261-0/+50
| | | | | | | | Check whether the record left of a given freelist record is also a freelist record, and if so, merge the two records. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: improve comments for tdb_free().Michael Adam2014-06-261-7/+11
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: factor merge_with_left_record() out of tdb_free()Michael Adam2014-06-261-7/+37
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: fix debug message in tdb_free()Michael Adam2014-06-261-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: reduce indentation in tdb_free() for merging leftMichael Adam2014-06-261-18/+23
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: increase readability of read_record_on_left()Michael Adam2014-06-261-27/+41
| | | | | | | | by using early returns and better variable names, and reducing indentation. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: factor read_record_on_left() out of tdb_free()Michael Adam2014-06-261-30/+49
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* torture4: Add a little test that truncate actually works :-)Volker Lendecke2014-06-251-0/+13
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Jun 25 13:37:24 CEST 2014 on sn-devel-104
* smbd: Remove 2 indentation levelsVolker Lendecke2014-06-251-11/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4: torture: Add regression test case for #10671 - Samba file corruption as ↵Jeremy Allison2014-06-251-0/+73
| | | | | | | | | | | | | | | | | | a result of failed lock check. Adds a new test to raw.open. Opens a file with SHARE_NONE, writes 1 byte at offset 1023, attempts a second open with r/w access+truncate disposition, then checks that open fails with SHARING_VIOLATION, and the file is not truncated (is still size 1024). Correctly detects the bug and fixed smbd for me. https://bugzilla.samba.org/show_bug.cgi?id=10671 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd - Prevent file truncation on an open that fails with share mode ↵Jeremy Allison2014-06-251-2/+20
| | | | | | | | | | | | | | | | | violation. Fix from Volker, really - just tidied up a little. The S_ISFIFO check may not be strictly neccessary, but doesn't hurt (might make the code a bit more complex than it needs to be). Fixes bug #10671 - Samba file corruption as a result of failed lock check. https://bugzilla.samba.org/show_bug.cgi?id=10671 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd - fix processing of packets with invalid DOS charset conversions.Jeremy Allison2014-06-253-13/+21
| | | | | | | | | | | | | | | CVE-2014-3493 Bug 10654 - Segmentation fault in smbd_marshall_dir_entry()'s SMB_FIND_FILE_UNIX handler https://bugzilla.samba.org/show_bug.cgi?id=10654 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 25 03:47:55 CEST 2014 on sn-devel-104
* s3: nmbd: Fix bug 10633 - nmbd denial of serviceJeremy Allison2014-06-251-5/+2
| | | | | | | | | | | | | | | | | The Linux kernel has a bug in that it can give spurious wakeups on a non-blocking UDP socket for a non-deliverable packet. When nmbd was changed to use non-blocking sockets it became vulnerable to a spurious wakeup from poll/epoll. Fix sys_recvfile() to return on EWOULDBLOCK/EAGAIN. CVE-2014-0244 https://bugzilla.samba.org/show_bug.cgi?id=10633 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* ctdb-build: Instead of default test_wrap, install fixed test_wrapAmitay Isaacs2014-06-241-1/+14
| | | | | | | | | | | tests/scripts/test_wrap script is updated based on the configured paths. This should be installed instead of the stock version in the source. 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): Tue Jun 24 09:37:39 CEST 2014 on sn-devel-104
* ctdb-build: Fix sed expression to protect '\'Amitay Isaacs2014-06-241-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Use correct path variables for ctdb_run_tests.shAmitay Isaacs2014-06-241-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Use CTDB_ETCDIR instead of ETCDIR/ctdbAmitay Isaacs2014-06-244-6/+8
| | | | | | | This avoids hardcoding path components in source. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Use CTDB_RUNDIR instead of VARDIR/run/ctdbAmitay Isaacs2014-06-242-5/+6
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Add special target to get build versionAmitay Isaacs2014-06-242-1/+7
| | | | | | | This avoids the need to build a tarball to get version information. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Allow waf to build rpms without configure firstAmitay Isaacs2014-06-241-1/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* torture: Remove confusing reference to (1 sec == 0.25)Andrew Bartlett2014-06-241-46/+46
| | | | | | | | | | | | | The write should never update the time, so the fraction of the write time delay we use is not important. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 24 01:44:06 CEST 2014 on sn-devel-104
* torture: tidy up whitespace for clarityAndrew Bartlett2014-06-231-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Run base.delaywrite against plugin_s4_dc only, and with kerberos ↵Andrew Bartlett2014-06-232-8/+7
| | | | | | | for faster connections Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture-base.delaywrite: assert the for a delayed write, that it just takes ↵Andrew Bartlett2014-06-231-29/+24
| | | | | | | | | | | | longer than our configured delay This removes the hardcoded TIMEDELAY_SECS that was then made variable by the confusing "secs" variable Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Only error if the write time was updated is less than the expected ↵Andrew Bartlett2014-06-231-19/+19
| | | | | | | | | | | | | | delay The previous test was far, far too tight, it was in seconds 1/4 of the fraction of the normal delay we had configured Samba to use so (1/4) * (500 000 / 2000 000) = 1/16 (sec). This margin appears to just be too tight for our loaded test server. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Store writetimeupdatedelay in a double to allow easier comparisonAndrew Bartlett2014-06-231-16/+16
| | | | | | | | | | In particular, this avoids a comparison with double diff = timeval_elapsed() being promoted to an integer. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: convert raw.mux to use torture_comment() macros instead of printf()Andrew Bartlett2014-06-231-28/+28
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: convert raw.mux to use torture_assert() macrosAndrew Bartlett2014-06-231-27/+17
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: convert CHECK_STATUS into torture_assert_ntstatus_equal in raw.mux ↵Andrew Bartlett2014-06-231-33/+26
| | | | | | | | tests Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>