};
-struct loadparm_context *global_loadparm = NULL;
-
#define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
lp_do_global_parameter(lp_ctx, "ntvfs handler", "unixuid default");
lp_do_global_parameter(lp_ctx, "max connections", "-1");
- lp_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg dssetup unixinfo");
+ lp_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg dssetup unixinfo browser");
lp_do_global_parameter(lp_ctx, "server services", "smb rpc nbt wrepl ldap cldap kdc drepl winbind ntp_signd");
lp_do_global_parameter(lp_ctx, "ntptr providor", "simple_ldb");
lp_do_global_parameter(lp_ctx, "auth methods:domain controller", "anonymous sam_ignoredomain");
bool lp_load_default(struct loadparm_context *lp_ctx)
{
+ const char *path;
if (getenv("SMB_CONF_PATH"))
- return lp_load(lp_ctx, getenv("SMB_CONF_PATH"));
+ path = getenv("SMB_CONF_PATH");
else
- return lp_load(lp_ctx, dyn_CONFIGFILE);
+ path = dyn_CONFIGFILE;
+
+ if (!file_exist(path)) {
+ /* We allow the default smb.conf file to not exist,
+ * basically the equivalent of an empty file. */
+ return true;
+ }
+
+ return lp_load(lp_ctx, path);
}
/**
reload_charcnv(lp_ctx);
- ntstatus_check_dos_mapping = lp_nt_status_support(lp_ctx);
+ /* FIXME: ntstatus_check_dos_mapping = lp_nt_status_support(lp_ctx); */
/* FIXME: This is a bit of a hack, but we can't use a global, since
* not everything that uses lp also uses the socket library */
struct gensec_settings *settings = talloc(mem_ctx, struct gensec_settings);
if (settings == NULL)
return NULL;
+ SMB_ASSERT(lp_ctx != NULL);
settings->lp_ctx = talloc_reference(settings, lp_ctx);
settings->iconv_convenience = lp_iconv_convenience(lp_ctx);
settings->target_hostname = lp_parm_string(lp_ctx, NULL, "gensec", "target_hostname");