summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* replace: Make EWOULDBLOCK always availableVolker Lendecke2014-09-172-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Avoid a talloc in write_data_iovVolker Lendecke2014-09-171-9/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove unused file_lines_slashcontVolker Lendecke2014-09-173-36/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Move "large_file_support()" to the source4 smb serverVolker Lendecke2014-09-174-23/+21
| | | | | | | That's the only place where it's used, make it static there. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: change version to 1.3.1Michael Adam2014-09-162-1/+69
| | | | | | | | | | | | | * internal code cleanup * improved free record detection with a highly contended freelist on tdb's with dead record support (TDB_VOLATILE). * implicit defragmentation of the free list. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 16 12:13:31 CEST 2014 on sn-devel-104
* tdb:tools: fix a compiler warningStefan Metzmacher2014-09-161-4/+4
| | | | | | | | | ../../tdb/tools/tdbtool.c: In function ‘do_command’: ../../tdb/tools/tdbtool.c:717: error: declaration of ‘count’ shadows a global declaration ../../tdb/tools/tdbtool.c:597: error: shadowed declaration is here Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Add test suite for iconv conversion fail of bad names over SMB1/SMB3.Jeremy Allison2014-09-162-0/+181
| | | | | | | | | | | | Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Sep 16 04:21:49 CEST 2014 on sn-devel-104
* s3: smbd: Fix a couple of tricky slow-path cases - don't return a mangled ↵Jeremy Allison2014-09-162-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | name for a name that cannot be converted. For a name that contains an illegal Windows character, the directory listing code returns the mangled 8.3 name as the primary name for the file. If the original (non-mangled) filename cannot be converted to UCS2 on the wire via iconv due to conversion error, we should skip that name when returning a directory listing, as we can't map back from a returned 8.3 name to a usable non-mangled filename if the client sends it back to us. As this is only done in a very slow path (name must be mangled) or in the old DOS protocol listing code I don't feel too bad about using a talloc/free pair here. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Change get_lanman2_dir_entry() to return the full NTSTATUS.Jeremy Allison2014-09-161-20/+32
| | | | | | | | | | | Handle the errors correctly at the level above inside the SMB1 server. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Remove unneeded 'out_of_space' parameter from ↵Jeremy Allison2014-09-163-7/+6
| | | | | | | | | | | | | smbd_dirptr_lanman2_entry(). This can now be handled by checking for the STATUS_MORE_ENTRIES error return. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: SMB2 - change smbd_dirptr_lanman2_entry() to return an NTSTATUS.Jeremy Allison2014-09-163-12/+19
| | | | | | | | | | | Handle the errors correctly at the top level inside the SMB2 server. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: smbd_marshall_dir_entry() no longer needs explicit 'out_of_space' ↵Jeremy Allison2014-09-161-7/+1
| | | | | | | | | | | | | parameter. Handle this in the caller when it returns STATUS_MORE_ENTRIES. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Change smbd_marshall_dir_entry() to return an NTSTATUS. Returns ↵Jeremy Allison2014-09-161-23/+24
| | | | | | | | | | | STATUS_MORE_ENTRIES on out of space. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Change the function signature of srvstr_push() from returning a ↵Jeremy Allison2014-09-169-73/+221
| | | | | | | | | | | | | | | | | length to returning an NTSTATUS with a length param. srvstr_push_fn() now returns an NTSTATUS reporting any string conversion failure. We need to get serious about returning character set conversion errors inside smbd. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Ensure types for all variables called 'len' used in srvstr_push() ↵Jeremy Allison2014-09-161-12/+10
| | | | | | | | | | | are correct. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: srvstr_push() was changed to never return -1, so don't check for ↵Jeremy Allison2014-09-161-1/+1
| | | | | | | | | | | that as an error. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: utils: Don't directly manipulate errno inside strupper_m().Jeremy Allison2014-09-161-5/+1
| | | | | | | | | | | | | | Let the internal character conversion routines set it. Caller code paths don't depend on this (checked by David Disseldorp ddiss@suse.de). Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* vfs_gpfs: Fix the build with profiling-dataVolker Lendecke2014-09-161-4/+4
| | | | | | | | | | This fails with -Werror=declaration-after-statement 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): Tue Sep 16 01:55:57 CEST 2014 on sn-devel-104
* s3: winbindd: Old NT Domain code sets struct winbind_domain->alt_name to be ↵Jeremy Allison2014-09-152-3/+8
| | | | | | | | | | | | | | | | | | NULL. Ensure this is safe with modern AD-DCs. There are places in the code where we're not checking that alt_name is NULL and then calling into the DC lookup code with a NULL name request. This can happen in offline mode. Fixes bug #10717 - Winbind crash on losing VPN connection https://bugzilla.samba.org/show_bug.cgi?id=10717 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): Mon Sep 15 23:29:00 CEST 2014 on sn-devel-104
* messaging_dgm: Don't expose the messaging_dgm_contextVolker Lendecke2014-09-143-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now we can only support one messaging_dgm_context per process anyway, the code has checks for this. I would like to keep it that way, in the future we will have multiple messaging_context's or imessaging_context's filtering based upon the dst server_id. Why this change? messaging_dgm's lockfile contains the serverid->unique_id. When designing messaging_dgm, I had in mind to remove the serverid.tdb and replace it with the dgm lockfiles for server lookup and enumeration. I have a WIP-patchset that gets rid of almost all users of serverid.tdb. The problem is serverid_exists. Here we don't have a messaging_context available, and it would be pretty intrusive to make it so. This problem has plagued us since ctdb was developed, see for example the comment /* * This is a Samba3 hack/optimization. Routines like process_exists need to * talk to ctdbd, and they don't get handed a messaging context. */ in messaging_ctdb.c. This patchset removes this problem in a radical way: Treat the messaging_dgm context as one globally available structure and be done with it. The ctdb socket could go the same way in the future. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Sep 14 16:29:30 CEST 2014 on sn-devel-104
* messaging_dgm: Avoid a tallocVolker Lendecke2014-09-141-10/+10
| | | | | | | Not really required, but it removes a NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: Avoid a tallocVolker Lendecke2014-09-141-7/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: messaging_dgm_lockfile_remove does not use tmp_ctx anymoreVolker Lendecke2014-09-141-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: messaging_dgm_lockfile_create does not use tmp_ctx anymoreVolker Lendecke2014-09-141-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: Avoid talloc_tos()Volker Lendecke2014-09-141-56/+55
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: ReformattingVolker Lendecke2014-09-141-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: Remove an unnecessary castVolker Lendecke2014-09-141-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* namecache: fix uninitialised pointer returnsDavid Disseldorp2014-09-131-3/+3
| | | | | | | | | | asprintf_strupper_m() doesn't set *strp on error. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Sep 13 03:21:39 CEST 2014 on sn-devel-104
* docs: mention incompatibility between kernel oplocks and streams_xattrBjörn Jacke2014-09-121-0/+4
| | | | | | | | | See BUG https://bugzilla.samba.org/show_bug.cgi?id=7537 for details. Signed-off-by: Bjoern Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Sep 12 18:29:37 CEST 2014 on sn-devel-104
* ntvfs: Skip the new smb2.oplock.batch26 testVolker Lendecke2014-09-121-0/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Sep 12 14:39:00 CEST 2014 on sn-devel-104
* Adding new oplock test 'batch26'.Hemanth Thummala2014-09-121-0/+81
| | | | | | Signed-off-by: Hemanth Thummala <hemanth.thummala@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: streams - Ensure share mode validation ignores internal opens ↵Volker Lendecke2014-09-121-1/+6
| | | | | | | | | | | (op_mid == 0). Fixes bug 10797 - smbd panic at find_oplock_types https://bugzilla.samba.org/show_bug.cgi?id=10797 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ctdb-doc: Add reference to new magepage ctdb-statisticsAmitay Isaacs2014-09-122-2/+15
| | | | | | | | 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): Fri Sep 12 11:13:56 CEST 2014 on sn-devel-104
* ctdb-doc: Add ctdb-statistics manual pageAmitay Isaacs2014-09-124-1/+674
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Decrement pending calls statistics when calls are deferredAmitay Isaacs2014-09-121-0/+3
| | | | | | | | Deferred calls should not be treated as pending calls since they are re-processed from the beginning. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Do not expect real-time priority when running local daemonsAmitay Isaacs2014-09-121-1/+1
| | | | | | | Local daemons are started mainly for testing and usually not as root. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Make sure ctdb runs with real-time priorityAmitay Isaacs2014-09-124-7/+16
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-locking: Fork lock helper with vfork_with_logging()Martin Schwenke2014-09-122-41/+35
| | | | | | | | | | | | Otherwise errors printed by the lock helper get lost. lock_helper_args() no longer adds the program name to the list of arguments, since vfork_with_logging() does that. Update the lock helper to handle the extra log_fd parameter passed by vfork_with_logging() and send stdout/stderr there. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-locking: Add argc parameter to lock_helper_args()Martin Schwenke2014-09-121-12/+16
| | | | | | | | | | | To make this sane, also add an argv parameter and change the return type to bool. Anticipating a subsequent change, make the type of argv match what is needed by vfork_with_logging() and cast it when passing to execv(). This also means changing the type of the name member of struct db_namelist. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* media_harmony: Fix a crash bugVolker Lendecke2014-09-121-2/+2
| | | | | | | | | | | | Now that the dust has settled, fix a crash bug that was hidden behind the warnings... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 12 02:45:40 CEST 2014 on sn-devel-104
* media_harmony: Fix warningsVolker Lendecke2014-09-121-12/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbd - open logic fix.Jeremy Allison2014-09-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | As we atomically create using O_CREAT|O_EXCL, then if new_file_created is true, then file_existed *MUST* have been false (even if the file was previously detected as being there. We use the variable file_existed again in logic below this statement, so we must set file_existed = false, if new_file_created returns are true from open_file(). Based on a fix from Michael Adam. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10809 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Sep 11 22:29:22 CEST 2014 on sn-devel-104
* ctdb-locking: Set real-time priority for lock helpersAmitay Isaacs2014-09-111-0/+2
| | | | | | | | | | | | | | | | | To avoid lock helper starvation when userspace robust mutexes are enabled. Commit 6f072f85a138f595494dbec137bcf23d1e666acc removed reset_scheduler(), to avoid resetting scheduler priority. However, that is not sufficient because of commit 1be8564e553ce044426dbe7b3987edf514832940, which sets SCHED_RESET_ON_FORK flag. With SCHED_RESET_ON_FORK, all CTDB child processes will automatically have normal scheduling priority. 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): Thu Sep 11 11:31:10 CEST 2014 on sn-devel-104
* ctdb-daemon: Increment pending calls statistics correctlyAmitay Isaacs2014-09-111-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* torture: Provide enough space for test EA name in raw.eas testAndrew Bartlett2014-09-111-1/+1
| | | | | | | | | | | | | | | | The issue is that previously bad_ea_name[5] was the last element on the array, and so when we later did a strlen() on it, we read past the end of the stack array. We need bad_ea_name[5] to be the second-last element, followed by the \0 placed there by the strlcpy(). Found by AddressSanitizer Change-Id: I871c08200aa2591c612dfa44da92b83132f83d88 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): Thu Sep 11 08:50:16 CEST 2014 on sn-devel-104
* ctdb-build: Remove unnecessary lib/util include path from testsMartin Schwenke2014-09-111-3/+3
| | | | | | | | 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 Sep 11 06:22:33 CEST 2014 on sn-devel-104
* ctdb-util: Clean up dependenciesMartin Schwenke2014-09-111-2/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-includes: Remove some unnecessary declarationsMartin Schwenke2014-09-112-5/+0
| | | | | | | | To accommodate removing file_lines_load() from here, drop the #ifdef around the declaration in util.h. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* vfs_acl_common: dacl size must be updatedRalph Boehme2014-09-111-0/+3
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 11 03:54:42 CEST 2014 on sn-devel-104
* s3: smbd: Ensure we don't call qsort() with a size of -1.Jeremy Allison2014-09-111-16/+16
| | | | | | | | | | | Based on a patch idea from Ken Harris <kharris@mathworks.com> Fixes bug 10798 - crash in source3/smbd/notify.c https://bugzilla.samba.org/show_bug.cgi?id=10798 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>