diff options
Diffstat (limited to 'source3/lib/popt_common.c')
-rw-r--r-- | source3/lib/popt_common.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 5a9d39d181..7f7d23fa00 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -71,10 +71,19 @@ static void popt_common_callback(poptContext con, } if (reason == POPT_CALLBACK_REASON_POST) { - if (!PrintSambaVersionString) return; - printf( "Version %s\n", SAMBA_VERSION_STRING); - exit(0); + if (PrintSambaVersionString) { + printf( "Version %s\n", SAMBA_VERSION_STRING); + exit(0); + } + + if (is_default_dyn_CONFIGFILE()) { + if(getenv("SMB_CONF_PATH")) { + set_dyn_CONFIGFILE(getenv("SMB_CONF_PATH")); + } + } + + /* Further 'every Samba program must do this' hooks here. */ return; } |