summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: Introduce server_id_same_process()Volker Lendecke2014-08-232-5/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* pthreadpool: Slightly serialize jobsVolker Lendecke2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Using the new msg_source program with 1.500 instances against a single msg_sink I found the msg_source process to spawn two worker threads for synchronously sending the data towards the receiving socket. This should not happen: Per destination node we only create one queue. We strictly only add pthreadpool jobs one after the other, so a single helper thread should be perfectly sufficient. It turned out that under heavy overload the main sending thread was scheduled before the thread that just had finished its send() job. So the helper thread was not able to increment the pool->num_idle variable indicating that we don't have to create a new thread when the new job is added. This patch moves the signalling write under the mutex. This means that indicating readiness via the pipe and the pool->num_idle variable happen both under the same mutex lock and thus are atomic. No superfluous threads anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Add msg_sink/source -- perftestVolker Lendecke2014-08-233-0/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | With this pair of programs I did some performance tests of the messaging system. Guess what -- I found two bugs :-) See the subsequent patches. With 1500 msg_source processes I can generate message overload: A Intel(R) Xeon(R) CPU L5640 @ 2.27GHz can receive roughly 100k messages per second. When using messaging_read_send/recv user/system time is roughly even, a bit more work done in user space. When using messaging_register, due to less malloc activity, user space chews a lot less. By the way: 1.500 helper threads in a blocking sendto() against a single datagram socket reading as fast as it can (with epoll_wait in between) only drove the loadavg to 12 on a 24-core machine. So I guess unix domain datagram sockets are pretty well protected against overload. No thundering herd or so. Interestingly "top" showed msg_sink at less than 90% CPU, although it was clearly the bottleneck. But that must be a "top" artifact. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest/Samba4: avoid warnings about 'path' not specified on 'ntvfs handler ↵Stefan Metzmacher2014-08-231-0/+2
| | | | | | | = cifs' shares Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Fix cleanup2 to utilize on-demand cleanupVolker Lendecke2014-08-231-16/+3
| | | | | | | | | Now we check the cleanup when conflicts happen, not when we first open the file. This means we don't have to re-open the connection to make cleanup happen. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Run the cleanup2 test against 2 nodesVolker Lendecke2014-08-231-1/+1
| | | | | | | This enables testing the brlock cleanup across ctdb Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* brlock: Remove validate_lock_entriesVolker Lendecke2014-08-231-94/+1
| | | | | | | | | This is now only called during brl_forall. It does not really hurt if we list dead processes here. If the upper layers really care, they can filter it out themselves. The real lock conflicts are not removed on-demand. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* brlock: Do auto-cleanup at conflict timeVolker Lendecke2014-08-234-48/+57
| | | | | | | This avoids the need to do sweeping validate_lock_entries calls Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: POSIX ACLs. Remove incorrect check for SECINFO_PROTECTED_DACL in ↵Jeremy Allison2014-08-221-5/+1
| | | | | | | | | | | | | | | incoming security_information flags in posix_get_nt_acl_common(). Tidy-up of code obsoleted by fixes for bug #10773 (SECINFO_PROTECTED_DACL is not ignored). We now never pass SECINFO_PROTECTED_DACL in security_information flags to this layer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 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): Fri Aug 22 11:26:57 CEST 2014 on sn-devel-104
* messaging_dgm: Factor out messaging_dgm_lockfile_nameVolker Lendecke2014-08-221-9/+15
| | | | | | | | 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 Aug 22 05:20:43 CEST 2014 on sn-devel-104
* messaging_dgm: Use %ju to fill lockfileVolker Lendecke2014-08-221-1/+1
| | | | | | | | | ... much nicer than PRIu64 Also, append a \n. Makes it better readable when looking at the lockfile Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli/security: add better detection of SECINFO_[UN]PROTECTED_[D|S]ACL in ↵Stefan Metzmacher2014-08-221-16/+20
| | | | | | | | | | | | get_sec_info() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Aug 22 02:52:50 CEST 2014 on sn-devel-104
* s3:smbd: mask security_information input values with SMB_SUPPORTED_SECINFO_FLAGSStefan Metzmacher2014-08-224-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes Windows clients doesn't filter SECINFO_[UN]PROTECTED_[D|S]ACL flags before sending the security_information to the server. security_information = SECINFO_PROTECTED_DACL| SECINFO_DACL results in a NULL dacl being returned from an GetSecurityDecriptor request. This happens because posix_get_nt_acl_common() has the following logic: if ((security_info & SECINFO_DACL) && !(security_info & SECINFO_PROTECTED_DACL)) { ... create DACL ... } I'm not sure if the logic is correct or wrong in this place (I guess it's wrong...). But what I know is that the SMB server should filter the given security_information flags before passing to the filesystem. [MS-SMB2] 3.3.5.20.3 Handling SMB2_0_INFO_SECURITY ... The server MUST ignore any flag value in the AdditionalInformation field that is not specified in section 2.2.37. Section 2.2.37 lists: OWNER_SECURITY_INFORMATION GROUP_SECURITY_INFORMATION DACL_SECURITY_INFORMATION SACL_SECURITY_INFORMATION LABEL_SECURITY_INFORMATION ATTRIBUTE_SECURITY_INFORMATION SCOPE_SECURITY_INFORMATION BACKUP_SECURITY_INFORMATION Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* security.idl: add SMB_SUPPORTED_SECINFO_FLAGSStefan Metzmacher2014-08-221-0/+18
| | | | | | | | | | A SMB server should only care about specific SECINFO flags and ignore others e.g. SECINFO_PROTECTED_DACL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:libsmb: Set a max charge for SMB2 connectionsRoss Lagerwall2014-08-211-0/+5
| | | | | | | | | | | | Set a max charge for SMB2 connections so that larger request sizes can be used and more requests can be in flight. Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Aug 21 17:31:11 CEST 2014 on sn-devel-104
* smbcontrol: Fix a typoVolker Lendecke2014-08-211-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <Ira@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Aug 21 14:58:37 CEST 2014 on sn-devel-104
* smbd: Only DEBUG errors from messaging_cleanupVolker Lendecke2014-08-211-2/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie sahlberg <ronniesahlberg@gmail.com>
* messaging3: Don't print a message if there's nothing to clean upVolker Lendecke2014-08-211-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie sahlberg <ronniesahlberg@gmail.com>
* lib: Check socket length in ctdbd_connectVolker Lendecke2014-08-211-1/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie sahlberg <ronniesahlberg@gmail.com>
* s4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filterAmitay Isaacs2014-08-211-1/+1
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Aug 21 11:36:55 CEST 2014 on sn-devel-104
* s4-rpc: dnsserver: Correctly set rank for glue NS recordsAmitay Isaacs2014-08-211-3/+6
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-build: Add missing dependency on poptAmitay Isaacs2014-08-211-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-build: Remove unnecessary third_party symlinkAmitay Isaacs2014-08-211-1/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ldb: Fix check for third_partyAmitay Isaacs2014-08-211-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: Correctly locate the 'third_party' directoryAmitay Isaacs2014-08-211-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-build: Avoid unused variable warning in output from rpcgenMartin Schwenke2014-08-211-1/+3
| | | | | | | | | | | | | | | default/ctdb/utils/smnotify/gen_xdr.c: In function ‘xdr_status’: default/ctdb/utils/smnotify/gen_xdr.c:11:20: warning: unused variable ‘buf’ [-Wunused-variable] register int32_t *buf; ^ When generating the code, change it to assign the variable to itself. 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 Aug 21 07:11:02 CEST 2014 on sn-devel-104
* ctdb-daemon: Fix some strict-aliasing warningsMartin Schwenke2014-08-212-3/+5
| | | | | | | | | | | | | | Seeing these with -Wall: ../server/ctdb_call.c:1117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] record_flags = *(uint32_t *)&c->data[c->keylen + c->datalen]; ^ memcpy() seems to be the easiest way to get fix these. The alternative would be to use unmarshalling functions. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Fix warning about ignored result from system()Martin Schwenke2014-08-211-2/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb: Use sys_read() and sys_write() to ensure correct signal interactionMartin Schwenke2014-08-2115-48/+50
| | | | | | | ... and avoid compiler warnings in some cases. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Copy functions sys_read() and sys_write() from source3Martin Schwenke2014-08-212-0/+37
| | | | | | | | | We really should extricate these from source3 and into some common code. However, just copy them for now to help get rid of a lot of warnings. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tools: Be more helpful when CTDB CLI tool is run on unconfigured nodeMartin Schwenke2014-08-211-0/+7
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tools: Factor out new function find_node_xpnn() from control_xpnn()Martin Schwenke2014-08-211-5/+17
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* replace: Remove unused item returned by FAILED()Martin Schwenke2014-08-201-1/+1
| | | | | | | | | | | | | | | | | | The (return) value of FAILED() is a constant 1. However, it is never used, so the compiler complains when run with -Wall: lib/replace/test/os2_delete.c: In function ‘cleanup’: lib/replace/test/os2_delete.c:39:163: warning: right-hand operand of comma expression has no effect [-Wunused-value] FAILED("system"); So just get remove the ", 1" since it is the bit that does nothing and is never used. 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): Wed Aug 20 16:54:31 CEST 2014 on sn-devel-104
* s4:torture:vfs_fruit: add tests for resource fork IORalph Boehme2014-08-181-0/+110
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Aug 18 20:08:32 CEST 2014 on sn-devel-104
* s4:torture:vfs_fruit: add test writing Netatalk metadataRalph Boehme2014-08-181-0/+138
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture:vfs_fruit: add test reading Netatalk metadataRalph Boehme2014-08-182-2/+355
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: add boilerplate code for vfs_fruitRalph Boehme2014-08-185-1/+68
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: add wrapper functionsRalph Boehme2014-08-181-0/+77
| | | | | | | | | Add wrapper functions that connect two trees with sharenames taken from passed option. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: add boilerplate code for testing specific VFS modulesRalph Boehme2014-08-182-1/+46
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture:smb2: add utility function torture_smb2_con_sopt()Ralph Boehme2014-08-181-0/+42
| | | | | | | | | | Add a utility function that takes an option name as parameter and then uses the value of the option 'torture:NAME' as share name in a tree connect. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs_fruit: add manpageRalph Boehme2014-08-182-0/+184
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* New VFS module vfs_fruitRalph Boehme2014-08-183-1/+2954
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This module provides enhanced compatibility with Apple SMB clients and interoperability with a Netatalk 3 AFP fileserver. The module intercepts the OS X special streams "AFP_AfpInfo" and "AFP_Resource" and handles them in a special way. All other named streams are deferred to vfs_streams_xattr. The OS X client maps all NTFS illegal characters to the Unicode private range. This module optionally stores the charcters using their native ASCII encoding. Open modes are optionally checked against Netatalk AFP share modes. The "AFP_AfpInfo" named stream is a binary blob containing OS X extended metadata for files and directories. This module optionally reads and stores this metadata in a way compatible with Netatalk 3 which stores the metadata in an EA "org.netatalk.metadata". Cf source3/include/MacExtensions.h for a description of the binary blobs content. The "AFP_Resource" named stream may be arbitrarily large, thus it can't be stored in an EA on most filesystem. ZFS on Solaris is an exception to the rule, because it there EAs can be of any size and EAs are first-class filesystem objects that can be used with normal file syscalls like open(), read(), write(), fcntl() asf. This module stores the AFP_Resource stream in an AppleDouble file, prepending "._" to the filename. On Solaris and ZFS the stream is optionally stored in an EA "org.netatalk.ResourceFork". Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Fix AFP_BackupTime byte order and use ISO C99 integer typesRalph Boehme2014-08-181-5/+5
| | | | | | | | | AFP_BackupTime value must be 0x80000000 and all existing defines use native byte order, not byte swapped. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: use torture_assert instead of torture_comment and return in ↵Michael Adam2014-08-181-5/+11
| | | | | | | | | | | | defer_open test The fix missed one instance, as autobuild has just told me... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Aug 18 17:42:00 CEST 2014 on sn-devel-104
* build: fix configure to honour --without-dmapiMichael Adam2014-08-181-28/+44
| | | | | | | | | | | | Previously, --without-dmapi would still autodetect and link a useable dmapi library. This change allows to build without dmapi support even when a dmapi library is found. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10369 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tdbtorture: print details when run with -n 1David Disseldorp2014-08-181-4/+4
| | | | | | | | | | | | | Currently tdbtorture prints the test details (processes, loops, etc.) from the first forked child process. When run with -n 1 (one process), the test is run from within the parent and no details are printed. This change ensures that they are. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Aug 18 13:26:32 CEST 2014 on sn-devel-104
* dsdb: Also redact the clearTextPassword input-only attributeAndrew Bartlett2014-08-161-1/+2
| | | | | | | | | | | | | | | | | We go to a great deal of effort to avoid administrators posting their passwords in Samba logs, and one of the ways we do that is to remove them from internal ldif dumps Samba produces while operating as an AD DC. clearTextPassword is not a real attribute, but it functions as one for an input path. Change-Id: Iaacf3354fc9bfff18d6774f49b17a9ba962347d5 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Aug 16 01:05:07 CEST 2014 on sn-devel-104
* lib: Remove parser code, now replaced with tini parser.Volker Lendecke2014-08-151-508/+2
| | | | | | | | 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 Aug 15 20:34:56 CEST 2014 on sn-devel-104
* librpc: Remove obsolete idl-deps script.Jelmer Vernooij2014-08-151-37/+0
| | | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 15 05:47:51 CEST 2014 on sn-devel-104
* Remove iniparser.Jeremy Allison2014-08-1427-3524/+0
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 14 23:52:07 CEST 2014 on sn-devel-104