type="string"
function="logfile"
handler="handle_logfile"
+ substitution="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>
.debug_uid = lp_debug_uid(),
.debug_class = lp_debug_class(),
};
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
- debug_set_logfile(lp_logfile(talloc_tos()));
+ debug_set_logfile(lp_logfile(talloc_tos(), lp_sub));
debug_parse_levels(lp_log_level(talloc_tos()));
debug_set_settings(&settings,
lp_logging(talloc_tos()),
}
if (override_logfile) {
- char *logfile = lp_logfile(mem_ctx);
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *logfile = lp_logfile(mem_ctx, lp_sub);
if (logfile == NULL) {
talloc_free(mem_ctx);
exit(1);
POPT_COMMON_SAMBA
POPT_TABLEEND
};
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
TALLOC_CTX *frame;
NTSTATUS status;
bool ok;
}
fault_setup();
- dump_core_setup("nmbd", lp_logfile(talloc_tos()));
+ dump_core_setup("nmbd", lp_logfile(talloc_tos(), lp_sub));
/* POSIX demands that signals are inherited. If the invoking process has
* these signals masked, we will have problems, as we won't receive them. */
static void spoolss_reopen_logs(int child_id)
{
- char *lfile = lp_logfile(talloc_tos());
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *lfile = lp_logfile(talloc_tos(), lp_sub);
char *ext;
int rc;
if (strstr(lfile, ext) == NULL) {
if (child_id) {
rc = asprintf(&lfile, "%s.%d",
- lp_logfile(talloc_tos()),
+ lp_logfile(talloc_tos(), lp_sub),
child_id);
} else {
rc = asprintf(&lfile, "%s.%s",
- lp_logfile(talloc_tos()),
+ lp_logfile(talloc_tos(), lp_sub),
ext);
}
}
static char *get_bq_logfile(void)
{
- char *lfile = lp_logfile(talloc_tos());
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *lfile = lp_logfile(talloc_tos(), lp_sub);
int rc;
if (lfile == NULL || lfile[0] == '\0') {
rc = asprintf(&lfile, "%s/log.%s.bq",
get_dyn_LOGFILEBASE(), DAEMON_NAME);
} else {
- rc = asprintf(&lfile, "%s.bq", lp_logfile(talloc_tos()));
+ rc = asprintf(&lfile, "%s.bq", lp_logfile(talloc_tos(), lp_sub));
}
if (rc == -1) {
lfile = NULL;
static void epmd_reopen_logs(void)
{
- char *lfile = lp_logfile(talloc_tos());
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *lfile = lp_logfile(talloc_tos(), lp_sub);
int rc;
if (lfile == NULL || lfile[0] == '\0') {
} else {
if (strstr(lfile, DAEMON_NAME) == NULL) {
rc = asprintf(&lfile, "%s.%s",
- lp_logfile(talloc_tos()), DAEMON_NAME);
+ lp_logfile(talloc_tos(), lp_sub), DAEMON_NAME);
if (rc > 0) {
lp_set_logfile(lfile);
SAFE_FREE(lfile);
static void fssd_reopen_logs(void)
{
- char *lfile = lp_logfile(NULL);
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *lfile = lp_logfile(NULL, lp_sub);
int rc;
if (lfile == NULL || lfile[0] == '\0') {
}
} else {
if (strstr(lfile, DAEMON_NAME) == NULL) {
- rc = asprintf(&lfile, "%s.%s", lp_logfile(NULL), DAEMON_NAME);
+ rc = asprintf(&lfile, "%s.%s", lp_logfile(NULL, lp_sub), DAEMON_NAME);
if (rc > 0) {
lp_set_logfile(lfile);
SAFE_FREE(lfile);
static void lsasd_reopen_logs(int child_id)
{
- char *lfile = lp_logfile(talloc_tos());
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *lfile = lp_logfile(talloc_tos(), lp_sub);
char *extension;
int rc;
if (strstr(lfile, extension) == NULL) {
if (child_id) {
rc = asprintf(&lfile, "%s.%d",
- lp_logfile(talloc_tos()),
+ lp_logfile(talloc_tos(), lp_sub),
child_id);
} else {
rc = asprintf(&lfile, "%s.%s",
- lp_logfile(talloc_tos()),
+ lp_logfile(talloc_tos(), lp_sub),
extension);
}
}
struct tevent_signal *se;
int profiling_level;
char *np_dir = NULL;
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
static const struct smbd_shim smbd_shim_fns =
{
.send_stat_cache_delete_message = smbd_send_stat_cache_delete_message,
gain_root_group_privilege();
fault_setup();
- dump_core_setup("smbd", lp_logfile(talloc_tos()));
+ dump_core_setup("smbd", lp_logfile(talloc_tos(), lp_sub));
/* we are never interested in SIGPIPE */
BlockSignals(True,SIGPIPE);
POPT_COMMON_SAMBA
POPT_TABLEEND
};
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
poptContext pc;
int opt;
TALLOC_CTX *frame;
CatchSignal(SIGUSR2, SIG_IGN);
fault_setup();
- dump_core_setup("winbindd", lp_logfile(talloc_tos()));
+ dump_core_setup("winbindd", lp_logfile(talloc_tos(), lp_sub));
smb_init_locale();
* is often not related to the path where winbindd is actually run
* in production.
*/
- dump_core_setup("winbindd", lp_logfile(talloc_tos()));
+ dump_core_setup("winbindd", lp_logfile(talloc_tos(), lp_sub));
if (is_daemon && interactive) {
d_fprintf(stderr,"\nERROR: "
"Option -i|--interactive is not allowed together with -D|--daemon\n\n");
* as the log file might have been set in the configuration and cores's
* path is by default basename(lp_logfile()).
*/
- dump_core_setup("winbindd", lp_logfile(talloc_tos()));
+ dump_core_setup("winbindd", lp_logfile(talloc_tos(), lp_sub));
if (lp_server_role() == ROLE_ACTIVE_DIRECTORY_DC
&& !lp_parm_bool(-1, "server role check", "inhibit", false)) {
const char *logprefix,
const char *logname)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+
if (logprefix && logname) {
char *logbase = NULL;
- if (*lp_logfile(talloc_tos())) {
+ if (*lp_logfile(talloc_tos(), lp_sub)) {
char *end = NULL;
- if (asprintf(&logbase, "%s", lp_logfile(talloc_tos())) < 0) {
+ if (asprintf(&logbase, "%s", lp_logfile(talloc_tos(), lp_sub)) < 0) {
smb_panic("Internal error: asprintf failed");
}