1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

r15385: Some work to bring the python code up to date with the

rpc client rewrite.
This commit is contained in:
Deryck Hodge
2006-05-01 22:31:33 +00:00
committed by Gerald (Jerry) Carter
parent a02933c958
commit fd5bcecceb
9 changed files with 17 additions and 17 deletions

View File

@ -20,7 +20,7 @@
#include "python/py_lsa.h"
PyObject *new_lsa_policy_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
PyObject *new_lsa_policy_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol)
{
lsa_policy_hnd_object *o;
@ -90,14 +90,14 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args,
}
ntstatus = rpccli_lsa_open_policy(
cli, mem_ctx, True, desired_access, &hnd);
cli->pipe_list, mem_ctx, True, desired_access, &hnd);
if (!NT_STATUS_IS_OK(ntstatus)) {
PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus));
goto done;
}
result = new_lsa_policy_hnd_object(cli, mem_ctx, &hnd);
result = new_lsa_policy_hnd_object(cli->pipe_list, mem_ctx, &hnd);
done:
if (!result) {

View File

@ -27,7 +27,7 @@
typedef struct {
PyObject_HEAD
struct cli_state *cli;
struct rpc_pipe_client *cli;
TALLOC_CTX *mem_ctx;
POLICY_HND pol;
} lsa_policy_hnd_object;

View File

@ -569,7 +569,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw)
goto done;
}
ntstatus = rpccli_samr_connect(cli, mem_ctx, desired_access, &hnd);
ntstatus = rpccli_samr_connect(cli->pipe_list, mem_ctx, desired_access, &hnd);
if (!NT_STATUS_IS_OK(ntstatus)) {
cli_shutdown(cli);

View File

@ -27,7 +27,7 @@
typedef struct {
PyObject_HEAD
struct cli_state *cli;
struct rpc_pipe_client *cli;
TALLOC_CTX *mem_ctx;
POLICY_HND connect_pol;
} samr_connect_hnd_object;
@ -36,7 +36,7 @@ typedef struct {
typedef struct {
PyObject_HEAD
struct cli_state *cli;
struct rpc_pipe_client *cli;
TALLOC_CTX *mem_ctx;
POLICY_HND domain_pol;
} samr_domain_hnd_object;
@ -45,7 +45,7 @@ typedef struct {
typedef struct {
PyObject_HEAD
struct cli_state *cli;
struct rpc_pipe_client *cli;
TALLOC_CTX *mem_ctx;
POLICY_HND user_pol;
} samr_user_hnd_object;

View File

@ -70,7 +70,7 @@ PyObject *spoolss_enumprinterdrivers(PyObject *self, PyObject *args,
}
werror = rpccli_spoolss_enumprinterdrivers(
cli, mem_ctx, level, arch,
cli->pipe_list, mem_ctx, level, arch,
&num_drivers, &ctr);
if (!W_ERROR_IS_OK(werror)) {
@ -263,7 +263,7 @@ PyObject *spoolss_getprinterdriverdir(PyObject *self, PyObject *args,
}
werror = rpccli_spoolss_getprinterdriverdir(
cli, mem_ctx, level, arch, &ctr);
cli->pipe_list, mem_ctx, level, arch, &ctr);
if (!W_ERROR_IS_OK(werror)) {
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
@ -361,7 +361,7 @@ PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args,
goto done;
}
werror = rpccli_spoolss_addprinterdriver(cli, mem_ctx, level, &ctr);
werror = rpccli_spoolss_addprinterdriver(cli->pipe_list, mem_ctx, level, &ctr);
if (!W_ERROR_IS_OK(werror)) {
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));

View File

@ -68,7 +68,7 @@ PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw)
/* Call rpc function */
werror = rpccli_spoolss_enum_ports(
cli, mem_ctx, level, &num_ports, &ctr);
cli->pipe_list, mem_ctx, level, &num_ports, &ctr);
if (!W_ERROR_IS_OK(werror)) {
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));

View File

@ -321,7 +321,7 @@ PyObject *spoolss_hnd_enumprinterdataex(PyObject *self, PyObject *args, PyObject
return NULL;
if (!(ctr = TALLOC_ZERO_P(hnd->mem_ctx, REGVAL_CTR))) {
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
PyErr_SetString(spoolss_error, "talloc failed");
return NULL;
}

View File

@ -69,7 +69,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw)
}
werror = rpccli_spoolss_open_printer_ex(
cli, mem_ctx, unc_name, "", desired_access, server,
cli->pipe_list, mem_ctx, unc_name, "", desired_access, server,
"", &hnd);
if (!W_ERROR_IS_OK(werror)) {
@ -327,7 +327,7 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw)
/* Call rpc function */
werror = rpccli_spoolss_enum_printers(
cli, mem_ctx, name, flags, level, &num_printers, &ctr);
cli->pipe_list, mem_ctx, name, flags, level, &num_printers, &ctr);
if (!W_ERROR_IS_OK(werror)) {
PyErr_SetObject(spoolss_werror, py_werror_tuple(werror));
@ -448,7 +448,7 @@ PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw)
ctr.printers_2 = &info2;
werror = rpccli_spoolss_addprinterex(cli, mem_ctx, 2, &ctr);
werror = rpccli_spoolss_addprinterex(cli->pipe_list, mem_ctx, 2, &ctr);
Py_INCREF(Py_None);
result = Py_None;

View File

@ -120,7 +120,7 @@ PyObject *srvsvc_netservergetinfo(PyObject *self, PyObject *args,
ZERO_STRUCT(ctr);
status = rpccli_srvsvc_net_srv_get_info(cli, mem_ctx, level, &ctr);
status = rpccli_srvsvc_net_srv_get_info(cli->pipe_list, mem_ctx, level, &ctr);
if (!NT_STATUS_IS_OK(status)) {
PyErr_SetObject(srvsvc_error, py_werror_tuple(status));