diff options
author | Günther Deschner <gd@samba.org> | 2008-06-17 18:02:03 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-17 19:55:10 +0200 |
commit | 49b269f50fc2fc2817bdee97e9670b8579113060 (patch) | |
tree | 21a7d00b48104f5efee38e98128163d76e34e513 | |
parent | 0447e6a0a7f1b16f986f0fe5304cd65ee691277c (diff) | |
download | samba-49b269f50fc2fc2817bdee97e9670b8579113060.tar.gz samba-49b269f50fc2fc2817bdee97e9670b8579113060.tar.bz2 samba-49b269f50fc2fc2817bdee97e9670b8579113060.zip |
net_vampire: add domain_name to samsync_context.
Guenther
(This used to be commit 7e7f07ec59d23e909809ed32adc8fc399826310d)
-rw-r--r-- | source3/libnet/libnet_proto.h | 1 | ||||
-rw-r--r-- | source3/libnet/libnet_samsync.c | 4 | ||||
-rw-r--r-- | source3/libnet/libnet_samsync.h | 1 | ||||
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 3 |
4 files changed, 9 insertions, 0 deletions
diff --git a/source3/libnet/libnet_proto.h b/source3/libnet/libnet_proto.h index eeb4a72644..b30b94a54b 100644 --- a/source3/libnet/libnet_proto.h +++ b/source3/libnet/libnet_proto.h @@ -52,6 +52,7 @@ NTSTATUS samsync_fix_delta_array(TALLOC_CTX *mem_ctx, struct netr_DELTA_ENUM_ARRAY *r); NTSTATUS samsync_init_context(TALLOC_CTX *mem_ctx, const struct dom_sid *domain_sid, + const char *domain_name, enum net_samsync_mode mode, struct samsync_context **ctx_p); NTSTATUS samsync_process_database(struct rpc_pipe_client *pipe_hnd, diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index 3c6a87a495..b5632aed69 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -193,6 +193,7 @@ NTSTATUS samsync_fix_delta_array(TALLOC_CTX *mem_ctx, NTSTATUS samsync_init_context(TALLOC_CTX *mem_ctx, const struct dom_sid *domain_sid, + const char *domain_name, enum net_samsync_mode mode, struct samsync_context **ctx_p) { @@ -205,6 +206,9 @@ NTSTATUS samsync_init_context(TALLOC_CTX *mem_ctx, ctx->mode = mode; + ctx->domain_name = talloc_strdup(mem_ctx, domain_name); + NT_STATUS_HAVE_NO_MEMORY(ctx->domain_name); + if (domain_sid) { ctx->domain_sid = sid_dup_talloc(mem_ctx, domain_sid); NT_STATUS_HAVE_NO_MEMORY(ctx->domain_sid); diff --git a/source3/libnet/libnet_samsync.h b/source3/libnet/libnet_samsync.h index 38ef9c56a5..1e3995614f 100644 --- a/source3/libnet/libnet_samsync.h +++ b/source3/libnet/libnet_samsync.h @@ -28,6 +28,7 @@ struct samsync_context { enum net_samsync_mode mode; const struct dom_sid *domain_sid; const char *domain_sid_str; + const char *domain_name; const char *output_filename; void *private_data; }; diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 90637e294d..797598c48e 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -354,6 +354,7 @@ NTSTATUS rpc_samdump_internals(struct net_context *c, status = samsync_init_context(mem_ctx, domain_sid, + domain_name, NET_SAMSYNC_MODE_DUMP, &ctx); if (!NT_STATUS_IS_OK(status)) { @@ -1173,6 +1174,7 @@ NTSTATUS rpc_vampire_internals(struct net_context *c, result = samsync_init_context(mem_ctx, domain_sid, + domain_name, NET_SAMSYNC_MODE_FETCH_PASSDB, &ctx); if (!NT_STATUS_IS_OK(result)) { @@ -1237,6 +1239,7 @@ NTSTATUS rpc_vampire_ldif_internals(struct net_context *c, status = samsync_init_context(mem_ctx, domain_sid, + domain_name, NET_SAMSYNC_MODE_FETCH_LDIF, &ctx); if (!NT_STATUS_IS_OK(status)) { |