summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libnet/libnet_join.c12
-rw-r--r--source3/rpc_client/cli_samr.c38
-rw-r--r--source3/rpcclient/cmd_samr.c134
-rw-r--r--source3/utils/net_domain.c12
-rw-r--r--source3/utils/net_rpc.c34
-rw-r--r--source3/utils/net_rpc_join.c4
-rw-r--r--source3/utils/net_rpc_sh_acct.c4
-rw-r--r--source3/winbindd/winbindd_pam.c6
-rw-r--r--source3/winbindd/winbindd_rpc.c6
9 files changed, 107 insertions, 143 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 3c6cea31bb..c34afc7cae 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -704,7 +704,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
}
if (NT_STATUS_IS_OK(status)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
}
}
@@ -769,7 +769,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
goto done;
}
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
cli_rpc_pipe_close(pipe_hnd);
status = NT_STATUS_OK;
@@ -877,7 +877,7 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
status = rpccli_samr_query_userinfo(pipe_hnd, mem_ctx,
&user_pol, 16, &qctr);
if (!NT_STATUS_IS_OK(status)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
goto done;
}
@@ -890,12 +890,12 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
status = rpccli_samr_set_userinfo2(pipe_hnd, mem_ctx, &user_pol, 16,
&cli->user_session_key, &ctr);
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
done:
if (pipe_hnd) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
- rpccli_samr_close(pipe_hnd, mem_ctx, &sam_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &sam_pol);
cli_rpc_pipe_close(pipe_hnd);
}
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index a752717e8c..2fb3768866 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -95,44 +95,6 @@ NTSTATUS rpccli_samr_connect4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return result;
}
-/* Close SAMR handle */
-
-NTSTATUS rpccli_samr_close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *connect_pol)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_CLOSE_HND q;
- SAMR_R_CLOSE_HND r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- DEBUG(10,("cli_samr_close\n"));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_samr_q_close_hnd(&q, connect_pol);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_CLOSE_HND,
- q, r,
- qbuf, rbuf,
- samr_io_q_close_hnd,
- samr_io_r_close_hnd,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- if (NT_STATUS_IS_OK(result = r.status)) {
-#ifdef __INSURE__
- SAFE_FREE(connect_pol->marker);
-#endif
- *connect_pol = r.pol;
- }
-
- return result;
-}
-
/* Open handle on a domain */
NTSTATUS rpccli_samr_open_domain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index ae22a68deb..11d9c983df 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -435,9 +435,9 @@ static NTSTATUS cmd_samr_query_user(struct rpc_pipe_client *cli,
break;
}
- rpccli_samr_close(cli, mem_ctx, &user_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
@@ -589,9 +589,9 @@ static NTSTATUS cmd_samr_query_group(struct rpc_pipe_client *cli,
display_group_info_ctr(group_ctr);
- rpccli_samr_close(cli, mem_ctx, &group_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &group_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -657,9 +657,9 @@ static NTSTATUS cmd_samr_query_usergroups(struct rpc_pipe_client *cli,
user_gids[i].g_rid, user_gids[i].attr);
}
- rpccli_samr_close(cli, mem_ctx, &user_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -750,8 +750,8 @@ static NTSTATUS cmd_samr_query_useraliases(struct rpc_pipe_client *cli,
printf("\tgroup rid:[0x%x]\n", alias_rids[i]);
}
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -820,9 +820,9 @@ static NTSTATUS cmd_samr_query_groupmem(struct rpc_pipe_client *cli,
group_attrs[i]);
}
- rpccli_samr_close(cli, mem_ctx, &group_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &group_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -896,10 +896,10 @@ static NTSTATUS cmd_samr_enum_dom_users(struct rpc_pipe_client *cli,
done:
if (got_domain_pol)
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (got_connect_pol)
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
return result;
}
@@ -969,10 +969,10 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct rpc_pipe_client *cli,
done:
if (got_domain_pol)
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (got_connect_pol)
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
return result;
}
@@ -1048,10 +1048,10 @@ static NTSTATUS cmd_samr_enum_als_groups(struct rpc_pipe_client *cli,
done:
if (got_domain_pol)
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (got_connect_pol)
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
return result;
}
@@ -1123,9 +1123,9 @@ static NTSTATUS cmd_samr_query_aliasmem(struct rpc_pipe_client *cli,
printf("\tsid:[%s]\n", sid_str);
}
- rpccli_samr_close(cli, mem_ctx, &alias_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &alias_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -1200,8 +1200,8 @@ static NTSTATUS cmd_samr_delete_alias(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -1336,8 +1336,8 @@ static NTSTATUS cmd_samr_query_dispinfo(struct rpc_pipe_client *cli,
}
} while ( NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES));
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -1434,9 +1434,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct rpc_pipe_client *cli,
}
done:
-
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
return result;
}
@@ -1496,13 +1496,13 @@ static NTSTATUS cmd_samr_create_dom_user(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_close(cli, mem_ctx, &user_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &user_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &connect_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
done:
@@ -1556,13 +1556,13 @@ static NTSTATUS cmd_samr_create_dom_group(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_close(cli, mem_ctx, &group_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &group_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &connect_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
done:
@@ -1615,13 +1615,13 @@ static NTSTATUS cmd_samr_create_dom_alias(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_close(cli, mem_ctx, &alias_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &alias_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &connect_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
done:
@@ -1675,8 +1675,8 @@ static NTSTATUS cmd_samr_lookup_names(struct rpc_pipe_client *cli,
num_names = argc - 2;
if ((names = TALLOC_ARRAY(mem_ctx, const char *, num_names)) == NULL) {
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
result = NT_STATUS_NO_MEMORY;
goto done;
}
@@ -1697,8 +1697,8 @@ static NTSTATUS cmd_samr_lookup_names(struct rpc_pipe_client *cli,
printf("name %s: 0x%x (%d)\n", names[i], rids[i],
name_types[i]);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -1747,8 +1747,8 @@ static NTSTATUS cmd_samr_lookup_rids(struct rpc_pipe_client *cli,
num_rids = argc - 2;
if ((rids = TALLOC_ARRAY(mem_ctx, uint32, num_rids)) == NULL) {
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
result = NT_STATUS_NO_MEMORY;
goto done;
}
@@ -1768,8 +1768,8 @@ static NTSTATUS cmd_samr_lookup_rids(struct rpc_pipe_client *cli,
for (i = 0; i < num_names; i++)
printf("rid 0x%x: %s (%d)\n", rids[i], names[i], name_types[i]);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -1838,9 +1838,9 @@ static NTSTATUS cmd_samr_delete_dom_group(struct rpc_pipe_client *cli,
/* Display results */
- rpccli_samr_close(cli, mem_ctx, &group_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &group_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
@@ -1910,9 +1910,9 @@ static NTSTATUS cmd_samr_delete_dom_user(struct rpc_pipe_client *cli,
/* Display results */
- rpccli_samr_close(cli, mem_ctx, &user_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
@@ -1998,9 +1998,9 @@ static NTSTATUS cmd_samr_query_sec_obj(struct rpc_pipe_client *cli,
display_sec_desc(sec_desc_buf->sd);
- rpccli_samr_close(cli, mem_ctx, &user_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
talloc_destroy(ctx);
return result;
@@ -2047,13 +2047,15 @@ static NTSTATUS cmd_samr_get_usrdom_pwinfo(struct rpc_pipe_client *cli,
result = rpccli_samr_GetUserPwInfo(cli, mem_ctx, &user_pol, &info);
if (NT_STATUS_IS_OK(result)) {
printf("min_password_length: %d\n", info.min_password_length);
- display_password_properties(info.password_properties);
+ printf("%s\n",
+ NDR_PRINT_STRUCT_STRING(mem_ctx,
+ samr_PasswordProperties, &info.password_properties));
}
done:
- rpccli_samr_close(cli, mem_ctx, &user_pol);
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
return result;
}
@@ -2127,8 +2129,8 @@ static NTSTATUS cmd_samr_lookup_domain(struct rpc_pipe_client *cli,
domain_name,sid_string);
}
- rpccli_samr_close(cli, mem_ctx, &domain_pol);
- rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ rpccli_samr_Close(cli, mem_ctx, &domain_pol);
+ rpccli_samr_Close(cli, mem_ctx, &connect_pol);
done:
return result;
}
@@ -2176,10 +2178,10 @@ static NTSTATUS cmd_samr_chgpasswd2(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &connect_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
done:
@@ -2255,10 +2257,10 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_close(cli, mem_ctx, &domain_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &domain_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_close(cli, mem_ctx, &connect_pol);
+ result = rpccli_samr_Close(cli, mem_ctx, &connect_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
done:
diff --git a/source3/utils/net_domain.c b/source3/utils/net_domain.c
index 1c34a3b60e..b15f61bf63 100644
--- a/source3/utils/net_domain.c
+++ b/source3/utils/net_domain.c
@@ -108,7 +108,7 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
status = rpccli_samr_query_userinfo(pipe_hnd, mem_ctx, &user_pol, 16, &qctr);
if ( !NT_STATUS_IS_OK(status) ) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
goto done;
}
@@ -123,11 +123,11 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
status = rpccli_samr_set_userinfo2(pipe_hnd, mem_ctx, &user_pol, 16,
&cli->user_session_key, &ctr);
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
done:
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
- rpccli_samr_close(pipe_hnd, mem_ctx, &sam_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &sam_pol);
cli_rpc_pipe_close(pipe_hnd); /* Done with this pipe */
@@ -274,7 +274,7 @@ NTSTATUS netdom_join_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
/* We *must* do this.... don't ask... */
if (NT_STATUS_IS_OK(status)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
}
status = rpccli_samr_lookup_names(pipe_hnd, mem_ctx,
@@ -344,7 +344,7 @@ NTSTATUS netdom_join_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
return status;
}
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
cli_rpc_pipe_close(pipe_hnd); /* Done with this pipe */
return status;
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 46fbcfb8ca..2140829649 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1401,13 +1401,13 @@ static NTSTATUS rpc_sh_handle_user(TALLOC_CTX *mem_ctx,
done:
if (is_valid_policy_hnd(&user_pol)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
}
if (is_valid_policy_hnd(&domain_pol)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
}
if (is_valid_policy_hnd(&connect_pol)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
}
return result;
}
@@ -1824,7 +1824,7 @@ static NTSTATUS rpc_group_delete_internals(const DOM_SID *domain_sid,
group_is_primary = True;
}
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
}
if (group_is_primary) {
@@ -2131,7 +2131,7 @@ static NTSTATUS rpc_add_groupmem(struct rpc_pipe_client *pipe_hnd,
result = rpccli_samr_add_groupmem(pipe_hnd, mem_ctx, &group_pol, rids[0]);
done:
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
return result;
}
@@ -2194,7 +2194,7 @@ static NTSTATUS rpc_add_aliasmem(struct rpc_pipe_client *pipe_hnd,
}
done:
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
return result;
}
@@ -2308,7 +2308,7 @@ static NTSTATUS rpc_del_groupmem(struct rpc_pipe_client *pipe_hnd,
result = rpccli_samr_del_groupmem(pipe_hnd, mem_ctx, &group_pol, rids[0]);
done:
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
return result;
}
@@ -2368,7 +2368,7 @@ static NTSTATUS rpc_del_aliasmem(struct rpc_pipe_client *pipe_hnd,
return result;
done:
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
return result;
}
@@ -2571,7 +2571,7 @@ static NTSTATUS rpc_group_list_internals(const DOM_SID *domain_sid,
(NT_STATUS_IS_OK(rpccli_samr_query_alias_info(pipe_hnd, mem_ctx,
&alias_pol, 3,
&ctr))) &&
- (NT_STATUS_IS_OK(rpccli_samr_close(pipe_hnd, mem_ctx,
+ (NT_STATUS_IS_OK(rpccli_samr_Close(pipe_hnd, mem_ctx,
&alias_pol)))) {
description = unistr2_to_ascii_talloc(mem_ctx,
ctr.alias.info3.description.string);
@@ -2587,7 +2587,7 @@ static NTSTATUS rpc_group_list_internals(const DOM_SID *domain_sid,
}
}
} while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES));
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
/* Get builtin policy handle */
result = rpccli_samr_open_domain(pipe_hnd, mem_ctx, &connect_pol,
@@ -2626,7 +2626,7 @@ static NTSTATUS rpc_group_list_internals(const DOM_SID *domain_sid,
(NT_STATUS_IS_OK(rpccli_samr_query_alias_info(pipe_hnd, mem_ctx,
&alias_pol, 3,
&ctr))) &&
- (NT_STATUS_IS_OK(rpccli_samr_close(pipe_hnd, mem_ctx,
+ (NT_STATUS_IS_OK(rpccli_samr_Close(pipe_hnd, mem_ctx,
&alias_pol)))) {
description = unistr2_to_ascii_talloc(mem_ctx,
ctr.alias.info3.description.string);
@@ -2838,7 +2838,7 @@ static NTSTATUS rpc_group_members_internals(const DOM_SID *domain_sid,
DOM_SID sid_Builtin;
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
string_to_sid(&sid_Builtin, "S-1-5-32");
@@ -4045,7 +4045,7 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_close(pipe_hnd, mem_ctx, &alias_pol);
+ result = rpccli_samr_Close(pipe_hnd, mem_ctx, &alias_pol);
if (!NT_STATUS_IS_OK(result))
goto done;
@@ -4069,7 +4069,7 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd,
result = NT_STATUS_OK;
done:
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
return result;
}
@@ -4169,7 +4169,7 @@ static NTSTATUS rpc_aliaslist_internals(const DOM_SID *domain_sid,
result = rpc_fetch_domain_aliases(pipe_hnd, mem_ctx, &connect_pol,
domain_sid);
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
done:
return result;
}
@@ -6286,12 +6286,12 @@ static int rpc_trustdom_list(int argc, const char **argv)
} while (NT_STATUS_EQUAL(nt_status, STATUS_MORE_ENTRIES));
/* close opened samr and domain policy handles */
- nt_status = rpccli_samr_close(pipe_hnd, mem_ctx, &domain_hnd);
+ nt_status = rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Couldn't properly close domain policy handle for domain %s\n", domain_name));
};
- nt_status = rpccli_samr_close(pipe_hnd, mem_ctx, &connect_hnd);
+ nt_status = rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_hnd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("Couldn't properly close samr policy handle for domain %s\n", domain_name));
};
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 271219938e..de8661b0df 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -280,7 +280,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* We *must* do this.... don't ask... */
if (NT_STATUS_IS_OK(result)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
}
CHECK_RPC_ERR_DEBUG(rpccli_samr_lookup_names(pipe_hnd, mem_ctx,
@@ -353,7 +353,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
result = rpccli_samr_set_userinfo2(pipe_hnd, mem_ctx, &user_pol, 16,
&cli->user_session_key, &ctr);
- rpccli_samr_close(pipe_hnd, mem_ctx, &user_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
cli_rpc_pipe_close(pipe_hnd); /* Done with this pipe */
/* Now check the whole process from top-to-bottom */
diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c
index ac0ffca1f3..f5b0c2e0d7 100644
--- a/source3/utils/net_rpc_sh_acct.c
+++ b/source3/utils/net_rpc_sh_acct.c
@@ -118,10 +118,10 @@ static NTSTATUS rpc_sh_acct_do(TALLOC_CTX *mem_ctx,
done:
if (is_valid_policy_hnd(&domain_pol)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &domain_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
}
if (is_valid_policy_hnd(&connect_pol)) {
- rpccli_samr_close(pipe_hnd, mem_ctx, &connect_pol);
+ rpccli_samr_Close(pipe_hnd, mem_ctx, &connect_pol);
}
return result;
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index ea9a07d388..59ca15a623 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1356,14 +1356,14 @@ NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
if (!NT_STATUS_IS_OK(status_tmp)) {
DEBUG(3, ("could not query user info on SAMR pipe: %s\n",
nt_errstr(status_tmp)));
- rpccli_samr_close(samr_pipe, state->mem_ctx, &user_pol);
+ rpccli_samr_Close(samr_pipe, state->mem_ctx, &user_pol);
goto done;
}
acct_flags = user_ctr->info.id16->acb_info;
if (acct_flags == 0) {
- rpccli_samr_close(samr_pipe, state->mem_ctx, &user_pol);
+ rpccli_samr_Close(samr_pipe, state->mem_ctx, &user_pol);
goto done;
}
@@ -1371,7 +1371,7 @@ NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
DEBUG(10,("successfully retrieved acct_flags 0x%x\n", acct_flags));
- rpccli_samr_close(samr_pipe, state->mem_ctx, &user_pol);
+ rpccli_samr_Close(samr_pipe, state->mem_ctx, &user_pol);
}
*info3 = my_info3;
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 34ba0498e0..47a8d430b2 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -480,7 +480,7 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
result = rpccli_samr_query_userinfo(cli, mem_ctx, &user_pol,
0x15, &ctr);
- rpccli_samr_close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
if (!NT_STATUS_IS_OK(result))
return result;
@@ -555,7 +555,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
result = rpccli_samr_query_usergroups(cli, mem_ctx, &user_pol,
num_groups, &user_groups);
- rpccli_samr_close(cli, mem_ctx, &user_pol);
+ rpccli_samr_Close(cli, mem_ctx, &user_pol);
if (!NT_STATUS_IS_OK(result) || (*num_groups) == 0)
return result;
@@ -721,7 +721,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
/* And restore our original timeout. */
cli_set_timeout(cli->cli, orig_timeout);
- rpccli_samr_close(cli, mem_ctx, &group_pol);
+ rpccli_samr_Close(cli, mem_ctx, &group_pol);
if (!NT_STATUS_IS_OK(result))
return result;