mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
r10802: Janitor for tpot - remember to keep 3.0 in sync.
Jeremy.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
92fa541f6e
commit
4b7a60e95e
@ -32,13 +32,6 @@
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
/* Return a cli_state struct opened on the specified pipe. If credentials
|
||||
are passed use them. */
|
||||
|
||||
typedef struct cli_state *(cli_pipe_fn)(
|
||||
struct cli_state *cli, char *system_name,
|
||||
struct ntuser_creds *creds);
|
||||
|
||||
/* The following definitions come from python/py_common.c */
|
||||
|
||||
PyObject *py_werror_tuple(WERROR werror);
|
||||
|
@ -89,8 +89,8 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ntstatus = cli_lsa_open_policy(cli, mem_ctx, True,
|
||||
desired_access, &hnd);
|
||||
ntstatus = rpccli_lsa_open_policy(
|
||||
cli, mem_ctx, True, desired_access, &hnd);
|
||||
|
||||
if (!NT_STATUS_IS_OK(ntstatus)) {
|
||||
PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus));
|
||||
@ -125,7 +125,7 @@ static PyObject *lsa_close(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
result = cli_lsa_close(hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
result = rpccli_lsa_close(hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
|
||||
/* Cleanup samba stuff */
|
||||
|
||||
@ -185,8 +185,9 @@ static PyObject *lsa_lookup_names(PyObject *self, PyObject *args)
|
||||
names[0] = PyString_AsString(py_names);
|
||||
}
|
||||
|
||||
ntstatus = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol,
|
||||
num_names, names, &sids, &name_types);
|
||||
ntstatus = rpccli_lsa_lookup_names(
|
||||
hnd->cli, mem_ctx, &hnd->pol, num_names, names, &sids,
|
||||
&name_types);
|
||||
|
||||
if (!NT_STATUS_IS_OK(ntstatus) && NT_STATUS_V(ntstatus) != 0x107) {
|
||||
PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus));
|
||||
@ -267,9 +268,9 @@ static PyObject *lsa_lookup_sids(PyObject *self, PyObject *args,
|
||||
}
|
||||
}
|
||||
|
||||
ntstatus = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol,
|
||||
num_sids, sids, &domains, &names,
|
||||
&types);
|
||||
ntstatus = rpccli_lsa_lookup_sids(
|
||||
hnd->cli, mem_ctx, &hnd->pol, num_sids, sids, &domains,
|
||||
&names, &types);
|
||||
|
||||
if (!NT_STATUS_IS_OK(ntstatus)) {
|
||||
PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus));
|
||||
@ -306,7 +307,7 @@ static PyObject *lsa_enum_trust_dom(PyObject *self, PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
ntstatus = cli_lsa_enum_trust_dom(
|
||||
ntstatus = rpccli_lsa_enum_trust_dom(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, &enum_ctx,
|
||||
&num_domains, &domain_names, &domain_sids);
|
||||
|
||||
|
@ -197,7 +197,7 @@ static PyObject *samr_set_user_info2(PyObject *self, PyObject *args,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ntstatus = cli_samr_set_userinfo2(
|
||||
ntstatus = rpccli_samr_set_userinfo2(
|
||||
user_hnd->cli, mem_ctx, &user_hnd->user_pol, level,
|
||||
sess_key, &ctr);
|
||||
|
||||
@ -233,7 +233,7 @@ static PyObject *samr_delete_dom_user(PyObject *self, PyObject *args,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ntstatus = cli_samr_delete_dom_user(
|
||||
ntstatus = rpccli_samr_delete_dom_user(
|
||||
user_hnd->cli, mem_ctx, &user_hnd->user_pol);
|
||||
|
||||
if (!NT_STATUS_IS_OK(ntstatus)) {
|
||||
@ -344,7 +344,7 @@ static PyObject *samr_open_domain(PyObject *self, PyObject *args, PyObject *kw)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ntstatus = cli_samr_open_domain(
|
||||
ntstatus = rpccli_samr_open_domain(
|
||||
connect_hnd->cli, mem_ctx, &connect_hnd->connect_pol,
|
||||
desired_access, &sid, &domain_pol);
|
||||
|
||||
@ -441,7 +441,7 @@ static PyObject *samr_enum_dom_groups(PyObject *self, PyObject *args,
|
||||
size = 0xffff;
|
||||
|
||||
do {
|
||||
result = cli_samr_enum_dom_groups(
|
||||
result = rpccli_samr_enum_dom_groups(
|
||||
domain_hnd->cli, mem_ctx, &domain_hnd->domain_pol,
|
||||
&start_idx, size, &dom_groups, &num_dom_groups);
|
||||
|
||||
@ -479,7 +479,7 @@ static PyObject *samr_create_dom_user(PyObject *self, PyObject *args,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ntstatus = cli_samr_create_dom_user(
|
||||
ntstatus = rpccli_samr_create_dom_user(
|
||||
domain_hnd->cli, mem_ctx, &domain_hnd->domain_pol,
|
||||
account_name, acb_info, unknown, &user_pol, &user_rid);
|
||||
|
||||
@ -569,7 +569,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw)
|
||||
goto done;
|
||||
}
|
||||
|
||||
ntstatus = cli_samr_connect(cli, mem_ctx, desired_access, &hnd);
|
||||
ntstatus = rpccli_samr_connect(cli, mem_ctx, desired_access, &hnd);
|
||||
|
||||
if (!NT_STATUS_IS_OK(ntstatus)) {
|
||||
cli_shutdown(cli);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
struct cli_state *cli;
|
||||
struct rpc_pipe_client *cli;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
POLICY_HND pol;
|
||||
} spoolss_policy_hnd_object;
|
||||
|
@ -69,7 +69,7 @@ PyObject *spoolss_enumprinterdrivers(PyObject *self, PyObject *args,
|
||||
goto done;
|
||||
}
|
||||
|
||||
werror = cli_spoolss_enumprinterdrivers(
|
||||
werror = rpccli_spoolss_enumprinterdrivers(
|
||||
cli, mem_ctx, level, arch,
|
||||
&num_drivers, &ctr);
|
||||
|
||||
@ -182,8 +182,8 @@ PyObject *spoolss_hnd_getprinterdriver(PyObject *self, PyObject *args,
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_getprinterdriver(hnd->cli, hnd->mem_ctx, &hnd->pol, level,
|
||||
arch, version, &ctr);
|
||||
werror = rpccli_spoolss_getprinterdriver(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level, arch, version, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -262,7 +262,8 @@ PyObject *spoolss_getprinterdriverdir(PyObject *self, PyObject *args,
|
||||
goto done;
|
||||
}
|
||||
|
||||
werror = cli_spoolss_getprinterdriverdir(cli, mem_ctx, level, arch, &ctr);
|
||||
werror = rpccli_spoolss_getprinterdriverdir(
|
||||
cli, mem_ctx, level, arch, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -360,7 +361,7 @@ PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args,
|
||||
goto done;
|
||||
}
|
||||
|
||||
werror = cli_spoolss_addprinterdriver(cli, mem_ctx, level, &ctr);
|
||||
werror = rpccli_spoolss_addprinterdriver(cli, mem_ctx, level, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
|
@ -67,7 +67,7 @@ PyObject *spoolss_hnd_addform(PyObject *self, PyObject *args, PyObject *kw)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
werror = cli_spoolss_addform(hnd->cli, hnd->mem_ctx, &hnd->pol,
|
||||
werror = rpccli_spoolss_addform(hnd->cli, hnd->mem_ctx, &hnd->pol,
|
||||
level, &form);
|
||||
|
||||
|
||||
@ -90,7 +90,6 @@ PyObject *spoolss_hnd_getform(PyObject *self, PyObject *args, PyObject *kw)
|
||||
char *form_name;
|
||||
int level = 1;
|
||||
static char *kwlist[] = {"form_name", "level", NULL};
|
||||
uint32 needed;
|
||||
FORM_1 form;
|
||||
|
||||
/* Parse parameters */
|
||||
@ -101,8 +100,8 @@ PyObject *spoolss_hnd_getform(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_getform(hnd->cli, hnd->mem_ctx,
|
||||
&hnd->pol, form_name, level, &form);
|
||||
werror = rpccli_spoolss_getform(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, form_name, level, &form);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -157,7 +156,7 @@ PyObject *spoolss_hnd_setform(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
form_name = PyDict_GetItemString(info, "name");
|
||||
|
||||
werror = cli_spoolss_setform(
|
||||
werror = rpccli_spoolss_setform(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level,
|
||||
PyString_AsString(form_name), &form);
|
||||
|
||||
@ -187,7 +186,7 @@ PyObject *spoolss_hnd_deleteform(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_deleteform(
|
||||
werror = rpccli_spoolss_deleteform(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, form_name);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -218,9 +217,8 @@ PyObject *spoolss_hnd_enumforms(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_enumforms(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level,
|
||||
&num_forms, &forms);
|
||||
werror = rpccli_spoolss_enumforms(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level, &num_forms, &forms);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
|
@ -39,9 +39,9 @@ PyObject *spoolss_hnd_enumjobs(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_enumjobs(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level, 0,
|
||||
1000, &num_jobs, &ctr);
|
||||
werror = rpccli_spoolss_enumjobs(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level, 0, 1000,
|
||||
&num_jobs, &ctr);
|
||||
|
||||
/* Return value */
|
||||
|
||||
@ -99,8 +99,8 @@ PyObject *spoolss_hnd_setjob(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_setjob(hnd->cli, hnd->mem_ctx, &hnd->pol,
|
||||
jobid, level, command);
|
||||
werror = rpccli_spoolss_setjob(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, jobid, level, command);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -130,8 +130,8 @@ PyObject *spoolss_hnd_getjob(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_getjob(hnd->cli, hnd->mem_ctx,
|
||||
&hnd->pol, jobid, level, &ctr);
|
||||
werror = rpccli_spoolss_getjob(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, jobid, level, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -166,7 +166,7 @@ PyObject *spoolss_hnd_startpageprinter(PyObject *self, PyObject *args, PyObject
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_startpageprinter(
|
||||
werror = rpccli_spoolss_startpageprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -194,7 +194,7 @@ PyObject *spoolss_hnd_endpageprinter(PyObject *self, PyObject *args, PyObject *k
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_endpageprinter(
|
||||
werror = rpccli_spoolss_endpageprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -286,7 +286,7 @@ PyObject *spoolss_hnd_startdocprinter(PyObject *self, PyObject *args, PyObject *
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_startdocprinter(
|
||||
werror = rpccli_spoolss_startdocprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, document_name,
|
||||
output_file, data_type, &jobid);
|
||||
|
||||
@ -318,7 +318,8 @@ PyObject *spoolss_hnd_enddocprinter(PyObject *self, PyObject *args, PyObject *kw
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_enddocprinter(hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
werror = rpccli_spoolss_enddocprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -347,7 +348,7 @@ PyObject *spoolss_hnd_writeprinter(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_writeprinter(
|
||||
werror = rpccli_spoolss_writeprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, PyString_Size(data),
|
||||
PyString_AsString(data), &num_written);
|
||||
|
||||
|
@ -67,7 +67,8 @@ PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_enum_ports( cli, mem_ctx, level, &num_ports, &ctr);
|
||||
werror = rpccli_spoolss_enum_ports(
|
||||
cli, mem_ctx, level, &num_ports, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
|
@ -122,7 +122,7 @@ PyObject *spoolss_hnd_getprinterdata(PyObject *self, PyObject *args, PyObject *k
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_getprinterdata(
|
||||
werror = rpccli_spoolss_getprinterdata(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, valuename,
|
||||
&value);
|
||||
|
||||
@ -160,7 +160,7 @@ PyObject *spoolss_hnd_setprinterdata(PyObject *self, PyObject *args, PyObject *k
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_setprinterdata(
|
||||
werror = rpccli_spoolss_setprinterdata(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, &value);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -186,7 +186,7 @@ PyObject *spoolss_hnd_enumprinterdata(PyObject *self, PyObject *args, PyObject *
|
||||
|
||||
/* Get max buffer sizes for value and data */
|
||||
|
||||
werror = cli_spoolss_enumprinterdata(
|
||||
werror = rpccli_spoolss_enumprinterdata(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, ndx, 0, 0,
|
||||
&value_needed, &data_needed, NULL);
|
||||
|
||||
@ -202,7 +202,7 @@ PyObject *spoolss_hnd_enumprinterdata(PyObject *self, PyObject *args, PyObject *
|
||||
while (W_ERROR_IS_OK(werror)) {
|
||||
PyObject *obj;
|
||||
|
||||
werror = cli_spoolss_enumprinterdata(
|
||||
werror = rpccli_spoolss_enumprinterdata(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, ndx,
|
||||
value_needed, data_needed, NULL, NULL, &value);
|
||||
|
||||
@ -231,7 +231,7 @@ PyObject *spoolss_hnd_deleteprinterdata(PyObject *self, PyObject *args, PyObject
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_deleteprinterdata(
|
||||
werror = rpccli_spoolss_deleteprinterdata(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, value);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -259,7 +259,7 @@ PyObject *spoolss_hnd_getprinterdataex(PyObject *self, PyObject *args, PyObject
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_getprinterdataex(
|
||||
werror = rpccli_spoolss_getprinterdataex(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, key,
|
||||
valuename, &value);
|
||||
|
||||
@ -295,7 +295,7 @@ PyObject *spoolss_hnd_setprinterdataex(PyObject *self, PyObject *args, PyObject
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_setprinterdataex(
|
||||
werror = rpccli_spoolss_setprinterdataex(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, keyname, &value);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -322,7 +322,8 @@ PyObject *spoolss_hnd_enumprinterdataex(PyObject *self, PyObject *args, PyObject
|
||||
|
||||
/* Get max buffer sizes for value and data */
|
||||
|
||||
werror = cli_spoolss_enumprinterdataex(hnd->cli, hnd->mem_ctx, &hnd->pol, key, &ctr);
|
||||
werror = rpccli_spoolss_enumprinterdataex(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, key, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -363,7 +364,7 @@ PyObject *spoolss_hnd_deleteprinterdataex(PyObject *self, PyObject *args, PyObje
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_deleteprinterdataex(
|
||||
werror = rpccli_spoolss_deleteprinterdataex(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, key, value);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
@ -393,9 +394,9 @@ PyObject *spoolss_hnd_enumprinterkey(PyObject *self, PyObject *args,
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_enumprinterkey(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol,
|
||||
keyname, &keylist, &keylist_len);
|
||||
werror = rpccli_spoolss_enumprinterkey(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, keyname, &keylist,
|
||||
&keylist_len);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
|
@ -68,7 +68,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw)
|
||||
goto done;
|
||||
}
|
||||
|
||||
werror = cli_spoolss_open_printer_ex(
|
||||
werror = rpccli_spoolss_open_printer_ex(
|
||||
cli, mem_ctx, unc_name, "", desired_access, server,
|
||||
"", &hnd);
|
||||
|
||||
@ -110,7 +110,8 @@ PyObject *spoolss_closeprinter(PyObject *self, PyObject *args)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
result = cli_spoolss_close_printer(hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
result = rpccli_spoolss_close_printer(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol);
|
||||
|
||||
/* Return value */
|
||||
|
||||
@ -138,7 +139,7 @@ PyObject *spoolss_hnd_getprinter(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_getprinter(
|
||||
werror = rpccli_spoolss_getprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level, &ctr);
|
||||
|
||||
/* Return value */
|
||||
@ -249,8 +250,8 @@ PyObject *spoolss_hnd_setprinter(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_setprinter(hnd->cli, hnd->mem_ctx, &hnd->pol,
|
||||
level, &ctr, 0);
|
||||
werror = rpccli_spoolss_setprinter(
|
||||
hnd->cli, hnd->mem_ctx, &hnd->pol, level, &ctr, 0);
|
||||
|
||||
/* Return value */
|
||||
|
||||
@ -325,8 +326,8 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
/* Call rpc function */
|
||||
|
||||
werror = cli_spoolss_enum_printers(cli, mem_ctx, name, flags, level,
|
||||
&num_printers, &ctr);
|
||||
werror = rpccli_spoolss_enum_printers(
|
||||
cli, mem_ctx, name, flags, level, &num_printers, &ctr);
|
||||
|
||||
if (!W_ERROR_IS_OK(werror)) {
|
||||
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
|
||||
@ -447,7 +448,7 @@ PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw)
|
||||
|
||||
ctr.printers_2 = &info2;
|
||||
|
||||
werror = cli_spoolss_addprinterex(cli, mem_ctx, 2, &ctr);
|
||||
werror = rpccli_spoolss_addprinterex(cli, mem_ctx, 2, &ctr);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
result = Py_None;
|
||||
|
@ -120,7 +120,7 @@ PyObject *srvsvc_netservergetinfo(PyObject *self, PyObject *args,
|
||||
|
||||
ZERO_STRUCT(ctr);
|
||||
|
||||
status = cli_srvsvc_net_srv_get_info(cli, mem_ctx, level, &ctr);
|
||||
status = rpccli_srvsvc_net_srv_get_info(cli, mem_ctx, level, &ctr);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
PyErr_SetObject(srvsvc_error, py_werror_tuple(status));
|
||||
|
Reference in New Issue
Block a user