const char *remote_machine,
struct messaging_context *msg_ctx)
{
- char *cmd = lp_addprinter_command(talloc_tos());
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *cmd = lp_addprinter_command(talloc_tos(), lp_sub);
char **qlines;
char *command = NULL;
int numlines;
struct spoolss_SetPrinterInfo2 *printer = info_ctr->info.info2;
struct spoolss_PrinterInfo2 *old_printer;
struct printer_handle *Printer = find_printer_index_by_hnd(p, handle);
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
int snum;
WERROR result = WERR_OK;
TALLOC_CTX *tmp_ctx;
/* Call addprinter hook */
/* Check changes to see if this is really needed */
- if (*lp_addprinter_command(talloc_tos()) &&
+ if (*lp_addprinter_command(talloc_tos(), lp_sub) &&
(!strequal(printer->drivername, old_printer->drivername) ||
!strequal(printer->comment, old_printer->comment) ||
!strequal(printer->portname, old_printer->portname) ||
{
struct spoolss_SetPrinterInfo2 *info2 = info_ctr->info.info2;
uint32_t info2_mask = SPOOLSS_PRINTER_INFO_ALL;
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
int snum;
WERROR err = WERR_OK;
/* FIXME!!! smbd should check to see if the driver is installed before
trying to add a printer like this --jerry */
- if (*lp_addprinter_command(talloc_tos()) ) {
+ if (*lp_addprinter_command(talloc_tos(), lp_sub) ) {
char *raddr;
raddr = tsocket_address_inet_addr_string(p->remote_address,