From: Andrew Bartlett Date: Tue, 13 Mar 2012 10:59:32 +0000 (+1100) Subject: s3-spoolss: Consistently fail OpenPrinterEx with "" printername X-Git-Tag: tdb-1.2.10~226 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ff5854c4f367c9492c054d116bd94210cfc4a59;p=thirdparty%2Fsamba.git s3-spoolss: Consistently fail OpenPrinterEx with "" printername samba3.rpc.spoolss.printserver has become a flakey test recently, and this papers over the real problem. Andrew Bartlett Signed-off-by: Günther Deschner Autobuild-User: Günther Deschner Autobuild-Date: Tue Mar 13 17:51:00 CET 2012 on sn-devel-104 --- diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index f66bea8197c..daed9906fdc 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -1710,6 +1710,10 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p, return WERR_INVALID_PARAM; } + if (!*r->in.printername) { + return WERR_INVALID_PARAM; + } + if (r->in.level > 3) { return WERR_INVALID_PARAM; }