diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-01-15 11:53:11 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-01-21 12:30:22 +0100 |
commit | e830e37c9c0ef6597e92e31915b2f41310ac1cad (patch) | |
tree | 8e35084ba372c05e100e204547a49b368c8c750d /source3/smbd/reply.c | |
parent | 81443447a116460911a9235a8f9a60e3c8dea502 (diff) | |
download | samba-e830e37c9c0ef6597e92e31915b2f41310ac1cad.tar.gz samba-e830e37c9c0ef6597e92e31915b2f41310ac1cad.tar.bz2 samba-e830e37c9c0ef6597e92e31915b2f41310ac1cad.zip |
s3:smbd: use dcerpc_spoolss_X() functions
metze
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 538e22f1ba..0c3b8980b2 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -28,7 +28,7 @@ #include "printing.h" #include "smbd/globals.h" #include "fake_file.h" -#include "../librpc/gen_ndr/cli_spoolss.h" +#include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" #include "rpc_client/init_spoolss.h" #include "rpc_server/rpc_ncacn_np.h" @@ -5319,6 +5319,7 @@ void reply_printqueue(struct smb_request *req) WERROR werr; const char *sharename = lp_servicename(SNUM(conn)); struct rpc_pipe_client *cli = NULL; + struct dcerpc_binding_handle *b = NULL; struct policy_handle handle; struct spoolss_DevmodeContainer devmode_ctr; union spoolss_JobInfo *info; @@ -5342,10 +5343,11 @@ void reply_printqueue(struct smb_request *req) reply_nterror(req, status); goto out; } + b = cli->binding_handle; ZERO_STRUCT(devmode_ctr); - status = rpccli_spoolss_OpenPrinter(cli, mem_ctx, + status = dcerpc_spoolss_OpenPrinter(b, mem_ctx, sharename, NULL, devmode_ctr, SEC_FLAG_MAXIMUM_ALLOWED, @@ -5429,8 +5431,8 @@ void reply_printqueue(struct smb_request *req) (unsigned)count)); out: - if (cli && is_valid_policy_hnd(&handle)) { - rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL); + if (b && is_valid_policy_hnd(&handle)) { + dcerpc_spoolss_ClosePrinter(b, mem_ctx, &handle, &werr); } } |