--- samba-3.0.0/source/rpcclient/cmd_spoolss.c.old 2003-08-29 05:42:45.000000000 +0800 +++ samba-3.0.0/source/rpcclient/cmd_spoolss.c 2003-09-26 14:05:43.000000000 +0800 @@ -1264,16 +1264,17 @@ static WERROR cmd_spoolss_addprinterdriv DRIVER_INFO_3 info3; const char *arch; fstring driver_name; /* parse the command arguements */ - if (argc != 3) + if (argc != 3 && argc != 4) { printf ("Usage: %s \\\n", argv[0]); printf ("\t:::\\\n"); printf ("\t:::\\\n"); - printf ("\t:\n"); + printf ("\t:\\\n"); + printf ("\t[version]\n"); return WERR_OK; } /* Fill in the DRIVER_INFO_3 struct */ @@ -1290,10 +1291,18 @@ static WERROR cmd_spoolss_addprinterdriv { printf ("Error Invalid parameter list - %s.\n", argv[2]); 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); if (W_ERROR_IS_OK(result)) { --- samba-3.0.0/docs/docbook/manpages/rpcclient.1.xml.old 2003-09-26 14:12:47.000000000 +0800 +++ samba-3.0.0/docs/docbook/manpages/rpcclient.1.xml 2003-09-26 14:17:25.000000000 +0800 @@ -209,11 +209,11 @@ SPOOLSS - adddriver <arch> <config> + adddriver <arch> <config> [<version>] Execute an AddPrinterDriver() RPC to install the printer driver information on the server. Note that the driver files should already exist in the directory returned by getdriverdir. Possible values for @@ -238,11 +238,17 @@ Comma Separated list of Files Samba does not need to support the concept of Print Monitors since these only apply to local printers whose driver can make use of a bi-directional link for communication. This field should be "NULL". On a remote NT print server, the Print Monitor for a driver must already be installed prior to adding the driver or - else the RPC will fail. + else the RPC will fail. + + The version parameter lets you + specify the printer driver version number. If omitted, the + default driver version for the specified architecture will + be used. This option can be used to upload Windows 2000 + (version 3) printer drivers. addprinter <printername> <sharename> <drivername> <port> Add a printer on the remote server. This printer