diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-09 19:44:50 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-09 19:44:50 +0100 |
commit | 4f29e8a75c7ea63601724be2fd63eb776f839fde (patch) | |
tree | 2ea03ea359a2fd51353f135e7ade99efbd4d5751 /source3/utils | |
parent | 0d0aec18a2d2a49095da3fe1ac1dd51797c72d7d (diff) | |
parent | a734c85c287ccf3280e7cefe69fae6b772b4ea8d (diff) | |
download | samba-4f29e8a75c7ea63601724be2fd63eb776f839fde.tar.gz samba-4f29e8a75c7ea63601724be2fd63eb776f839fde.tar.bz2 samba-4f29e8a75c7ea63601724be2fd63eb776f839fde.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_printer.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index ad9be05798..e74524beb7 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -726,38 +726,35 @@ static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd, POLICY_HND *hnd) { WERROR result; - fstring servername, printername2; + fstring printername2; - slprintf(servername, sizeof(servername)-1, "\\\\%s", - pipe_hnd->desthost); - - fstrcpy(printername2, servername); + fstrcpy(printername2, pipe_hnd->srv_name_slash); fstrcat(printername2, "\\"); fstrcat(printername2, printername); DEBUG(10,("connecting to: %s as %s for %s and access: %x\n", - servername, username, printername2, access_required)); + pipe_hnd->srv_name_slash, username, printername2, access_required)); /* open printer */ result = rpccli_spoolss_open_printer_ex(pipe_hnd, mem_ctx, printername2, "", access_required, - servername, username, hnd); + pipe_hnd->csrv_name_slash, username, hnd); /* be more verbose */ if (W_ERROR_V(result) == W_ERROR_V(WERR_ACCESS_DENIED)) { d_fprintf(stderr, "no access to printer [%s] on [%s] for user [%s] granted\n", - printername2, servername, username); + printername2, pipe_hnd->csrv_name_slash, username); return false; } if (!W_ERROR_IS_OK(result)) { d_fprintf(stderr, "cannot open printer %s on server %s: %s\n", - printername2, servername, win_errstr(result)); + printername2, pipe_hnd->csrv_name_slash, win_errstr(result)); return false; } DEBUG(2,("got printer handle for printer: %s, server: %s\n", - printername2, servername)); + printername2, pipe_hnd->csrv_name_slash)); return true; } |