summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-23 10:29:46 +0100
committerGünther Deschner <gd@samba.org>2009-02-23 12:48:19 +0100
commitdc0bf17ac130764f3bbdc2d07de4a0fb54a761d2 (patch)
treeff27be7c41769cbdb6c7c12c5900bddd7b1be39b
parente2ab5a155cd8b20d1dce91fa2f31d840c673a3b6 (diff)
downloadsamba-dc0bf17ac130764f3bbdc2d07de4a0fb54a761d2.tar.gz
samba-dc0bf17ac130764f3bbdc2d07de4a0fb54a761d2.tar.bz2
samba-dc0bf17ac130764f3bbdc2d07de4a0fb54a761d2.zip
s3-rpcclient: use correct clientname in spoolss_RemoteFindFirstPrinterChangeNotifyEx command.
Guenther
-rw-r--r--source3/rpcclient/cmd_spoolss.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 944bac7731..bb9d0e6d6c 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2526,6 +2526,7 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
const char **argv)
{
const char *printername;
+ const char *clientname;
POLICY_HND hnd;
bool got_hnd = False;
WERROR result;
@@ -2582,13 +2583,19 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
}
option.types[1].fields[0] = JOB_NOTIFY_PRINTER_NAME;
+ clientname = talloc_asprintf(mem_ctx, "\\\\%s", global_myname());
+ if (!clientname) {
+ result = WERR_NOMEM;
+ goto done;
+ }
+
/* Send rffpcnex */
status = rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli, mem_ctx,
&hnd,
0,
0,
- cli->srv_name_slash,
+ clientname,
123,
&option,
&result);