Author: jra Date: 2005-10-27 18:06:27 +0000 (Thu, 27 Oct 2005) New Revision: 11335
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11335 Log: 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. Modified: trunk/source/rpc_client/cli_lsarpc.c trunk/source/rpc_client/cli_netlogon.c Changeset: Modified: trunk/source/rpc_client/cli_lsarpc.c =================================================================== --- trunk/source/rpc_client/cli_lsarpc.c 2005-10-27 14:33:12 UTC (rev 11334) +++ trunk/source/rpc_client/cli_lsarpc.c 2005-10-27 18:06:27 UTC (rev 11335) @@ -74,7 +74,9 @@ /* 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 @@ /* 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ result = r.status; - if (!NT_STATUS_IS_OK(result = r.status)) { + if (!NT_STATUS_IS_OK(result)) { goto done; } @@ -789,7 +803,9 @@ /* 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 @@ /* 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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; } Modified: trunk/source/rpc_client/cli_netlogon.c =================================================================== --- trunk/source/rpc_client/cli_netlogon.c 2005-10-27 14:33:12 UTC (rev 11334) +++ trunk/source/rpc_client/cli_netlogon.c 2005-10-27 18:06:27 UTC (rev 11335) @@ -259,7 +259,7 @@ 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 @@ 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); }
