summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-07-31 21:23:48 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-07-31 21:23:48 +1000
commit358a11c6f3c8d063b1f25bf27191811ff82d91ec (patch)
treed6717c02f47b60f821d6b91a8952f614052ba0eb
parent2cc32c4988e69b3a8c6254cc34e66370f220d60d (diff)
downloadsamba-358a11c6f3c8d063b1f25bf27191811ff82d91ec.tar.gz
samba-358a11c6f3c8d063b1f25bf27191811ff82d91ec.tar.bz2
samba-358a11c6f3c8d063b1f25bf27191811ff82d91ec.zip
Print trustAuthOutgoing and trustAuthIncoming in RPC-DSSYNC
(This used to be commit 6673a6e62399c4956a44a06685aa91ce8145b92a)
-rw-r--r--source4/torture/rpc/dssync.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index e8c67b46c1..d340543f0a 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -474,6 +474,9 @@ static void test_analyse_objects(struct torture_context *tctx,
DATA_BLOB *enc_data = NULL;
DATA_BLOB plain_data;
struct drsuapi_DsReplicaAttribute *attr;
+ ndr_pull_flags_fn_t pull_fn = NULL;
+ ndr_print_fn_t print_fn = NULL;
+ void *ptr = NULL;
attr = &cur->object.attribute_ctr.attributes[i];
switch (attr->attid) {
@@ -495,6 +498,9 @@ static void test_analyse_objects(struct torture_context *tctx,
break;
case DRSUAPI_ATTRIBUTE_supplementalCredentials:
name = "supplementalCredentials";
+ pull_fn = (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob;
+ print_fn = (ndr_print_fn_t)ndr_print_supplementalCredentialsBlob;
+ ptr = talloc(ctx, struct supplementalCredentialsBlob);
break;
case DRSUAPI_ATTRIBUTE_priorValue:
name = "priorValue";
@@ -504,9 +510,15 @@ static void test_analyse_objects(struct torture_context *tctx,
break;
case DRSUAPI_ATTRIBUTE_trustAuthOutgoing:
name = "trustAuthOutgoing";
+ pull_fn = (ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob;
+ print_fn = (ndr_print_fn_t)ndr_print_trustAuthInOutBlob;
+ ptr = talloc(ctx, struct trustAuthInOutBlob);
break;
case DRSUAPI_ATTRIBUTE_trustAuthIncoming:
name = "trustAuthIncoming";
+ pull_fn = (ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob;
+ print_fn = (ndr_print_fn_t)ndr_print_trustAuthInOutBlob;
+ ptr = talloc(ctx, struct trustAuthInOutBlob);
break;
case DRSUAPI_ATTRIBUTE_initialAuthOutgoing:
name = "initialAuthOutgoing";
@@ -537,7 +549,6 @@ static void test_analyse_objects(struct torture_context *tctx,
name, (long)enc_data->length, (long)plain_data.length));
if (plain_data.length) {
enum ndr_err_code ndr_err;
- struct supplementalCredentialsBlob scb;
dump_data(0, plain_data.data, plain_data.length);
if (save_values_dir) {
char *fname;
@@ -554,15 +565,20 @@ static void test_analyse_objects(struct torture_context *tctx,
talloc_free(fname);
}
- ndr_err = ndr_pull_struct_blob_all(&plain_data, tctx,
- lp_iconv_convenience(tctx->lp_ctx), &scb,
- (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
- if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- NDR_PRINT_DEBUG(supplementalCredentialsBlob, &scb);
+ if (pull_fn) {
+ ndr_err = ndr_pull_struct_blob_all(&plain_data, ptr,
+ lp_iconv_convenience(tctx->lp_ctx), ptr,
+ pull_fn);
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ ndr_print_debug(print_fn, name, ptr);
+ } else {
+ DEBUG(0, ("Failed to decode %s\n", name));
+ }
}
} else {
dump_data(0, enc_data->data, enc_data->length);
}
+ talloc_free(ptr);
}
}
}