map untrusted to domain Deprecated
strict sync Default changed yes
+Removal of lpcfg_register_defaults_hook()
+-----------------------------------------
+
+The undocumented and unsupported function lpcfg_register_defaults_hook()
+that was used by external projects to call into Samba and modify
+smb.conf default parameter settings has been removed. If your project
+was using this call please raise the issue on
+samba-technical@lists.samba.org in order to design a supported
+way of obtaining the same functionality.
+
KNOWN ISSUES
============
return 0;
}
-struct defaults_hook_data {
- const char *name;
- lpcfg_defaults_hook hook;
- struct defaults_hook_data *prev, *next;
-} *defaults_hooks = NULL;
-
-
-bool lpcfg_register_defaults_hook(const char *name, lpcfg_defaults_hook hook)
-{
- struct defaults_hook_data *hook_data = talloc(talloc_autofree_context(),
- struct defaults_hook_data);
- hook_data->name = talloc_strdup(hook_data, name);
- hook_data->hook = hook;
- DLIST_ADD(defaults_hooks, hook_data);
- return false;
-}
-
/**
* Initialise the global parameter structure.
*
struct loadparm_context *lp_ctx;
struct parmlist_entry *parm;
char *logfile;
- struct defaults_hook_data *defaults_hook;
lp_ctx = talloc_zero(mem_ctx, struct loadparm_context);
if (lp_ctx == NULL)
"rpc server dynamic port range",
"49152-65535");
- /* Allow modules to adjust defaults */
- for (defaults_hook = defaults_hooks; defaults_hook;
- defaults_hook = defaults_hook->next) {
- bool ret;
-
- ret = defaults_hook->hook(lp_ctx);
- if (!ret) {
- DEBUG(1, ("Defaults hook %s failed to run.",
- defaults_hook->name));
- talloc_free(lp_ctx);
- return NULL;
- }
- }
-
for (i = 0; parm_table[i].label; i++) {
if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
lp_ctx->flags[i] |= FLAG_DEFAULT;
struct bitmap;
struct file_lists;
-typedef bool (*lpcfg_defaults_hook) (struct loadparm_context *);
-
#ifdef CONFIG_H_IS_FROM_SAMBA
#include "lib/param/param_proto.h"
#include "lib/param/param_functions.h"
struct dcerpc_server_info *lpcfg_dcerpc_server_info(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
struct gensec_settings *lpcfg_gensec_settings(TALLOC_CTX *, struct loadparm_context *);
-/* Hooks to override defaults.
- *
- * Every time a loadparm context is initialized, the hooks are
- * called on it, once Samba itself has set defaults.
- *
- * This allows modules to tweak defaults (before any smb.conf file or registry
- * is loaded). Usually they would do this by calling lpcfg_do_global_parameter
- * or lpcfg_do_service_parameter.
- *
- * A good use case for this is OpenChange, which by default enables its
- * DCE/RPC services when it is installed.
- * */
-bool lpcfg_register_defaults_hook(const char *name, lpcfg_defaults_hook hook);
-
/* The following definitions come from param/util.c */