summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-05 17:37:08 +0000
committerTim Potter <tpot@samba.org>2003-11-05 17:37:08 +0000
commit5033b016caafadc5aae5f2e8838d08efdfcb5e61 (patch)
tree46dc01e495e63434f94eda9186b54b67e9b2d3e7
parent596783105bc16d6fe768f2fc60f4caec5791058d (diff)
downloadsamba-5033b016caafadc5aae5f2e8838d08efdfcb5e61.tar.gz
samba-5033b016caafadc5aae5f2e8838d08efdfcb5e61.tar.bz2
samba-5033b016caafadc5aae5f2e8838d08efdfcb5e61.zip
Merge from 3.0:
Revision 1.82.2.24: Patch from James Henstridge to allow rpcclient adddriver command to specify printer driver version. Closes bug #514. (This used to be commit b873832e33ba251741ae4f091f93f4bb79d57bee)
-rw-r--r--source3/rpcclient/cmd_spoolss.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index eca31ae444..798949fae9 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1266,12 +1266,13 @@ static WERROR cmd_spoolss_addprinterdriver(struct cli_state *cli,
fstring driver_name;
/* parse the command arguements */
- if (argc != 3)
+ if (argc != 3 && argc != 4)
{
- printf ("Usage: %s <Environment>\\\n", argv[0]);
+ printf ("Usage: %s <Environment> \\\n", argv[0]);
printf ("\t<Long Printer Name>:<Driver File Name>:<Data File Name>:\\\n");
printf ("\t<Config File Name>:<Help File Name>:<Language Monitor Name>:\\\n");
- printf ("\t<Default Data Type>:<Comma Separated list of Files>\n");
+ printf ("\t<Default Data Type>:<Comma Separated list of Files> \\\n");
+ printf ("\t[version]\n");
return WERR_OK;
}
@@ -1292,6 +1293,14 @@ static WERROR cmd_spoolss_addprinterdriver(struct cli_state *cli,
return WERR_INVALID_PARAM;
}
+ /* if printer driver version specified, override the default version
+ * used by the architecture. This allows installation of Windows
+ * 2000 (version 3) printer drivers. */
+ if (argc == 4)
+ {
+ info3.version = atoi(argv[3]);
+ }
+
ctr.info3 = &info3;
result = cli_spoolss_addprinterdriver (cli, mem_ctx, level, &ctr);