From eddc63be868434d3aa5a66b514b692f4d7b8833a Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 7 Nov 2019 09:50:37 +0100 Subject: [PATCH] printing: use lpcfg_substituted_string() in print_run_command() Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- source3/printing/print_generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c index f9c7693b358..77000bf55ec 100644 --- a/source3/printing/print_generic.c +++ b/source3/printing/print_generic.c @@ -31,6 +31,8 @@ extern userdom_struct current_user_info; static int print_run_command(int snum, const char* printername, bool do_sub, const char *command, int *outfd, ...) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *syscmd; char *arg; int ret; @@ -73,7 +75,7 @@ static int print_run_command(int snum, const char* printername, bool do_sub, return -1; } - syscmd = lp_string(ctx, syscmd); + syscmd = lpcfg_substituted_string(ctx, lp_sub, syscmd); if (syscmd == NULL) { return -1; } -- 2.47.3