The branch, master has been updated via 0806ff7 s4:samba: Fix default to be running samba as a deamon via 38ed592 doc/ctdb: fix two typos via 3efc879 dns_server: Do the exact match query first, then do the wildcard lookup via 948791a dns_server: Do not look for a wildcard for @ via 071ad56 dns_server: Use the indexed "name" attribute in wildcard lookup from 93a5dce winbind: Fix backslash in format string
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 0806ff7dfd3f982226e4cd9b923a0e570b765f0c Author: Andrew Bartlett <abart...@samba.org> Date: Tue Dec 19 16:30:08 2017 +1300 s4:samba: Fix default to be running samba as a deamon Commit 8736013dc42c5755b75bbb2e843a290bcd545909 got the (confusing) sense of opt_fork wrong. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13129 Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Garming Sam <garm...@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Tue Dec 19 11:24:29 CET 2017 on sn-devel-144 commit 38ed5920764d1490bfa4201f62d61cbcd8d8166e Author: Björn Baumbach <b...@sernet.de> Date: Mon Dec 18 10:48:54 2017 +0100 doc/ctdb: fix two typos Signed-off-by: Björn Baumbach <b...@sernet.de> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 3efc879d98ba136d4d70e0e2d77fac9614186ab3 Author: Andrew Bartlett <abart...@samba.org> Date: Fri Dec 15 12:30:50 2017 +1300 dns_server: Do the exact match query first, then do the wildcard lookup The wildcard lookup is SCOPE_ONELEVEL combined with an index on the name attribute. This is not as efficient as a base DN lookup, so we try for that first. A not-found and wildcard response will still fall back to the ONELEVEL index. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13191 Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Garming Sam <garm...@catalyst.net.nz> commit 948791aca70ca973755adcef27dc02da4c46f267 Author: Andrew Bartlett <abart...@samba.org> Date: Fri Dec 15 11:40:28 2017 +1300 dns_server: Do not look for a wildcard for @ This query is made for every record returned via BIND9 DLZ. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13191 Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Garming Sam <garm...@catalyst.net.nz> commit 071ad56aef33c2bfb3840e1a114e17272e926890 Author: Andrew Bartlett <abart...@samba.org> Date: Mon Dec 18 16:22:23 2017 +1300 dns_server: Use the indexed "name" attribute in wildcard lookup (the RDN, being 'dc' in this use case, does not have an index in the AD schema). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13191 Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Garming Sam <garm...@catalyst.net.nz> ----------------------------------------------------------------------- Summary of changes: ctdb/doc/ctdb.7.xml | 4 ++-- source4/dns_server/dnsserver_common.c | 36 ++++++++++++++++++++++++++++------- source4/smbd/server.c | 2 +- 3 files changed, 32 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/doc/ctdb.7.xml b/ctdb/doc/ctdb.7.xml index db0a627..5f5332e 100644 --- a/ctdb/doc/ctdb.7.xml +++ b/ctdb/doc/ctdb.7.xml @@ -501,7 +501,7 @@ Node 3:/usr/local/etc/ctdb/public_addresses the internal network to one of the nodes that LVS is using. When responding to the client, that node will send the data back directly to the client, bypassing the LVS master node. The - command <command>ctdb lvsmaster</command> will show which node + command <command>ctdb lvs master</command> will show which node is the current LVS master. </para> @@ -539,7 +539,7 @@ Node 3:/usr/local/etc/ctdb/public_addresses multiplex. This means that you should not use LVS if your I/O pattern is write-intensive since you will be limited in the available network bandwidth that node can handle. LVS does work - wery well for read-intensive workloads where only smallish READ + very well for read-intensive workloads where only smallish READ requests are going through the LVSMASTER bottleneck and the majority of the traffic volume (the data in the read replies) goes straight from the processing node back to the clients. For diff --git a/source4/dns_server/dnsserver_common.c b/source4/dns_server/dnsserver_common.c index 217e65b..6c7ab80 100644 --- a/source4/dns_server/dnsserver_common.c +++ b/source4/dns_server/dnsserver_common.c @@ -305,6 +305,10 @@ static unsigned int number_of_labels(const struct ldb_val *name) { * * x.y.z -> (|(name=x.y.z)(name=\2a.y.z)(name=\2a.z)(name=\2a)) * + * The attribute 'name' is used as this is what the LDB index is on + * (the RDN, being 'dc' in this use case, does not have an index in + * the AD schema). + * * Returns NULL if unable to build the query. * * The first component of the DN is assumed to be the name being looked up @@ -318,7 +322,7 @@ static struct ldb_parse_tree *build_wildcard_query( { const struct ldb_val *name = NULL; /* The DNS name being queried */ - const char *attr = NULL; /* The attribute name */ + const char *attr = "name"; /* The attribute name */ struct ldb_parse_tree *query = NULL; /* The constructed query parse tree*/ struct ldb_parse_tree *wildcard_query = NULL; /* The parse tree for the @@ -326,12 +330,6 @@ static struct ldb_parse_tree *build_wildcard_query( entries */ int labels = 0; /* The number of labels in the name */ - attr = ldb_dn_get_rdn_name(dn); - if (attr == NULL) { - DBG_ERR("Unable to get rdn_name\n"); - return NULL; - } - name = ldb_dn_get_rdn_val(dn); if (name == NULL) { DBG_ERR("Unable to get domain name value\n"); @@ -547,6 +545,16 @@ WERROR dns_common_wildcard_lookup(struct ldb_context *samdb, return DNS_ERR(NAME_ERROR); } + /* Don't look for a wildcard for @ */ + if (name->length == 1 && name->data[0] == '@') { + return dns_common_lookup(samdb, + mem_ctx, + dn, + records, + num_records, + NULL); + } + werr = dns_name_check( mem_ctx, strlen((const char*)name->data), @@ -555,6 +563,20 @@ WERROR dns_common_wildcard_lookup(struct ldb_context *samdb, return werr; } + /* + * Do a point search first, then fall back to a wildcard + * lookup if it does not exist + */ + werr = dns_common_lookup(samdb, + mem_ctx, + dn, + records, + num_records, + NULL); + if (!W_ERROR_EQUAL(werr, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) { + return werr; + } + ret = dns_wildcard_lookup(samdb, mem_ctx, dn, &msg); if (ret == LDB_ERR_OPERATIONS_ERROR) { return DNS_ERR(SERVER_FAILURE); diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 006f76b..85dea26 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -450,7 +450,7 @@ static int binary_smbd_main(const char *binary_name, "not allowed together with -D|--daemon\n\n"); poptPrintUsage(pc, stderr, 0); return 1; - } else if (!opt_interactive && !opt_fork) { + } else if (!opt_interactive && opt_fork) { /* default is --daemon */ opt_daemon = true; } -- Samba Shared Repository