summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 06:58:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:51 -0500
commit94473233fe8ae7f663d4872eb1d9f25f08afadb9 (patch)
tree6e5e264491c61018a268a4dba9ab1287e1c49fc7 /source4/torture
parentfc94355d8ed711dab3d1ada344c438a23c106e8e (diff)
downloadsamba-94473233fe8ae7f663d4872eb1d9f25f08afadb9.tar.gz
samba-94473233fe8ae7f663d4872eb1d9f25f08afadb9.tar.bz2
samba-94473233fe8ae7f663d4872eb1d9f25f08afadb9.zip
r10988: print out the password blobs, with
--option="dssync:print_pwd_blobs=yes" metze (This used to be commit b06de6d39cd21d5096e4041e218370263d8096b0)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/dssync.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 77551998c3..3aa2f43e6b 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -269,6 +269,61 @@ static BOOL test_GetInfo(struct DsSyncTest *ctx)
return ret;
}
+static void test_analyse_objects(struct DsSyncTest *ctx,
+ struct drsuapi_DsReplicaObjectListItemEx *cur)
+{
+ if (!lp_parm_bool(-1,"dssync","print_pwd_blobs",False)) {
+ return;
+ }
+
+ for (; cur; cur = cur->next_object) {
+ const char *dn;
+ BOOL dn_printed = False;
+ uint32_t i;
+
+ if (!cur->object.identifier) continue;
+
+ dn = cur->object.identifier->dn;
+
+ for (i=0; i < cur->object.attribute_ctr.num_attributes; i++) {
+ const char *name = NULL;
+ DATA_BLOB *data = NULL;
+ struct drsuapi_DsReplicaAttribute *attr;
+ attr = &cur->object.attribute_ctr.attributes[i];
+
+ switch (attr->attid) {
+ case DRSUAPI_ATTRIBUTE_dBCSPwd:
+ name = "dBCSPwd";
+ break;
+ case DRSUAPI_ATTRIBUTE_unicodePwd:
+ name = "unicodePwd";
+ break;
+ case DRSUAPI_ATTRIBUTE_ntPwdHistory:
+ name = "ntPwdHistory";
+ break;
+ case DRSUAPI_ATTRIBUTE_lmPwdHistory:
+ name = "lmPwdHistory";
+ break;
+ default:
+ continue;
+ }
+
+ if (attr->value_ctr.data_blob.num_values != 1) continue;
+
+ if (!attr->value_ctr.data_blob.values[0].data) continue;
+
+ data = attr->value_ctr.data_blob.values[0].data;
+
+ if (!dn_printed) {
+ DEBUG(0,("DN: %s\n", dn));
+ dn_printed = True;
+ }
+ DEBUGADD(0,("ATTR: %s data_blob.length=%u\n",
+ name, data->length));
+ dump_data(0,data->data, data->length);
+ }
+ }
+}
static BOOL test_FetchData(struct DsSyncTest *ctx)
{
@@ -419,6 +474,8 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
ctr6->new_highwatermark.tmp_highest_usn,
ctr6->new_highwatermark.highest_usn));
+ test_analyse_objects(ctx, ctr6->first_object);
+
if (ctr6->new_highwatermark.tmp_highest_usn > ctr6->new_highwatermark.highest_usn) {
r.in.req.req8.highwatermark = ctr6->new_highwatermark;
continue;