int lp_lock_spin_time(void);
int lp_usershare_max_shares(void);
const char *lp_socket_options(void);
-int lp_config_backend(void);
char *lp_preexec(int );
char *lp_postexec(int );
char *lp_rootpreexec(int );
bool lp_invert_boolean(const char *str, const char **inverse_str);
bool lp_canonicalize_boolean(const char *str, const char**canon_str);
bool service_ok(int iService);
-bool lp_config_backend_is_registry(void);
-bool lp_config_backend_is_file(void);
bool lp_source_list_changed(void);
bool lp_idmap_uid(uid_t *low, uid_t *high);
bool lp_idmap_gid(gid_t *low, gid_t *high);
*/
static bool allow_messaging_sources = true;
-#define CONFIG_BACKEND_FILE 0
-#define CONFIG_BACKEND_REGISTRY 1
-
-static int config_backend = CONFIG_BACKEND_FILE;
-
/**
* a lists of config sources with attached smbconf contexts.
*/
* This structure describes global (ie., server-wide) parameters.
*/
struct global {
- int ConfigBackend;
char *smb_ports;
char *dos_charset;
char *unix_charset;
{-1, NULL}
};
-/* Config backend options */
-
-static const struct enum_list enum_config_backend[] = {
- {CONFIG_BACKEND_FILE, "file"},
- {CONFIG_BACKEND_REGISTRY, "registry"},
- {-1, NULL}
-};
-
/* Note: We do not initialise the defaults union - it is not allowed in ANSI C
*
* The FLAG_HIDE is explicit. Paramters set this way do NOT appear in any edit
.enum_list = NULL,
.flags = FLAG_ADVANCED | FLAG_WIZARD,
},
- {
- .label = "config backend",
- .type = P_ENUM,
- .p_class = P_GLOBAL,
- .ptr = &Globals.ConfigBackend,
- .special = NULL,
- .enum_list = enum_config_backend,
- .flags = FLAG_ADVANCED,
- },
{N_("Security Options"), P_SEP, P_SEPARATOR},
Globals.bLoadPrinters = True;
Globals.PrintcapCacheTime = 750; /* 12.5 minutes */
- Globals.ConfigBackend = config_backend;
-
/* Was 65535 (0xFFFF). 0x4101 matches W2K and causes major speed improvements... */
/* Discovered by 2 days of pain by Don McCall @ HP :-). */
Globals.max_xmit = 0x4104;
FN_GLOBAL_INTEGER(lp_lock_spin_time, &Globals.iLockSpinTime)
FN_GLOBAL_INTEGER(lp_usershare_max_shares, &Globals.iUsershareMaxShares)
FN_GLOBAL_CONST_STRING(lp_socket_options, &Globals.szSocketOptions)
-FN_GLOBAL_INTEGER(lp_config_backend, &Globals.ConfigBackend)
FN_LOCAL_STRING(lp_preexec, szPreExec)
FN_LOCAL_STRING(lp_postexec, szPostExec)
return true;
}
-/**
- * Utility function for outsiders to check if we're running on registry.
- */
-bool lp_config_backend_is_registry(void)
-{
- return (lp_config_backend() == CONFIG_BACKEND_REGISTRY);
-}
-
-/**
- * Utility function to check if the config backend is FILE.
- */
-bool lp_config_backend_is_file(void)
-{
- return (lp_config_backend() == CONFIG_BACKEND_FILE);
-}
-
/***************************************************************************
Run standard_sub_basic on netbios name... needed because global_myname
is not accessed through any lp_ macro.