summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_proto.h1
-rw-r--r--source3/libnet/libnet_samsync.c4
-rw-r--r--source3/libnet/libnet_samsync.h1
3 files changed, 6 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;
};