summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-07-31 10:51:59 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-07-31 10:51:59 +1000
commit2cc32c4988e69b3a8c6254cc34e66370f220d60d (patch)
treedcbc7d847d16826fc389ad15be6a58a00007f1bf /source4
parent2afd7d6d66c4ee16ffad5f1a9d5ba6ef4530ca99 (diff)
downloadsamba-2cc32c4988e69b3a8c6254cc34e66370f220d60d.tar.gz
samba-2cc32c4988e69b3a8c6254cc34e66370f220d60d.tar.bz2
samba-2cc32c4988e69b3a8c6254cc34e66370f220d60d.zip
Use the cldap reply to avoid segfaulting in RPC-DSSYNC
Also don't fail the test if the server does not implement the NT4 changelog. Andrew Bartlett (This used to be commit 514d88580bee3bb17f1032262f5518e3ab2a349a)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/dssync.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 2930a9b1f9..e8c67b46c1 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -34,6 +34,7 @@
#include "libcli/auth/libcli_auth.h"
#include "auth/gensec/gensec.h"
#include "param/param.h"
+#include "dsdb/samdb/samdb.h"
struct DsSyncBindInfo {
struct dcerpc_pipe *pipe;
@@ -314,6 +315,14 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
printf("cldap_netlogon() returned Server Site-Name: %s.\n",search.out.netlogon.nt5_ex.server_site);
}
+ if (!ctx->domain_dn) {
+ struct ldb_context *ldb = ldb_init(ctx, tctx->ev);
+ struct ldb_dn *dn = samdb_dns_domain_to_dn(ldb, ctx, search.out.netlogon.nt5_ex.dns_domain);
+ ctx->domain_dn = ldb_dn_alloc_linearized(ctx, dn);
+ talloc_free(dn);
+ talloc_free(ldb);
+ }
+
return ret;
}
@@ -800,7 +809,10 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
r.in.req.req1.data = cookie.data;
status = dcerpc_drsuapi_DsGetNT4ChangeLog(ctx->new_dc.drsuapi.pipe, ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
+ printf("DsGetNT4ChangeLog not supported by target server\n");
+ break;
+ } else if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
errstr = dcerpc_errstr(ctx, ctx->new_dc.drsuapi.pipe->last_fault_code);