1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

s3:rpcclient: Use C99 initializer for cmd_set in cmd_spoolss

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andreas Schneider 2019-01-08 17:50:20 +01:00 committed by Andreas Schneider
parent 78b45a4762
commit 65729e3782

View File

@ -3919,46 +3919,393 @@ static WERROR cmd_spoolss_play_gdi_script_on_printer_ic(struct rpc_pipe_client *
/* List of commands exported by this module */
struct cmd_set spoolss_commands[] = {
{ "SPOOLSS" },
{
.name = "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", "" },
{ "getdriverpackagepath", RPC_RTYPE_WERROR, NULL, cmd_spoolss_getdriverpackagepath, &ndr_table_spoolss, NULL, "Get print driver package download 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", "" },
{ "playgdiscriptonprinteric", RPC_RTYPE_WERROR, NULL, cmd_spoolss_play_gdi_script_on_printer_ic, &ndr_table_spoolss, NULL, "Create Printer IC", "" },
{
.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 = "",
},
{ NULL }
{
.name = NULL,
},
};