summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-01 11:57:53 +0100
committerGünther Deschner <gd@samba.org>2008-02-01 12:30:15 +0100
commit37b56c0113263a741c62100cd4b13388cb2a83fa (patch)
treeb9ee56bb40b5ba21714a27dba1a3294cb10a8ad8 /source3/utils
parente8c794fabee9aa19183447a915ea9a0d2cc9fda8 (diff)
downloadsamba-37b56c0113263a741c62100cd4b13388cb2a83fa.tar.gz
samba-37b56c0113263a741c62100cd4b13388cb2a83fa.tar.bz2
samba-37b56c0113263a741c62100cd4b13388cb2a83fa.zip
Use rpccli_samr_OpenUser() all over the place.
Guenther (This used to be commit da90eb7653554d242da83ed98adae35ced3a2938)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_domain.c14
-rw-r--r--source3/utils/net_rpc.c63
-rw-r--r--source3/utils/net_rpc_join.c8
3 files changed, 55 insertions, 30 deletions
diff --git a/source3/utils/net_domain.c b/source3/utils/net_domain.c
index 15764e47f6..93b9d0bc25 100644
--- a/source3/utils/net_domain.c
+++ b/source3/utils/net_domain.c
@@ -101,8 +101,11 @@ NTSTATUS netdom_leave_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
/* Open handle on user */
- status = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED, user_rid, &user_pol);
+ status = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ user_rid,
+ &user_pol);
if ( !NT_STATUS_IS_OK(status) ) {
goto done;
}
@@ -298,8 +301,11 @@ NTSTATUS netdom_join_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
/* Open handle on user */
- status = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED, user_rid, &user_pol);
+ status = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ user_rid,
+ &user_pol);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index e5491f7cf6..eb21741a95 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -652,9 +652,11 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid,
goto done;
}
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- user_rids[0], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ user_rids[0],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
goto done;
@@ -786,9 +788,11 @@ static NTSTATUS rpc_user_del_internals(const DOM_SID *domain_sid,
goto done;
}
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- user_rids[0], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ user_rids[0],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
goto done;
@@ -896,8 +900,11 @@ static NTSTATUS rpc_user_rename_internals(const DOM_SID *domain_sid,
}
/* Open domain user */
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS, user_rid[0], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ user_rid[0],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
goto done;
@@ -1049,9 +1056,11 @@ static NTSTATUS rpc_user_password_internals(const DOM_SID *domain_sid,
goto done;
}
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- user_rids[0], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ user_rids[0],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
goto done;
@@ -1160,9 +1169,11 @@ static NTSTATUS rpc_user_info_internals(const DOM_SID *domain_sid,
if (!NT_STATUS_IS_OK(result)) goto done;
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- rids[0], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ rids[0],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) goto done;
result = rpccli_samr_query_usergroups(pipe_hnd, mem_ctx, &user_pol,
@@ -1408,9 +1419,11 @@ static NTSTATUS rpc_sh_handle_user(TALLOC_CTX *mem_ctx,
goto done;
}
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- rid, &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ rid,
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
goto done;
}
@@ -1819,9 +1832,11 @@ static NTSTATUS rpc_group_delete_internals(const DOM_SID *domain_sid,
/* Check if group is anyone's primary group */
for (i = 0; i < num_members; i++)
{
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- group_rids[i], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ group_rids[i],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
d_fprintf(stderr, "Unable to open group member %d\n",group_rids[i]);
@@ -5603,9 +5618,11 @@ static NTSTATUS rpc_trustdom_del_internals(const DOM_SID *domain_sid,
goto done;
}
- result = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- MAXIMUM_ALLOWED_ACCESS,
- user_rids[0], &user_pol);
+ result = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ user_rids[0],
+ &user_pol);
if (!NT_STATUS_IS_OK(result)) {
goto done;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 41ee4f2c36..dbce7e9a43 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -303,9 +303,11 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Open handle on user */
CHECK_RPC_ERR_DEBUG(
- rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- user_rid, &user_pol),
+ rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ user_rid,
+ &user_pol),
("could not re-open existing user %s: %s\n",
acct_name, nt_errstr(result)));