--- /dev/null
+<samba:parameter name="async dns timeout"
+ context="G"
+ type="integer"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>The number of seconds the asynchronous DNS
+ resolver code in Samba will wait for responses.
+ Some of the Samba client library code uses internal
+ asynchronous DNS resolution for A and AAAA records
+ when trying to find Active Directory Domain controllers.
+ This value prevents this name resolution code from
+ waiting for DNS server timeouts.
+ </para>
+ <para>The minimum value of this parameter is clamped
+ at 1 second.
+ zero.</para>
+</description>
+
+<value type="default">10</value>
+<value type="example">20</value>
+</samba:parameter>
lpcfg_do_global_parameter(
lp_ctx, "ldap max search request size", "256000");
+ /* Async DNS query timeout in seconds. */
+ lpcfg_do_global_parameter(lp_ctx, "async dns timeout", "10");
+
for (i = 0; parm_table[i].label; i++) {
if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
lp_ctx->flags[i] |= FLAG_DEFAULT;
void widelinks_warning(int snum);
const char *lp_ncalrpc_dir(void);
void _lp_set_server_role(int server_role);
+uint32_t lp_get_async_dns_timeout(void);
/* The following definitions come from param/loadparm_ctx.c */
Globals.ldap_max_authenticated_request_size = 16777216;
Globals.ldap_max_search_request_size = 256000;
+ /* Async DNS query timeout (in seconds). */
+ Globals.async_dns_timeout = 10;
+
/* Now put back the settings that were set with lp_set_cmdline() */
apply_lp_set_cmdline();
}
return Globals.weak_crypto;
}
+
+uint32_t lp_get_async_dns_timeout(void)
+{
+ uint32_t val = Globals.async_dns_timeout;
+ /*
+ * Clamp minimum async dns timeout to 1 second
+ * as per the man page.
+ */
+ if (val < 1) {
+ val = 1;
+ }
+ return val;
+}