summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-08-29 14:43:42 +0000
committerGerald Carter <jerry@samba.org>2000-08-29 14:43:42 +0000
commita86ae846adb00a8dd68b79bc1188231d2259bf7f (patch)
treea9d494922f0d816df235b870d477e549ce1f791f /source3/rpcclient
parentae149ff6c521b1f58f204a21d72faeca7789e602 (diff)
downloadsamba-a86ae846adb00a8dd68b79bc1188231d2259bf7f.tar.gz
samba-a86ae846adb00a8dd68b79bc1188231d2259bf7f.tar.bz2
samba-a86ae846adb00a8dd68b79bc1188231d2259bf7f.zip
added -P (for no prompt) and -A <authfile> options
jerry (This used to be commit 2d95c38f7e65a0379cbaadd57b8eb41d830b5a6b)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index ba6d55cebe..b3e7554663 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -95,49 +95,47 @@ uint32 cmd_spoolss_enum_printers(struct client_info *info, int argc, char *argv[
strupper(srv_name);
flags=PRINTER_ENUM_LOCAL;
-
+ report (out_hnd, "Flags = PRINTER_ENUM_LOCAL\n");
if (msrpc_spoolss_enum_printers(srv_name, flags, level, ctr))
DEBUG(5,("cmd_spoolss_enum_printer: query succeeded\n"));
else
report(out_hnd, "FAILED\n");
-#if 0 /* JERRY */
flags=PRINTER_ENUM_NAME;
-
+ report (out_hnd, "Flags = PRINTER_ENUM_NAME\n");
if (msrpc_spoolss_enum_printers(srv_name, flags, level, ctr))
DEBUG(5,("cmd_spoolss_enum_printer: query succeeded\n"));
else
report(out_hnd, "FAILED\n");
flags=PRINTER_ENUM_SHARED|PRINTER_ENUM_NAME;
-
+ report (out_hnd, "Flags = PRINTER_ENUM_SHARED|PRINTER_ENUM_NAME\n");
if (msrpc_spoolss_enum_printers(srv_name, flags, level, ctr))
DEBUG(5,("cmd_spoolss_enum_printer: query succeeded\n"));
else
report(out_hnd, "FAILED\n");
flags=PRINTER_ENUM_CONNECTIONS;
-
+ report (out_hnd, "Flags = PRINTER_ENUM_CONNECTIONS\n");
if (msrpc_spoolss_enum_printers(srv_name, flags, level, ctr))
DEBUG(5,("cmd_spoolss_enum_printer: query succeeded\n"));
else
report(out_hnd, "FAILED\n");
flags=PRINTER_ENUM_NETWORK;
-
+ report (out_hnd, "Flags = PRINTER_ENUM_NETWORK\n");
if (msrpc_spoolss_enum_printers(srv_name, flags, level, ctr))
DEBUG(5,("cmd_spoolss_enum_printer: query succeeded\n"));
else
report(out_hnd, "FAILED\n");
flags=PRINTER_ENUM_REMOTE;
-
+ report (out_hnd, "Flags = PRINTER_ENUM_REMOTE\n");
if (msrpc_spoolss_enum_printers(srv_name, flags, level, ctr))
DEBUG(5,("cmd_spoolss_enum_printer: query succeeded\n"));
else
report(out_hnd, "FAILED\n");
-#endif
return NT_STATUS_NOPROBLEMO;
}
@@ -646,11 +644,8 @@ uint32 cmd_spoolss_addprinterex(struct client_info *info, int argc, char *argv[]
init_unistr( &print_info_2.portname, port_name);
init_unistr( &print_info_2.drivername, driver_name);
init_unistr( &print_info_2.comment, "Created by rpcclient");
- /* init_unistr( &print_info_2.location, "");
- init_unistr( &print_info_2.sepfile, ""); */
init_unistr( &print_info_2.printprocessor, "winprint");
init_unistr( &print_info_2.datatype, "RAW");
- /* init_unistr( &print_info_2.parameters, ""); */
print_info_2.devmode = NULL;
print_info_2.secdesc = NULL;
print_info_2.attributes = PRINTER_ATTRIBUTE_SHARED;
@@ -658,9 +653,13 @@ uint32 cmd_spoolss_addprinterex(struct client_info *info, int argc, char *argv[]
print_info_2.defaultpriority = 0;
print_info_2.starttime = 0;
print_info_2.untiltime = 0;
+
+ /* These three fields must not be used by AddPrinter()
+ as defined in the MS Platform SDK documentation.. --jerry
print_info_2.status = 0;
print_info_2.cjobs = 0;
print_info_2.averageppm = 0;
+ */
/* if successful, spoolss_addprinterex() should return True and hnd