From 1a850a4f37654282039e4b8712a874365ca16681 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 31 May 2006 01:31:01 +0000 Subject: r15975: Only call the printer publishing calls if 'security = ads' (prevent a segv) (This used to be commit a2ef525d9e3b4f050cb4e02fad67808d3e916373) --- source3/rpc_server/srv_spoolss_nt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2e224896c4..0281e3da0c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -6279,7 +6279,13 @@ static WERROR publish_or_unpublish_printer(pipes_struct *p, POLICY_HND *handle, #ifdef HAVE_ADS SPOOL_PRINTER_INFO_LEVEL_7 *info7 = info->info_7; int snum; - Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + Printer_entry *Printer; + + if ( lp_security() != SEC_ADS ) { + return WERR_UNKNOWN_LEVEL; + } + + Printer = find_printer_index_by_hnd(p, handle); DEBUG(5,("publish_or_unpublish_printer, action = %d\n",info7->action)); -- cgit