summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-12-08 03:24:38 +0000
committerTim Potter <tpot@samba.org>2000-12-08 03:24:38 +0000
commitcf9443677d8e82f978194c43a8275e7e937e890a (patch)
treeacd8bc4b51ffb2cab4254cc7be7d79b35e418149 /source3/rpcclient
parent8d8791eefd2e915680669fe201e6b60b527dce46 (diff)
downloadsamba-cf9443677d8e82f978194c43a8275e7e937e890a.tar.gz
samba-cf9443677d8e82f978194c43a8275e7e937e890a.tar.bz2
samba-cf9443677d8e82f978194c43a8275e7e937e890a.zip
Modified argc passed to rpc_client cmd_* functions to include argv[0].
Gerald, could you check to see I haven't introduced any bugs into rpcclient/cmd_spoolss.c? (This used to be commit 77b0bda4df3217cd186d5b8f902a50f35346d98d)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 392f31b625..58ee1ca0c1 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -149,7 +149,7 @@ uint32 cmd_spoolss_enum_ports(struct client_info *info, int argc, char *argv[])
uint32 level;
fstring srv_name;
- if (argc < 1)
+ if (argc < 2)
{
report (out_hnd, "spoolenumports <level>\n");
return NT_STATUS_INVALID_PARAMETER;
@@ -179,7 +179,7 @@ uint32 cmd_spoolss_enum_printerdata(struct client_info *info, int argc, char *ar
fstring station;
char *printer_name;
- if (argc < 1) {
+ if (argc < 2) {
report(out_hnd, "spoolenumdata <printer name>\n");
return NT_STATUS_INVALID_PARAMETER;
}
@@ -224,7 +224,7 @@ uint32 cmd_spoolss_getprinter(struct client_info *info, int argc, char *argv[])
char *printer_name;
uint32 level;
- if (argc < 1) {
+ if (argc < 2) {
report(out_hnd, "spoolgetprinter <printer name>\n");
return NT_STATUS_INVALID_PARAMETER;
}
@@ -246,7 +246,7 @@ uint32 cmd_spoolss_getprinter(struct client_info *info, int argc, char *argv[])
printer_name = srv_name;
}
- if (argc < 3)
+ if (argc < 4)
level=2;
else
level = atoi(argv[2]);
@@ -282,7 +282,7 @@ uint32 cmd_spoolss_enum_jobs(struct client_info *info, int argc, char *argv[])
void **ctr = NULL;
uint32 level = 1;
- if (argc < 1) {
+ if (argc < 2) {
report(out_hnd, "spooljobs <printer name>\n");
return NT_STATUS_INVALID_PARAMETER;
}
@@ -330,7 +330,7 @@ uint32 cmd_spoolss_open_printer_ex(struct client_info *info, int argc, char *arg
BOOL res = True;
- if (argc < 1)
+ if (argc < 2)
{
report(out_hnd, "spoolopen <printer name>\n");
return NT_STATUS_INVALID_PARAMETER;
@@ -385,7 +385,7 @@ uint32 cmd_spoolss_getprinterdata(struct client_info *info, int argc, char *argv
uint32 status;
uint32 type = 1;
- if (argc < 2) {
+ if (argc < 3) {
report(out_hnd, "spoolgetdata <printer name> <value name>\n");
return NT_STATUS_INVALID_PARAMETER;
}
@@ -441,7 +441,7 @@ uint32 cmd_spoolss_getprinterdriver(struct client_info *info, int argc, char *ar
fstring environment;
uint32 level;
- if (argc < 1) {
+ if (argc < 2) {
report(out_hnd, "spoolgetprinterdriver <printer name>\n");
return NT_STATUS_INVALID_PARAMETER;
}
@@ -524,14 +524,14 @@ uint32 cmd_spoolss_getprinterdriverdir(struct client_info *info, int argc, char
fstrcat(srv_name, info->dest_host);
strupper(srv_name);
- if (argc < 1) {
+ if (argc < 2) {
report(out_hnd, "spoolgetprinterdriverdir <arch>\n");
return NT_STATUS_NOPROBLEMO;
}
fstrcpy(env, argv[1]);
- for (i=2; i<=argc; i++) {
+ for (i=3; i<=argc; i++) {
fstrcat(env, " ");
fstrcat(env, argv[i]);
}
@@ -571,7 +571,7 @@ uint32 cmd_spoolss_addprinterex(struct client_info *info, int argc, char *argv[]
strupper(srv_name);
/* check (and copy) the command line arguments */
- if (argc < 4) {
+ if (argc < 5) {
report(out_hnd, "spooladdprinterex <name> <shared name> <driver> <port>\n");
return NT_STATUS_INVALID_PARAMETER;
}
@@ -701,7 +701,7 @@ uint32 cmd_spoolss_addprinterdriver(struct client_info *info, int argc, char *ar
uint32 result = NT_STATUS_NO_PROBLEMO;
/* parse the command arguements */
- if (argc < 2)
+ if (argc < 3)
{
report (out_hnd, "spooladdprinterdriver <arch>\\\n");
report (out_hnd, "\t<Long Printer Name>:<Driver File Name>:<Data File Name>:\\\n");