1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

printing: use lpcfg_substituted_string() in print_run_command()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2019-11-07 09:50:37 +01:00 committed by Stefan Metzmacher
parent 24905ba82d
commit eddc63be86

View File

@ -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;
}