summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-08-28 04:42:31 +0000
committerAndrew Tridgell <tridge@samba.org>2000-08-28 04:42:31 +0000
commit9e1f9a5719315aaa9b184fc5b0a750c68fbd8941 (patch)
tree736a30deb469db48b63c639f914b9e9b66923e5c /source3/rpc_server
parent4ff15c319eb70396f2534fb8c165b7f71c58b311 (diff)
downloadsamba-9e1f9a5719315aaa9b184fc5b0a750c68fbd8941.tar.gz
samba-9e1f9a5719315aaa9b184fc5b0a750c68fbd8941.tar.bz2
samba-9e1f9a5719315aaa9b184fc5b0a750c68fbd8941.zip
yipee!
The spoolss AddJob function has an [in,out] buffer not an [in] buffer (despite the comment in the code to the contrary). Also, we must fail this function - not just blindly reply "no problem" as AddJob should always fail on non-local printers. This fixes a bug where the "print test page" failed about half the time. I suspect it will also fix a bunch of other intermittent spoolss bugs where the client (incorrectly) tries to use the AddJob printing interface. (This used to be commit 14e534a8907c34b53e00a63756efd71903ff9432)
Diffstat (limited to 'source3/rpc_server')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c5
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c11
2 files changed, 11 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 8b431551b5..5a1592e4fb 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -591,10 +591,11 @@ static BOOL api_spoolss_addjob(pipes_struct *p)
return False;
}
- /* that's only an [in] buffer ! */
+ /* that's an [in out] buffer (despite appearences to the contrary) */
+ new_spoolss_move_buffer(q_u.buffer, &r_u.buffer);
r_u.status = _spoolss_addjob(&q_u.handle, q_u.level,
- q_u.buffer, q_u.offered);
+ r_u.buffer, q_u.offered, &r_u.needed);
if(!spoolss_io_r_addjob("",&r_u,rdata,0)) {
DEBUG(0,("spoolss_io_r_addjob: unable to marshall SPOOL_R_ADDJOB.\n"));
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 36a8a1697c..b118b7c933 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3342,9 +3342,14 @@ uint32 _spoolss_fcpn(POLICY_HND *handle)
/****************************************************************************
****************************************************************************/
uint32 _spoolss_addjob(POLICY_HND *handle, uint32 level,
- NEW_BUFFER *buffer, uint32 offered)
-{
- return NT_STATUS_NO_PROBLEMO;
+ NEW_BUFFER *buffer, uint32 offered,
+ uint32 *needed)
+{
+ *needed = 0;
+ return ERROR_INVALID_PARAMETER; /* this is what a NT server
+ returns for AddJob. AddJob
+ must fail on non-local
+ printers */
}
/****************************************************************************