svn commit: samba r15975 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

jerry at samba.org jerry at samba.org
Wed May 31 01:31:03 GMT 2006


Author: jerry
Date: 2006-05-31 01:31:01 +0000 (Wed, 31 May 2006)
New Revision: 15975

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15975

Log:
Only call the printer publishing calls if 'security = ads'
(prevent a segv)


Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
   trunk/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c	2006-05-31 01:14:48 UTC (rev 15974)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c	2006-05-31 01:31:01 UTC (rev 15975)
@@ -6279,8 +6279,14 @@
 #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));
 
 	if (!Printer)

Modified: trunk/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- trunk/source/rpc_server/srv_spoolss_nt.c	2006-05-31 01:14:48 UTC (rev 15974)
+++ trunk/source/rpc_server/srv_spoolss_nt.c	2006-05-31 01:31:01 UTC (rev 15975)
@@ -6279,8 +6279,14 @@
 #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));
 
 	if (!Printer)



More information about the samba-cvs mailing list