diff options
author | Günther Deschner <gd@samba.org> | 2008-02-01 11:57:53 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-01 12:30:15 +0100 |
commit | 37b56c0113263a741c62100cd4b13388cb2a83fa (patch) | |
tree | b9ee56bb40b5ba21714a27dba1a3294cb10a8ad8 /source3 | |
parent | e8c794fabee9aa19183447a915ea9a0d2cc9fda8 (diff) | |
download | samba-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')
-rw-r--r-- | source3/libnet/libnet_join.c | 16 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 49 | ||||
-rw-r--r-- | source3/utils/net_domain.c | 14 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 63 | ||||
-rw-r--r-- | source3/utils/net_rpc_join.c | 8 | ||||
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 9 | ||||
-rw-r--r-- | source3/winbindd/winbindd_rpc.c | 15 |
7 files changed, 110 insertions, 64 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index cea5ea6d46..bbbf11adc1 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -724,9 +724,11 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx, user_rid = user_rids[0]; - 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; } @@ -869,9 +871,11 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx, user_rid = user_rids[0]; - 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; } diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 68e8d26886..93aca9f15f 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -382,9 +382,11 @@ static NTSTATUS cmd_samr_query_user(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_samr_open_user(cli, mem_ctx, &domain_pol, - access_mask, - user_rid, &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &domain_pol, + access_mask, + user_rid, + &user_pol); if (NT_STATUS_EQUAL(result, NT_STATUS_NO_SUCH_USER) && (user_rid == 0)) { @@ -399,10 +401,11 @@ static NTSTATUS cmd_samr_query_user(struct rpc_pipe_client *cli, &types); if (NT_STATUS_IS_OK(result)) { - result = rpccli_samr_open_user(cli, mem_ctx, - &domain_pol, - access_mask, - rids[0], &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &domain_pol, + access_mask, + rids[0], + &user_pol); } } @@ -645,9 +648,11 @@ static NTSTATUS cmd_samr_query_usergroups(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_samr_open_user(cli, mem_ctx, &domain_pol, - access_mask, - user_rid, &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &domain_pol, + access_mask, + user_rid, + &user_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -1952,9 +1957,11 @@ static NTSTATUS cmd_samr_delete_dom_user(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_samr_open_user(cli, mem_ctx, &domain_pol, - access_mask, - user_rids[0], &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &domain_pol, + access_mask, + user_rids[0], + &user_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -2033,9 +2040,11 @@ static NTSTATUS cmd_samr_query_sec_obj(struct rpc_pipe_client *cli, goto done; if (user_rid) - result = rpccli_samr_open_user(cli, mem_ctx, &domain_pol, - MAXIMUM_ALLOWED_ACCESS, - user_rid, &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &domain_pol, + MAXIMUM_ALLOWED_ACCESS, + user_rid, + &user_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -2101,9 +2110,11 @@ static NTSTATUS cmd_samr_get_usrdom_pwinfo(struct rpc_pipe_client *cli, goto done; } - result = rpccli_samr_open_user(cli, mem_ctx, &domain_pol, - MAXIMUM_ALLOWED_ACCESS, - rid, &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &domain_pol, + MAXIMUM_ALLOWED_ACCESS, + rid, + &user_pol); if (!NT_STATUS_IS_OK(result)) { goto done; 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))); diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 59ca15a623..14b1621fc9 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -1339,10 +1339,11 @@ NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain, goto done; } - status_tmp = rpccli_samr_open_user(samr_pipe, state->mem_ctx, - &samr_domain_handle, - MAXIMUM_ALLOWED_ACCESS, - my_info3->user_rid, &user_pol); + status_tmp = rpccli_samr_OpenUser(samr_pipe, state->mem_ctx, + &samr_domain_handle, + MAXIMUM_ALLOWED_ACCESS, + my_info3->user_rid, + &user_pol); if (!NT_STATUS_IS_OK(status_tmp)) { DEBUG(3, ("could not open user handle on SAMR pipe: %s\n", diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index b8f1982868..0d937ef30e 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -469,9 +469,11 @@ static NTSTATUS query_user(struct winbindd_domain *domain, return result; /* Get user handle */ - result = rpccli_samr_open_user(cli, mem_ctx, &dom_pol, - SEC_RIGHTS_MAXIMUM_ALLOWED, user_rid, - &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &dom_pol, + SEC_RIGHTS_MAXIMUM_ALLOWED, + user_rid, + &user_pol); if (!NT_STATUS_IS_OK(result)) return result; @@ -545,8 +547,11 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, return result; /* Get user handle */ - result = rpccli_samr_open_user(cli, mem_ctx, &dom_pol, - des_access, user_rid, &user_pol); + result = rpccli_samr_OpenUser(cli, mem_ctx, + &dom_pol, + des_access, + user_rid, + &user_pol); if (!NT_STATUS_IS_OK(result)) return result; |