From e1af63fdeefdaa1ed2f6723a2fe6d8cf8fe1f40b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Aug 2010 14:14:33 +0200 Subject: s3: Lift the smbd_messaging_context from update_dsspooler --- source3/rpc_server/srv_spoolss_nt.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index f0b686170d..bacd33cb51 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5699,6 +5699,7 @@ static bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, int snum, struct spoolss_SetPrinterInfo2 *printer, struct spoolss_PrinterInfo2 *old_printer) @@ -5715,7 +5716,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, printer->drivername); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_DRIVERNAME, @@ -5735,7 +5736,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, printer->comment); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_DESCRIPTION, @@ -5752,7 +5753,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, printer->sharename); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTSHARENAME, @@ -5778,7 +5779,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, p); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTERNAME, @@ -5795,7 +5796,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, printer->portname); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PORTNAME, @@ -5812,7 +5813,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, printer->location); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_LOCATION, @@ -5829,7 +5830,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, printer->sepfile); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTSEPARATORFILE, @@ -5847,7 +5848,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, SIVAL(buffer.data, 0, printer->starttime); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTSTARTTIME, @@ -5861,7 +5862,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, SIVAL(buffer.data, 0, printer->untiltime); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTENDTIME, @@ -5875,7 +5876,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, SIVAL(buffer.data, 0, printer->priority); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRIORITY, @@ -5890,7 +5891,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS)); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTKEEPPRINTEDJOBS, @@ -5914,7 +5915,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, spooling); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_PRINTSPOOLING, @@ -5926,7 +5927,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, global_myname()); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_SHORTSERVERNAME, @@ -5948,7 +5949,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, longname); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_SERVERNAME, @@ -5961,7 +5962,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, push_reg_sz(mem_ctx, &buffer, uncname); winreg_set_printer_dataex(mem_ctx, server_info, - smbd_messaging_context(), + msg_ctx, printer->sharename, SPOOL_DSSPOOLER_KEY, SPOOL_REG_UNCNAME, @@ -6060,6 +6061,7 @@ static WERROR update_printer(struct pipes_struct *p, update_dsspooler(tmp_ctx, p->server_info, + p->msg_ctx, snum, printer, old_printer); @@ -7383,6 +7385,7 @@ static WERROR spoolss_addprinterex_level_2(struct pipes_struct *p, update_dsspooler(p->mem_ctx, p->server_info, + p->msg_ctx, 0, info2, NULL); -- cgit