This parameter is renamed because it does not normally return the current smb.conf file, but
instead returns the next one, as found in a config file = directive, to be loaded.
This avoids a conflict with the lpcfg_configfile from lib/param, which does refer to the
current smb.conf path.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Michael Adam <obnox@samba.org>
context="G"
type="string"
hide="1"
- generated_function="0"
+ function="next_configfile"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>This allows you to override the config file
#define LOADPARM_EXTRA_GLOBALS \
struct parmlist_entry *param_opt; \
char *realm_original; \
- char *szConfigFile; \
int iminreceivefile; \
char *szPrintcapname; \
int CupsEncrypt; \
.label = "config file",
.type = P_STRING,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(szConfigFile),
+ .offset = GLOBAL_VAR(next_configfile),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_HIDE|FLAG_META,
#include "source3/param/param_proto.h"
-char *lp_configfile(TALLOC_CTX *ctx);
char *lp_servicename(TALLOC_CTX *ctx, int);
const char *lp_const_servicename(int);
bool lp_autoloaded(int);
set_remote_machine_name("nmbd", False);
if ( lp_loaded() ) {
- char *fname = lp_configfile(talloc_tos());
+ char *fname = lp_next_configfile(talloc_tos());
if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
set_dyn_CONFIGFILE(fname);
test = False;
/* These functions remain in source3/param for now */
-FN_GLOBAL_STRING(configfile, szConfigFile)
-
#include "lib/param/param_functions.c"
FN_LOCAL_STRING(servicename, szService)
bool ret;
if (lp_loaded()) {
- char *fname = lp_configfile(talloc_tos());
+ char *fname = lp_next_configfile(talloc_tos());
if (file_exist(fname) &&
!strcsequal(fname, get_dyn_CONFIGFILE())) {
set_dyn_CONFIGFILE(fname);
bool ret;
if (lp_loaded()) {
- char *fname = lp_configfile(talloc_tos());
+ char *fname = lp_next_configfile(talloc_tos());
if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
set_dyn_CONFIGFILE(fname);