diff options
author | Rafal Szczesniak <mimir@samba.org> | 2006-05-04 14:52:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:36 -0500 |
commit | 538adbf677d225da8abc2adaefafa2a7c305ec17 (patch) | |
tree | 9d686406550bc40e4fda47459ef3634b1d350422 /source4/libnet/libnet_vampire.c | |
parent | 209edfb807cbe58f929b644989b5374a5aafb85f (diff) | |
download | samba-538adbf677d225da8abc2adaefafa2a7c305ec17.tar.gz samba-538adbf677d225da8abc2adaefafa2a7c305ec17.tar.bz2 samba-538adbf677d225da8abc2adaefafa2a7c305ec17.zip |
r15435: Turn libnet_RpcConnectDCInfo into another level of libnet_RpcConnect
and make it async. Also, update any other usages of old function.
Build goes fine and so do tests, comments to follow.
rafal
(This used to be commit aef0a2de9d2f01a6f619e3fccc8715288f5c37a3)
Diffstat (limited to 'source4/libnet/libnet_vampire.c')
-rw-r--r-- | source4/libnet/libnet_vampire.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 5c5407df3e..04f9e000f4 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -157,7 +157,7 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx struct cli_credentials *machine_account; struct dcerpc_pipe *p; struct libnet_context *machine_net_ctx; - struct libnet_RpcConnectDCInfo *c; + struct libnet_RpcConnect *c; struct libnet_SamSync_state *state; const enum netr_SamDatabaseID database_ids[] = {SAM_DATABASE_DOMAIN, SAM_DATABASE_BUILTIN, SAM_DATABASE_PRIVS}; int i; @@ -193,21 +193,22 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; } - c = talloc(samsync_ctx, struct libnet_RpcConnectDCInfo); + c = talloc(samsync_ctx, struct libnet_RpcConnect); if (!c) { r->out.error_string = NULL; talloc_free(samsync_ctx); return NT_STATUS_NO_MEMORY; } + c->level = LIBNET_RPC_CONNECT_DC_INFO; if (r->in.binding_string) { - c->level = LIBNET_RPC_CONNECT_BINDING; c->in.binding = r->in.binding_string; + } else { - /* prepare connect to the NETLOGON pipe of PDC */ - c->level = LIBNET_RPC_CONNECT_PDC; c->in.name = cli_credentials_get_domain(machine_account); } + + /* prepare connect to the NETLOGON pipe of PDC */ c->in.dcerpc_iface = &dcerpc_table_netlogon; /* We must do this as the machine, not as any command-line @@ -223,7 +224,7 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx machine_net_ctx->cred = machine_account; /* connect to the NETLOGON pipe of the PDC */ - nt_status = libnet_RpcConnectDCInfo(machine_net_ctx, c); + nt_status = libnet_RpcConnect(machine_net_ctx, samsync_ctx, c); if (!NT_STATUS_IS_OK(nt_status)) { if (r->in.binding_string) { r->out.error_string = talloc_asprintf(mem_ctx, |