#include "../libcli/security/security_descriptor.h"
#include "../libcli/registry/util_reg.h"
#include "libsmb/libsmb.h"
+#include "popt_common_cmdline.h"
#define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \
{ \
flags,
name,
level,
- 0,
+ 4192,
&count,
&info);
if (W_ERROR_IS_OK(result)) {
switch(type) {
case REG_DWORD:
- if (blob.length == sizeof(uint32)) {
+ if (blob.length >= sizeof(uint32_t)) {
printf("%s: REG_DWORD: 0x%08x\n", name, IVAL(blob.data,0));
} else {
printf("%s: REG_DWORD: <invalid>\n", name);
}
TALLOC_FREE(hex);
putchar('\n');
+ putchar('\n');
if (strequal(v, "OsVersion")) {
struct spoolss_OSVersion os;
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &os,
(ndr_pull_flags_fn_t)ndr_pull_spoolss_OSVersion);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- printf("%s: OsVersion:\n", v);
+ // add output here;
+ printf("OsMajor: %u\n", os.major);
+ printf("OsMinor: %u\n", os.minor);
+ printf("OsBuild: %u\n", os.build);
NDR_PRINT_DEBUG(spoolss_OSVersion, &os);
}
}
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &os,
(ndr_pull_flags_fn_t)ndr_pull_spoolss_OSVersionEx);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- printf("%s: OsVersionEx:\n", v);
+ printf("OsMajor: %u\n", os.major);
+ printf("OsMinor: %u\n", os.minor);
+ printf("OsBuild: %u\n", os.build);
+ printf("ServicePackMajor: %u\n", os.service_pack_major);
+ printf("ServicePackMinor: %u\n", os.service_pack_minor);
NDR_PRINT_DEBUG(spoolss_OSVersionEx, &os);
}
}
break;
default:
printf("unknown info level %d\n", level);
- return WERR_UNKNOWN_LEVEL;
+ return WERR_INVALID_LEVEL;
}
return werror;
return result;
}
+/****************************************************************************
+****************************************************************************/
+
+static WERROR cmd_spoolss_getdriverpackagepath(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc, const char **argv)
+{
+ HRESULT hresult;
+ NTSTATUS status;
+ const char *env = SPOOLSS_ARCHITECTURE_NT_X86;
+ uint32_t offered;
+ uint32_t needed;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
+ const char *package_id = "";
+ const char *cab = NULL;
+
+ if (argc > 4) {
+ printf("Usage: %s [environment] [package_id]\n", argv[0]);
+ return WERR_OK;
+ }
+
+ /* Get the arguments need to open the printer handle */
+
+ if (argc >= 2) {
+ env = argv[1];
+ }
+
+ if (argc == 3) {
+ package_id = argv[2];
+ }
+
+ offered = 1;
+ cab = talloc_array(mem_ctx, char, offered);
+ status = dcerpc_spoolss_GetPrinterDriverPackagePath(b, mem_ctx,
+ cli->srv_name_slash,
+ env,
+ NULL,
+ package_id,
+ cab,
+ offered,
+ &needed,
+ &hresult);
+ if (!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
+ }
+
+ if (W_ERROR_EQUAL(W_ERROR(WIN32_FROM_HRESULT(hresult)), WERR_INSUFFICIENT_BUFFER)) {
+ offered = needed;
+ cab = talloc_zero_array(mem_ctx, char, offered);
+
+ status = dcerpc_spoolss_GetPrinterDriverPackagePath(b, mem_ctx,
+ cli->srv_name_slash,
+ env,
+ NULL,
+ package_id,
+ cab,
+ offered,
+ &needed,
+ &hresult);
+ if (!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
+ }
+ }
+
+ return W_ERROR(WIN32_FROM_HRESULT(hresult));
+}
+
+
/****************************************************************************
****************************************************************************/
char *args)
{
char *str, *str2;
- int count = 0;
+ size_t count = 0;
char *saveptr = NULL;
struct spoolss_StringArray *deps;
const char **file_array = NULL;
arch = cmd_spoolss_get_short_archi(argv[1]);
if (!arch) {
printf ("Error Unknown architecture [%s]\n", argv[1]);
- return WERR_INVALID_PARAM;
+ return WERR_INVALID_PARAMETER;
}
set_drv_info_3_env(mem_ctx, &info3, arch);
if (!init_drv_info_3_members(mem_ctx, &info3, driver_args ))
{
printf ("Error Invalid parameter list - %s.\n", argv[2]);
- return WERR_INVALID_PARAM;
+ return WERR_INVALID_PARAMETER;
}
/* if printer driver version specified, override the default version
info2.comment = "Created by rpcclient";
info2.printprocessor = "winprint";
info2.datatype = "RAW";
- info2.devmode_ptr = NULL;
- info2.secdesc_ptr = NULL;
+ info2.devmode_ptr = 0;
+ info2.secdesc_ptr = 0;
info2.attributes = PRINTER_ATTRIBUTE_SHARED;
info2.priority = 0;
info2.defaultpriority = 0;
break;
default:
- werror = WERR_INVALID_PARAM;
+ werror = WERR_INVALID_PARAMETER;
goto done;
}
if (type == REG_NONE) {
printf("Unknown data type: %s\n", argv[2]);
- result = WERR_INVALID_PARAM;
+ result = WERR_INVALID_PARAMETER;
goto done;
}
data.binary = strhex_to_data_blob(mem_ctx, argv[4]);
break;
case REG_MULTI_SZ: {
- int i, num_strings;
+ int i;
+ size_t num_strings;
const char **strings = NULL;
num_strings = 0;
if (!add_string_to_array(mem_ctx, argv[i],
&strings,
&num_strings)) {
- result = WERR_NOMEM;
+ result = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
}
data.string_array = talloc_zero_array(mem_ctx, const char *, num_strings + 1);
if (!data.string_array) {
- result = WERR_NOMEM;
+ result = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
for (i=0; i < num_strings; i++) {
}
default:
printf("Unknown data type: %s\n", argv[2]);
- result = WERR_INVALID_PARAM;
+ result = WERR_INVALID_PARAMETER;
goto done;
}
option.types = talloc_array(mem_ctx, struct spoolss_NotifyOptionType, 2);
if (option.types == NULL) {
- result = WERR_NOMEM;
+ result = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
option.types[0].count = 1;
option.types[0].fields = talloc_array(mem_ctx, union spoolss_Field, 1);
if (option.types[0].fields == NULL) {
- result = WERR_NOMEM;
+ result = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
option.types[0].fields[0].field = PRINTER_NOTIFY_FIELD_SERVER_NAME;
option.types[1].count = 1;
option.types[1].fields = talloc_array(mem_ctx, union spoolss_Field, 1);
if (option.types[1].fields == NULL) {
- result = WERR_NOMEM;
+ result = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
option.types[1].fields[0].field = JOB_NOTIFY_FIELD_PRINTER_NAME;
clientname = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name());
if (!clientname) {
- result = WERR_NOMEM;
+ result = WERR_NOT_ENOUGH_MEMORY;
goto done;
}
/****************************************************************************
****************************************************************************/
-extern struct user_auth_info *rpcclient_auth_info;
-
static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, int argc,
const char **argv)
/* first get the connection to the remote server */
nt_status = cli_full_connection(&cli_server2, lp_netbios_name(), argv[2],
- NULL, 0,
- "IPC$", "IPC",
- get_cmdline_auth_info_username(rpcclient_auth_info),
- lp_workgroup(),
- get_cmdline_auth_info_password(rpcclient_auth_info),
- get_cmdline_auth_info_use_kerberos(rpcclient_auth_info) ? CLI_FULL_CONNECTION_USE_KERBEROS : 0,
- get_cmdline_auth_info_signing_state(rpcclient_auth_info));
+ NULL, 0,
+ "IPC$", "IPC",
+ get_cmdline_auth_info_username(
+ popt_get_cmdline_auth_info()),
+ lp_workgroup(),
+ get_cmdline_auth_info_password(
+ popt_get_cmdline_auth_info()),
+ get_cmdline_auth_info_use_kerberos(
+ popt_get_cmdline_auth_info()) ?
+ CLI_FULL_CONNECTION_USE_KERBEROS : 0,
+ get_cmdline_auth_info_signing_state(
+ popt_get_cmdline_auth_info()));
if ( !NT_STATUS_IS_OK(nt_status) )
- return WERR_GENERAL_FAILURE;
+ return WERR_GEN_FAILURE;
- nt_status = cli_rpc_pipe_open_noauth(cli_server2, &ndr_table_spoolss.syntax_id,
+ nt_status = cli_rpc_pipe_open_noauth(cli_server2, &ndr_table_spoolss,
&cli2);
if (!NT_STATUS_IS_OK(nt_status)) {
printf("failed to open spoolss pipe on server %s (%s)\n",
argv[2], nt_errstr(nt_status));
- return WERR_GENERAL_FAILURE;
+ return WERR_GEN_FAILURE;
}
/* now open up both printers */
return result;
}
+static WERROR cmd_spoolss_play_gdi_script_on_printer_ic(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ const char **argv)
+{
+ WERROR result;
+ NTSTATUS status;
+ struct policy_handle handle, gdi_handle;
+ const char *printername;
+ struct spoolss_DevmodeContainer devmode_ctr;
+ struct dcerpc_binding_handle *b = cli->binding_handle;
+ DATA_BLOB in,out;
+ uint32_t count = 0;
+
+ RPCCLIENT_PRINTERNAME(printername, cli, argv[1]);
+
+ result = rpccli_spoolss_openprinter_ex(cli, mem_ctx,
+ printername,
+ SEC_FLAG_MAXIMUM_ALLOWED,
+ &handle);
+ if (!W_ERROR_IS_OK(result)) {
+ return result;
+ }
+
+ ZERO_STRUCT(devmode_ctr);
+
+ status = dcerpc_spoolss_CreatePrinterIC(b, mem_ctx,
+ &handle,
+ &gdi_handle,
+ &devmode_ctr,
+ &result);
+ if (!NT_STATUS_IS_OK(status)) {
+ result = ntstatus_to_werror(status);
+ goto done;
+ }
+ if (!W_ERROR_IS_OK(result)) {
+ goto done;
+ }
+
+ in = data_blob_string_const("");
+ out = data_blob_talloc_zero(mem_ctx, 4);
+
+ status = dcerpc_spoolss_PlayGDIScriptOnPrinterIC(b, mem_ctx,
+ &gdi_handle,
+ in.data,
+ in.length,
+ out.data,
+ out.length,
+ 0, /* ul */
+ &result);
+ if (!NT_STATUS_IS_OK(status)) {
+ result = ntstatus_to_werror(status);
+ goto done;
+ }
+ if (!W_ERROR_IS_OK(result)) {
+ goto done;
+ }
+
+ count = IVAL(out.data, 0);
+
+ out = data_blob_talloc_zero(mem_ctx,
+ count * sizeof(struct UNIVERSAL_FONT_ID) + 4);
+
+ status = dcerpc_spoolss_PlayGDIScriptOnPrinterIC(b, mem_ctx,
+ &gdi_handle,
+ in.data,
+ in.length,
+ out.data,
+ out.length,
+ 0, /* ul */
+ &result);
+ if (!NT_STATUS_IS_OK(status)) {
+ result = ntstatus_to_werror(status);
+ goto done;
+ }
+ if (!W_ERROR_IS_OK(result)) {
+ goto done;
+ }
+
+ {
+ enum ndr_err_code ndr_err;
+ struct UNIVERSAL_FONT_ID_ctr r;
+
+ ndr_err = ndr_pull_struct_blob(&out, mem_ctx, &r,
+ (ndr_pull_flags_fn_t)ndr_pull_UNIVERSAL_FONT_ID_ctr);
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ NDR_PRINT_DEBUG(UNIVERSAL_FONT_ID_ctr, &r);
+ }
+ }
+
+ done:
+ if (is_valid_policy_hnd(&gdi_handle)) {
+ WERROR _result;
+ dcerpc_spoolss_DeletePrinterIC(b, mem_ctx, &gdi_handle, &_result);
+ }
+ if (is_valid_policy_hnd(&handle)) {
+ WERROR _result;
+ dcerpc_spoolss_ClosePrinter(b, mem_ctx, &handle, &_result);
+ }
+
+ return result;
+}
+
/* List of commands exported by this module */
struct cmd_set spoolss_commands[] = {
- { "SPOOLSS" },
-
- { "adddriver", RPC_RTYPE_WERROR, NULL, cmd_spoolss_addprinterdriver, &ndr_table_spoolss, NULL, "Add a print driver", "" },
- { "addprinter", RPC_RTYPE_WERROR, NULL, cmd_spoolss_addprinterex, &ndr_table_spoolss, NULL, "Add a printer", "" },
- { "deldriver", RPC_RTYPE_WERROR, NULL, cmd_spoolss_deletedriver, &ndr_table_spoolss, NULL, "Delete a printer driver", "" },
- { "deldriverex", RPC_RTYPE_WERROR, NULL, cmd_spoolss_deletedriverex, &ndr_table_spoolss, NULL, "Delete a printer driver with files", "" },
- { "enumdata", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_data, &ndr_table_spoolss, NULL, "Enumerate printer data", "" },
- { "enumdataex", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_data_ex, &ndr_table_spoolss, NULL, "Enumerate printer data for a key", "" },
- { "enumkey", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_printerkey, &ndr_table_spoolss, NULL, "Enumerate printer keys", "" },
- { "enumjobs", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_jobs, &ndr_table_spoolss, NULL, "Enumerate print jobs", "" },
- { "getjob", RPC_RTYPE_WERROR, NULL, cmd_spoolss_get_job, &ndr_table_spoolss, NULL, "Get print job", "" },
- { "setjob", RPC_RTYPE_WERROR, NULL, cmd_spoolss_set_job, &ndr_table_spoolss, NULL, "Set print job", "" },
- { "enumports", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_ports, &ndr_table_spoolss, NULL, "Enumerate printer ports", "" },
- { "enumdrivers", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_drivers, &ndr_table_spoolss, NULL, "Enumerate installed printer drivers", "" },
- { "enumprinters", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_printers, &ndr_table_spoolss, NULL, "Enumerate printers", "" },
- { "getdata", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getprinterdata, &ndr_table_spoolss, NULL, "Get print driver data", "" },
- { "getdataex", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getprinterdataex, &ndr_table_spoolss, NULL, "Get printer driver data with keyname", ""},
- { "getdriver", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getdriver, &ndr_table_spoolss, NULL, "Get print driver information", "" },
- { "getdriverdir", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getdriverdir, &ndr_table_spoolss, NULL, "Get print driver upload directory", "" },
- { "getprinter", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getprinter, &ndr_table_spoolss, NULL, "Get printer info", "" },
- { "openprinter", RPC_RTYPE_WERROR, NULL, cmd_spoolss_open_printer, &ndr_table_spoolss, NULL, "Open printer handle", "" },
- { "openprinter_ex", RPC_RTYPE_WERROR, NULL, cmd_spoolss_open_printer_ex, &ndr_table_spoolss, NULL, "Open printer handle", "" },
- { "setdriver", RPC_RTYPE_WERROR, NULL, cmd_spoolss_setdriver, &ndr_table_spoolss, NULL, "Set printer driver", "" },
- { "getprintprocdir", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getprintprocdir, &ndr_table_spoolss, NULL, "Get print processor directory", "" },
- { "addform", RPC_RTYPE_WERROR, NULL, cmd_spoolss_addform, &ndr_table_spoolss, NULL, "Add form", "" },
- { "setform", RPC_RTYPE_WERROR, NULL, cmd_spoolss_setform, &ndr_table_spoolss, NULL, "Set form", "" },
- { "getform", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getform, &ndr_table_spoolss, NULL, "Get form", "" },
- { "deleteform", RPC_RTYPE_WERROR, NULL, cmd_spoolss_deleteform, &ndr_table_spoolss, NULL, "Delete form", "" },
- { "enumforms", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_forms, &ndr_table_spoolss, NULL, "Enumerate forms", "" },
- { "setprinter", RPC_RTYPE_WERROR, NULL, cmd_spoolss_setprinter, &ndr_table_spoolss, NULL, "Set printer comment", "" },
- { "setprintername", RPC_RTYPE_WERROR, NULL, cmd_spoolss_setprintername, &ndr_table_spoolss, NULL, "Set printername", "" },
- { "setprinterdata", RPC_RTYPE_WERROR, NULL, cmd_spoolss_setprinterdata, &ndr_table_spoolss, NULL, "Set REG_SZ printer data", "" },
- { "rffpcnex", RPC_RTYPE_WERROR, NULL, cmd_spoolss_rffpcnex, &ndr_table_spoolss, NULL, "Rffpcnex test", "" },
- { "printercmp", RPC_RTYPE_WERROR, NULL, cmd_spoolss_printercmp, &ndr_table_spoolss, NULL, "Printer comparison test", "" },
- { "enumprocs", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_procs, &ndr_table_spoolss, NULL, "Enumerate Print Processors", "" },
- { "enumprocdatatypes", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_proc_data_types, &ndr_table_spoolss, NULL, "Enumerate Print Processor Data Types", "" },
- { "enummonitors", RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_monitors, &ndr_table_spoolss, NULL, "Enumerate Print Monitors", "" },
- { "createprinteric", RPC_RTYPE_WERROR, NULL, cmd_spoolss_create_printer_ic, &ndr_table_spoolss, NULL, "Create Printer IC", "" },
-
- { NULL }
+ {
+ .name = "SPOOLSS",
+ },
+
+ {
+ .name = "adddriver",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_addprinterdriver,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Add a print driver",
+ .usage = "",
+ .use_netlogon_creds = false,
+ },
+ {
+ .name = "addprinter",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_addprinterex,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Add a printer",
+ .usage = "",
+ },
+ {
+ .name = "deldriver",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_deletedriver,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Delete a printer driver",
+ .usage = "",
+ },
+ {
+ .name = "deldriverex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_deletedriverex,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Delete a printer driver with files",
+ .usage = "",
+ },
+ {
+ .name = "enumdata",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_data,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate printer data",
+ .usage = "",
+ },
+ {
+ .name = "enumdataex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_data_ex,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate printer data for a key",
+ .usage = "",
+ },
+ {
+ .name = "enumkey",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_printerkey,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate printer keys",
+ .usage = "",
+ },
+ {
+ .name = "enumjobs",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_jobs,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate print jobs",
+ .usage = "",
+ },
+ {
+ .name = "getjob",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_get_job,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get print job",
+ .usage = "",
+ },
+ {
+ .name = "setjob",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_set_job,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Set print job",
+ .usage = "",
+ },
+ {
+ .name = "enumports",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_ports,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate printer ports",
+ .usage = "",
+ },
+ {
+ .name = "enumdrivers",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_drivers,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate installed printer drivers",
+ .usage = "",
+ },
+ {
+ .name = "enumprinters",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_printers,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate printers",
+ .usage = "",
+ },
+ {
+ .name = "getdata",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getprinterdata,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get print driver data",
+ .usage = "",
+ },
+ {
+ .name = "getdataex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getprinterdataex,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get printer driver data with keyname",
+ .usage = "",
+ },
+ {
+ .name = "getdriver",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getdriver,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get print driver information",
+ .usage = "",
+ },
+ {
+ .name = "getdriverdir",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getdriverdir,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get print driver upload directory",
+ .usage = "",
+ },
+ {
+ .name = "getdriverpackagepath",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getdriverpackagepath,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get print driver package download directory",
+ .usage = "",
+ },
+ {
+ .name = "getprinter",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getprinter,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get printer info",
+ .usage = "",
+ },
+ {
+ .name = "openprinter",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_open_printer,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Open printer handle",
+ .usage = "",
+ },
+ {
+ .name = "openprinter_ex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_open_printer_ex,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Open printer handle",
+ .usage = "",
+ },
+ {
+ .name = "setdriver",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_setdriver,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Set printer driver",
+ .usage = "",
+ },
+ {
+ .name = "getprintprocdir",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getprintprocdir,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get print processor directory",
+ .usage = "",
+ },
+ {
+ .name = "addform",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_addform,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Add form",
+ .usage = "",
+ },
+ {
+ .name = "setform",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_setform,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Set form",
+ .usage = "",
+ },
+ {
+ .name = "getform",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_getform,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Get form",
+ .usage = "",
+ },
+ {
+ .name = "deleteform",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_deleteform,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Delete form",
+ .usage = "",
+ },
+ {
+ .name = "enumforms",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_forms,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate forms",
+ .usage = "",
+ },
+ {
+ .name = "setprinter",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_setprinter,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Set printer comment",
+ .usage = "",
+ },
+ {
+ .name = "setprintername",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_setprintername,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Set printername",
+ .usage = "",
+ },
+ {
+ .name = "setprinterdata",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_setprinterdata,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Set REG_SZ printer data",
+ .usage = "",
+ },
+ {
+ .name = "rffpcnex",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_rffpcnex,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Rffpcnex test",
+ .usage = "",
+ },
+ {
+ .name = "printercmp",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_printercmp,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Printer comparison test",
+ .usage = "",
+ },
+ {
+ .name = "enumprocs",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_procs,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate Print Processors",
+ .usage = "",
+ },
+ {
+ .name = "enumprocdatatypes",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_proc_data_types,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate Print Processor Data Types",
+ .usage = "",
+ },
+ {
+ .name = "enummonitors",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_enum_monitors,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Enumerate Print Monitors",
+ .usage = "",
+ },
+ {
+ .name = "createprinteric",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_create_printer_ic,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Create Printer IC",
+ .usage = "",
+ },
+ {
+ .name = "playgdiscriptonprinteric",
+ .returntype = RPC_RTYPE_WERROR,
+ .ntfn = NULL,
+ .wfn = cmd_spoolss_play_gdi_script_on_printer_ic,
+ .table = &ndr_table_spoolss,
+ .rpc_pipe = NULL,
+ .description = "Create Printer IC",
+ .usage = "",
+ },
+
+ {
+ .name = NULL,
+ },
};