summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-01-12 19:47:08 +0000
committerTim Potter <tpot@samba.org>2001-01-12 19:47:08 +0000
commit7237fd3c85458a4bb60cd30d91e4218d9ee162db (patch)
treef7afcd6960a54ce949b8b78350dd9005861efa0d /source3
parentee49ddbd8ff7fd856ae9185a585dfc457c9e8cb5 (diff)
downloadsamba-7237fd3c85458a4bb60cd30d91e4218d9ee162db.tar.gz
samba-7237fd3c85458a4bb60cd30d91e4218d9ee162db.tar.bz2
samba-7237fd3c85458a4bb60cd30d91e4218d9ee162db.zip
Pass correctly formatted args to cli_spoolss_open_printer_ex()
(This used to be commit 635db9b6015a422505a5d8507c44e12f146597bc)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_spoolss.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index b491a3003e..a312bc8889 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -380,7 +380,7 @@ static uint32 cmd_spoolss_getprinter(int argc, char **argv)
BOOL opened_hnd = False;
struct ntuser_creds creds;
PRINTER_INFO_CTR ctr;
- int *returned;
+ fstring printer_name, station_name;
if (argc == 1 || argc > 3) {
printf("Usage: %s printername [level]\n", argv[0]);
@@ -402,8 +402,13 @@ static uint32 cmd_spoolss_getprinter(int argc, char **argv)
info_level = atoi(argv[2]);
}
+ slprintf(printer_name, sizeof(fstring), "\\\\%s\\%s",
+ server, argv[1]);
+
+ slprintf(station_name, sizeof(fstring), "\\\\%s", global_myname);
+
if ((result = cli_spoolss_open_printer_ex(
- &cli, argv[1], "", MAXIMUM_ALLOWED_ACCESS, global_myname,
+ &cli, printer_name, "", MAXIMUM_ALLOWED_ACCESS, station_name,
username, &pol)) != NT_STATUS_NOPROBLEMO) {
goto done;
}