summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:samba_dnsupdate: provide more substitution variables e.g. IF_RODCStefan Metzmacher2014-08-261-0/+57
| | | | | | | | | This will make the dns_update_list more flexible. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: don't try to be smart when verifying NS recordsStefan Metzmacher2014-08-261-19/+0
| | | | | | | | | | | We can't rely on the DNS delegation to be correct in the parent domain. What we really want is to check if we already have registered ourself as a NS record in our own domain. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: cache the already registered recordsStefan Metzmacher2014-08-263-17/+115
| | | | | | | | | | | This way we can delete records which are not used anymore. E.g. if the ip address changed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: fix dnsobj.__str__()Stefan Metzmacher2014-08-261-5/+5
| | | | | | | | | We should not implicitly use the global variable 'd'. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: don't lower case the registered namesStefan Metzmacher2014-08-261-5/+5
| | | | | | | | | This matches Windows... Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/join: use lowercase for the dnshostname.Stefan Metzmacher2014-08-261-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest/Samba3: also bind to ipv6Stefan Metzmacher2014-08-261-5/+12
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest/Samba4: also bind to ipv6Stefan Metzmacher2014-08-261-3/+21
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: export _IPV6 environment variablesStefan Metzmacher2014-08-262-0/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for nowStefan Metzmacher2014-08-261-0/+12
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/dns: add AAAA support to dns_hosts_file.cStefan Metzmacher2014-08-261-7/+16
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()Stefan Metzmacher2014-08-261-0/+2
| | | | | | | We don't have to keep everything arround while walking the whole zone. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: avoid some compiler warningsStefan Metzmacher2014-08-263-7/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: handle tombstones in handle_one_update()Stefan Metzmacher2014-08-261-16/+25
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()Stefan Metzmacher2014-08-261-4/+77
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: make sure dns_common_lookup() doesn't return tombstonesStefan Metzmacher2014-08-263-6/+53
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()Stefan Metzmacher2014-08-261-5/+15
| | | | | | | | | | The result is the same, but it is clearer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: split out dns_common_replace()Stefan Metzmacher2014-08-264-68/+90
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: remove const from dns_replace_records()Stefan Metzmacher2014-08-262-2/+2
| | | | | | | | | | All callers are find we the record array gets modified. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: split out dns_common_extract() and dns_common_lookup()Stefan Metzmacher2014-08-263-44/+92
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: split out a private 'dnsserver_common' libraryStefan Metzmacher2014-08-265-36/+105
| | | | | | | | | | | This will contain common code for the internal dns server, the dlz_bind9 module and the rpc dns management server. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXISTStefan Metzmacher2014-08-262-14/+24
| | | | | | | | | | | | | | | | This is the correct fix for commit 8b24c43b382740106474e26dec59e1419ba77306 and Bug: https://bugzilla.samba.org/show_bug.cgi?id=9559 With this change we have a consistent behavior between internal server and the bind dlz module. We keep a dangling LDAP object without dnsRecord attribute arround forever. This will be fixed in the following commits. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()Stefan Metzmacher2014-08-261-0/+2
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Properly initialize mangle_hashVolker Lendecke2014-08-261-0/+4
| | | | | | | | | | | | [Bug 10782] mangle_hash() can fail to initialize charset (smbd crash). https://bugzilla.samba.org/show_bug.cgi?id=10782 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 Aug 26 01:30:38 CEST 2014 on sn-devel-104
* passdb: fix NT_STATUS_NO_SUCH_GROUPArvid Requate2014-08-251-2/+2
| | | | | | | | | | | | | | | | Share options like "force group" and "valid users = @group1" triggered a NT_STATUS_NO_SUCH_GROUP. While the group was found in the SAM backend, its objectclass was not retrived. This fix also revealed a talloc access after free in the group branch of pdb_samba_dsdb_getgrfilter. [Bug 9570] Access failure for shares with "force group" or "valid users = @group" https://bugzilla.samba.org/show_bug.cgi?id=9570 Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Don't discard result of checking grouptypeRoel van Meer2014-08-231-2/+0
| | | | | | | | | | | | | | The pdb_samba_dsdb_getgrfilter() function first determines the security type of a group and sets map->sid_name_use accordingly. A little later, this variable is set again, undoing the previous work. https://bugzilla.samba.org/show_bug.cgi?id=10777 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): Sat Aug 23 02:48:52 CEST 2014 on sn-devel-104
* messaging3: Avoid messaging_is_self_sendVolker Lendecke2014-08-231-9/+6
| | | | | | | | | | | This was a bad API, and it was used in a buggy way: In messaging_dispatch_rec we always did the defer, we referenced the destination pid, not the source. In messaging_send_iov this is the right thing to do to reference the destination, but when we have arrived in messaging_dispatch_rec we should compare source and destination. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* 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>