summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2019-11-05 10:34:11 +0100
committerStefan Metzmacher <metze@samba.org>2019-11-27 10:25:35 +0000
commitfa5033cfb7e9b65c23fe2c0c391c59b70d8415c3 (patch)
tree81abe1953d7a33abaf2323f31b2c0c0d6c22434b /source3/printing
parentf2a1f0c705bc2e1f0400e23892fde45de00032b4 (diff)
downloadsamba-fa5033cfb7e9b65c23fe2c0c391c59b70d8415c3.tar.gz
smbdotconf: mark "logfile" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/spoolssd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index 427e31e0122..ebfeea4f76d 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -59,7 +59,9 @@ static struct pf_daemon_config pf_spoolss_cfg = { 0 };
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;
@@ -81,11 +83,11 @@ static void spoolss_reopen_logs(int child_id)
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);
}
}
@@ -580,14 +582,16 @@ static void print_queue_forward(struct messaging_context *msg,
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;