summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-07-13 19:20:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:12 -0500
commit3f73d19807cbcbae8e5cfd96fd5c9b4de8c388a3 (patch)
tree2f9eb240a5f37e1416690665db2d121bfdddc03c
parent083740e74e0790f863c065a20e28f553fdc7d5bd (diff)
downloadsamba-3f73d19807cbcbae8e5cfd96fd5c9b4de8c388a3.tar.gz
samba-3f73d19807cbcbae8e5cfd96fd5c9b4de8c388a3.tar.xz
samba-3f73d19807cbcbae8e5cfd96fd5c9b4de8c388a3.zip
r1484: BUG 1520: work around bug in xp sp2 rc2 where the client sends a fnpcn() request without previously sending a ffpcn(). Return what win2k sp4 does
-rw-r--r--source/rpc_server/srv_spoolss_nt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index 06ba5435976..08553bfe654 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -3725,6 +3725,12 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd,
info->data=NULL;
info->count=0;
+ /* a bug in xp sp2 rc2 causes it to send a fnpcn request without
+ sending a ffpcn() request first */
+
+ if ( !option )
+ return WERR_BADFID;
+
for (i=0; i<option->count; i++) {
option_type=&(option->ctr.type[i]);
@@ -3787,6 +3793,12 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY
info->data=NULL;
info->count=0;
+ /* a bug in xp sp2 rc2 causes it to send a fnpcn request without
+ sending a ffpcn() request first */
+
+ if ( !option )
+ return WERR_BADFID;
+
get_printer_snum(p, hnd, &snum);
for (i=0; i<option->count; i++) {