#include "libcli/smb/smb_constants.h"
#include "tdb.h"
#include "librpc/gen_ndr/nbt.h"
+#include "libds/common/roles.h"
#ifdef HAVE_HTTPCONNECTENCRYPT
#include <cups/http.h>
return strtoul(s, NULL, 0);
}
+/**
+ * convenience routine to return unsigned long long parameters.
+ */
+unsigned long long lp_ulonglong(const char *s)
+{
+
+ if (!s || !*s) {
+ DEBUG(0, ("lp_ulonglong(%s): is called with NULL!\n", s));
+ return -1;
+ }
+
+ return strtoull(s, NULL, 0);
+}
+
/**
* convenience routine to return unsigned long parameters.
*/
return default_v;
}
+/**
+ * Return parametric option from a given service.
+ * Type is a part of option before ':'
+ * Parametric option has following syntax: 'Type: option = value'
+ */
+unsigned long long lpcfg_parm_ulonglong(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service,
+ const char *type, const char *option,
+ unsigned long long default_v)
+{
+ const char *value = lpcfg_get_parametric(lp_ctx, service, type, option);
+
+ if (value) {
+ return lp_ulonglong(value);
+ }
+
+ return default_v;
+}
+
long lpcfg_parm_long(struct loadparm_context *lp_ctx,
struct loadparm_service *service, const char *type,
const char *option, long default_v)
const char *pszParmValue, char **ptr)
{
char *fname;
+ const char *substitution_variable_substring;
+ char next_char;
if (lp_ctx->s3_fns) {
return lp_ctx->s3_fns->lp_include(lp_ctx, service, pszParmValue, ptr);
if (file_exist(fname))
return pm_process(fname, do_section, lpcfg_do_parameter, lp_ctx);
+ /*
+ * If the file doesn't exist, we check that it isn't due to variable
+ * substitution
+ */
+ substitution_variable_substring = strchr(fname, '%');
+
+ if (substitution_variable_substring != NULL) {
+ next_char = substitution_variable_substring[1];
+ if ((next_char >= 'a' && next_char <= 'z')
+ || (next_char >= 'A' && next_char <= 'Z')) {
+ DEBUG(2, ("Tried to load %s but variable substitution in "
+ "filename, ignoring file.\n", fname));
+ return true;
+ }
+ }
+
DEBUG(2, ("Can't find include file %s\n", fname));
return false;
lpcfg_do_global_parameter(lp_ctx, "ClientNTLMv2Auth", "True");
lpcfg_do_global_parameter(lp_ctx, "LanmanAuth", "False");
lpcfg_do_global_parameter(lp_ctx, "NTLMAuth", "True");
+ lpcfg_do_global_parameter(lp_ctx, "RawNTLMv2Auth", "False");
lpcfg_do_global_parameter(lp_ctx, "client use spnego principal", "False");
lpcfg_do_global_parameter(lp_ctx, "UnixExtensions", "True");
lpcfg_do_global_parameter(lp_ctx, "allocation roundup size", "1048576");
- lpcfg_do_global_parameter(lp_ctx, "ldap page size", "1024");
+ lpcfg_do_global_parameter(lp_ctx, "ldap page size", "1000");
lpcfg_do_global_parameter(lp_ctx, "kernel share modes", "yes");
lpcfg_do_global_parameter(lp_ctx, "client ldap sasl wrapping", "sign");
+ lpcfg_do_global_parameter(lp_ctx, "ldap server require strong auth", "no");
+
lpcfg_do_global_parameter(lp_ctx, "follow symlinks", "yes");
lpcfg_do_global_parameter(lp_ctx, "machine password timeout", "604800");