This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "python/py_samr.h"
NTSTATUS ntstatus;
int level;
union {
- SAM_USER_INFO_10 id10;
+ SAM_USER_INFO_16 id16;
SAM_USER_INFO_21 id21;
} pinfo;
ctr.switch_value = level;
switch(level) {
- case 0x10:
- ctr.info.id10 = &pinfo.id10;
+ case 16:
+ ctr.info.id16 = &pinfo.id16;
- if (!py_to_SAM_USER_INFO_10(ctr.info.id10, info)) {
+ if (!py_to_SAM_USER_INFO_16(ctr.info.id16, info)) {
PyErr_SetString(
samr_error, "error converting user info");
goto done;
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);
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)) {
0, /*tp_hash */
};
-PyObject *new_samr_user_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+PyObject *new_samr_user_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol)
{
samr_user_hnd_object *o;
PyObject_Del(self);
}
-PyObject *new_samr_domain_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+PyObject *new_samr_domain_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol)
{
samr_domain_hnd_object *o;
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);
0, /*tp_hash */
};
-PyObject *new_samr_connect_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+PyObject *new_samr_connect_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol)
{
samr_connect_hnd_object *o;
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);
uint32 user_rid;
PyObject *result = NULL;
TALLOC_CTX *mem_ctx;
- uint16 acb_info = ACB_NORMAL;
+ uint32 acb_info = ACB_NORMAL;
POLICY_HND user_pol;
if (!PyArg_ParseTupleAndKeywords(
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);
goto done;
}
- ntstatus = cli_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);
goto done;
}
- result = new_samr_connect_hnd_object(cli, mem_ctx, &hnd);
+ result = new_samr_connect_hnd_object(cli->pipe_list, mem_ctx, &hnd);
done:
if (!result) {