Changeset 740 for vendor/current/source3/lib/netapi/netlogon.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
-
vendor/current/source3/lib/netapi/netlogon.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/lib/netapi/netlogon.c
r594 r740 20 20 #include "includes.h" 21 21 22 22 23 #include "librpc/gen_ndr/libnetapi.h" 23 24 #include "lib/netapi/netapi.h" 24 25 #include "lib/netapi/netapi_private.h" 25 26 #include "lib/netapi/libnetapi.h" 26 #include "../librpc/gen_ndr/cli_netlogon.h"27 27 28 28 static WERROR construct_data(enum netr_LogonControlCode function_code, … … 44 44 data_out->debug_level = atoi((const char *)data_in); 45 45 break; 46 47 48 46 49 default: 47 50 return WERR_INVALID_PARAM; … … 127 130 WERROR werr; 128 131 NTSTATUS status; 129 struct rpc_pipe_client *pipe_cli = NULL;130 132 union netr_CONTROL_QUERY_INFORMATION query; 131 132 werr = libnetapi_open_pipe(ctx, r->in.server_name, 133 &ndr_table_netlogon.syntax_id, 134 &pipe_cli); 135 if (!W_ERROR_IS_OK(werr)) { 136 goto done; 137 } 138 139 status = rpccli_netr_LogonControl(pipe_cli, talloc_tos(), 133 struct dcerpc_binding_handle *b; 134 135 werr = libnetapi_get_binding_handle(ctx, r->in.server_name, 136 &ndr_table_netlogon.syntax_id, 137 &b); 138 if (!W_ERROR_IS_OK(werr)) { 139 goto done; 140 } 141 142 status = dcerpc_netr_LogonControl(b, talloc_tos(), 140 143 r->in.server_name, 141 144 r->in.function_code, … … 147 150 goto done; 148 151 } 152 153 154 149 155 150 156 werr = construct_buffer(ctx, r->in.query_level, &query, … … 175 181 WERROR werr; 176 182 NTSTATUS status; 177 struct rpc_pipe_client *pipe_cli = NULL;178 183 union netr_CONTROL_DATA_INFORMATION data; 179 184 union netr_CONTROL_QUERY_INFORMATION query; 185 180 186 181 187 werr = construct_data(r->in.function_code, r->in.data, &data); … … 184 190 } 185 191 186 werr = libnetapi_ open_pipe(ctx, r->in.server_name,187 &ndr_table_netlogon.syntax_id,188 &pipe_cli);192 werr = libnetapi_e(ctx, r->in.server_name, 193 &ndr_table_netlogon.syntax_id, 194 ); 189 195 if (!W_ERROR_IS_OK(werr)) { 190 196 goto done; … … 194 200 case NETLOGON_CONTROL_TC_VERIFY: 195 201 case NETLOGON_CONTROL_SET_DBFLAG: 196 status = rpccli_netr_LogonControl2Ex(pipe_cli, talloc_tos(), 202 case NETLOGON_CONTROL_FORCE_DNS_REG: 203 status = dcerpc_netr_LogonControl2Ex(b, talloc_tos(), 197 204 r->in.server_name, 198 205 r->in.function_code, … … 203 210 break; 204 211 default: 205 status = rpccli_netr_LogonControl2(pipe_cli, talloc_tos(),212 status = , talloc_tos(), 206 213 r->in.server_name, 207 214 r->in.function_code, … … 213 220 } 214 221 215 if (!W_ERROR_IS_OK(werr)) {216 goto done;217 }218 219 222 if (!NT_STATUS_IS_OK(status)) { 220 223 werr = ntstatus_to_werror(status); … … 222 225 } 223 226 227 228 229 230 224 231 werr = construct_buffer(ctx, r->in.query_level, &query, 225 232 r->out.buffer);
Note:
See TracChangeset
for help on using the changeset viewer.
