From 494273fee0a781c7ad7df4d1af0aacb1f07b0c0b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Jan 2017 09:36:43 +0100 Subject: [PATCH 1/2] debug drsuapi principal --- selftest/target/Samba4.pm | 4 ++++ source4/dsdb/repl/drepl_partitions.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 8855135..2fcf3ee 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -2220,10 +2220,14 @@ sub setup_vampire_dc($$$) my $env = $self->provision_vampire_dc($path, $dc_vars); if (defined $env) { + $ENV{SOCKET_WRAPPER_PCAP_FILE} = "$path/debug.pcap"; if (not defined($self->check_or_start($env, "single"))) { return undef; } + $ENV{SOCKET_WRAPPER_PCAP_FILE} = undef; + delete $ENV{SOCKET_WRAPPER_PCAP_FILE}; + $self->{vars}->{vampire_dc} = $env; # force replicated DC to update repsTo/repsFrom diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c index 65b4843..fa47fc5 100644 --- a/source4/dsdb/repl/drepl_partitions.c +++ b/source4/dsdb/repl/drepl_partitions.c @@ -206,7 +206,7 @@ static NTSTATUS dreplsrv_get_target_principal(struct dreplsrv_service *s, hostname = ldb_msg_find_attr_as_string(res->msgs[0], "dNSHostName", NULL); computer_dn = ldb_msg_find_attr_as_dn(s->samdb, tmp_ctx, res->msgs[0], "serverReference"); - if (hostname != NULL && computer_dn != NULL) { + if (0 && hostname != NULL && computer_dn != NULL) { char *local_principal; /* -- 1.9.1 From f06a87e110f5bf67611d02bba2f38d6246362cac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Jan 2017 10:25:39 +0100 Subject: [PATCH 2/2] Revert "debug drsuapi principal" This reverts commit 494273fee0a781c7ad7df4d1af0aacb1f07b0c0b. --- selftest/target/Samba4.pm | 4 ---- source4/dsdb/repl/drepl_partitions.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 2fcf3ee..8855135 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -2220,14 +2220,10 @@ sub setup_vampire_dc($$$) my $env = $self->provision_vampire_dc($path, $dc_vars); if (defined $env) { - $ENV{SOCKET_WRAPPER_PCAP_FILE} = "$path/debug.pcap"; if (not defined($self->check_or_start($env, "single"))) { return undef; } - $ENV{SOCKET_WRAPPER_PCAP_FILE} = undef; - delete $ENV{SOCKET_WRAPPER_PCAP_FILE}; - $self->{vars}->{vampire_dc} = $env; # force replicated DC to update repsTo/repsFrom diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c index fa47fc5..65b4843 100644 --- a/source4/dsdb/repl/drepl_partitions.c +++ b/source4/dsdb/repl/drepl_partitions.c @@ -206,7 +206,7 @@ static NTSTATUS dreplsrv_get_target_principal(struct dreplsrv_service *s, hostname = ldb_msg_find_attr_as_string(res->msgs[0], "dNSHostName", NULL); computer_dn = ldb_msg_find_attr_as_dn(s->samdb, tmp_ctx, res->msgs[0], "serverReference"); - if (0 && hostname != NULL && computer_dn != NULL) { + if (hostname != NULL && computer_dn != NULL) { char *local_principal; /* -- 1.9.1