diff options
author | Jeremy Allison <jra@samba.org> | 2005-10-27 18:06:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:13 -0500 |
commit | ca551d55a894dc88c9374eb1ca0ce4b4005a22a2 (patch) | |
tree | 637545179cc25785a8d5273adb7660954c5bf7ab | |
parent | e1ffd2d612184fb1343cbe7e1d5d1aacebe0e8fa (diff) | |
download | samba-ca551d55a894dc88c9374eb1ca0ce4b4005a22a2.tar.gz samba-ca551d55a894dc88c9374eb1ca0ce4b4005a22a2.tar.bz2 samba-ca551d55a894dc88c9374eb1ca0ce4b4005a22a2.zip |
r11336: Start to get my control back :-). Volker, I think
Andrew Bartlett is right - making lsa code do it the
netlogon way, not vica-versa.
Jeremy.
(This used to be commit f313757e36215cb3dd956e4a73de6d30258a6974)
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 78 | ||||
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 6 |
2 files changed, 62 insertions, 22 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index d7dcda72e3..c64de2b8e8 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -74,7 +74,9 @@ NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli, /* Return output parameters */ - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { *pol = r.pol; #ifdef __INSURE__ pol->marker = MALLOC(1); @@ -119,7 +121,9 @@ NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli, /* Return output parameters */ - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { *pol = r.pol; #ifdef __INSURE__ pol->marker = (char *)malloc(1); @@ -153,7 +157,9 @@ NTSTATUS rpccli_lsa_close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, /* Return output parameters */ - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { #ifdef __INSURE__ SAFE_FREE(pol->marker); #endif @@ -379,7 +385,9 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli, lsa_io_r_query, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -465,7 +473,9 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli, lsa_io_r_query_info2, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -618,7 +628,9 @@ NTSTATUS rpccli_lsa_enum_privilege(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ lsa_io_r_enum_privs, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -685,7 +697,9 @@ NTSTATUS rpccli_lsa_get_dispname(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct lsa_io_r_priv_get_dispname, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -725,7 +739,7 @@ NTSTATUS rpccli_lsa_enum_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, result = r.status; - if (!NT_STATUS_IS_OK(result = r.status)) { + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -789,7 +803,9 @@ NTSTATUS rpccli_lsa_create_account(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return output parameters */ - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { *user_pol = r.pol; } @@ -825,7 +841,9 @@ NTSTATUS rpccli_lsa_open_account(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return output parameters */ - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { *user_pol = r.pol; } @@ -861,7 +879,9 @@ NTSTATUS rpccli_lsa_enum_privsaccount(struct rpc_pipe_client *cli, TALLOC_CTX *m /* Return output parameters */ - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -910,7 +930,9 @@ NTSTATUS rpccli_lsa_lookup_priv_value(struct rpc_pipe_client *cli, TALLOC_CTX *m lsa_io_r_lookup_priv_value, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -949,7 +971,9 @@ NTSTATUS rpccli_lsa_query_secobj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct lsa_io_r_query_sec_obj, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -993,7 +1017,9 @@ NTSTATUS rpccli_lsa_enum_account_rights(struct rpc_pipe_client *cli, TALLOC_CTX lsa_io_r_enum_acct_rights, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -1051,7 +1077,9 @@ NTSTATUS rpccli_lsa_add_account_rights(struct rpc_pipe_client *cli, TALLOC_CTX * lsa_io_r_add_acct_rights, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } done: @@ -1084,7 +1112,9 @@ NTSTATUS rpccli_lsa_remove_account_rights(struct rpc_pipe_client *cli, TALLOC_CT lsa_io_r_remove_acct_rights, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } done: @@ -1223,7 +1253,9 @@ NTSTATUS rpccli_lsa_open_trusted_domain(struct rpc_pipe_client *cli, TALLOC_CTX /* Return output parameters */ - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { *trustdom_pol = r.handle; } @@ -1254,7 +1286,9 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info(struct rpc_pipe_client *cli, TALLO lsa_io_r_query_trusted_domain_info, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -1289,7 +1323,9 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info_by_sid(struct rpc_pipe_client *cli lsa_io_r_query_trusted_domain_info, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -1324,7 +1360,9 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info_by_name(struct rpc_pipe_client *cl lsa_io_r_query_trusted_domain_info, NT_STATUS_UNSUCCESSFUL); - if (!NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (!NT_STATUS_IS_OK(result)) { goto done; } diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 015b28c16f..78e682d12a 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -259,7 +259,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli, uint32 sec_chan_type, uint32 *neg_flags_inout) { - NTSTATUS result; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; DOM_CHAL clnt_chal_send; DOM_CHAL srv_chal_recv; struct dcinfo *dc; @@ -405,7 +405,9 @@ NTSTATUS rpccli_netlogon_getdcname(struct rpc_pipe_client *cli, net_io_r_getdcname, NT_STATUS_UNSUCCESSFUL); - if (NT_STATUS_IS_OK(result = r.status)) { + result = r.status; + + if (NT_STATUS_IS_OK(result)) { rpcstr_pull_unistr2_fstring(newdcname, &r.uni_dcname); } |