summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2013-06-30 20:40:07 -0700
committerMatthieu Patou <mat@samba.org>2013-07-01 11:22:57 +0200
commit3d20d20c4c5a8214e8bfe67a1fee7bc1004201e5 (patch)
tree28e1ac26d4c592f9af06eee0ebdfe723f6684cf0 /source4/torture
parent74dd365f77e709f11b29623989c58e5503e49872 (diff)
downloadsamba-3d20d20c4c5a8214e8bfe67a1fee7bc1004201e5.tar.gz
samba-3d20d20c4c5a8214e8bfe67a1fee7bc1004201e5.tar.bz2
samba-3d20d20c4c5a8214e8bfe67a1fee7bc1004201e5.zip
smbtorture: Make cracksname easier to debug by outputing the offered format
Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Signed-off-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Mon Jul 1 11:22:57 CEST 2013 on sn-devel-104
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c67
1 files changed, 49 insertions, 18 deletions
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index f71910a3a6..465f6db76f 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -87,6 +87,11 @@ static bool test_DsCrackNamesMatrix(struct torture_context *tctx,
r.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
r.in.req->req1.format_desired = formats[i];
names[0].str = dn;
+ torture_comment(tctx, "Testing DsCrackNames (matrix prep) with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
@@ -273,8 +278,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
names[0].str = dom_sid;
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -295,8 +303,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_GUID;
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -318,8 +329,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -363,8 +377,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
names[0].str = nt4_domain;
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -386,8 +403,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
names[0].str = talloc_asprintf(mem_ctx, "%s%s$", nt4_domain, test_dc);
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -409,8 +429,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
names[0].str = priv->domain_guid_str;
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
status = dcerpc_drsuapi_DsCrackNames_r(p->binding_handle, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -912,8 +935,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
int i;
for (i=0; i < ARRAY_SIZE(crack); i++) {
- torture_comment(tctx, "Testing DsCrackNames with name '%s' desired format:%d\n",
- crack[i].str, crack[i].format_desired);
+ torture_comment(tctx, "Testing DsCrackNames with name '%s'"
+ " offered format: %d desired format:%d\n",
+ crack[i].str,
+ crack[i].format_offered,
+ crack[i].format_desired);
const char *comment;
r.in.req->req1.format_flags = crack[i].flags;
@@ -922,11 +948,16 @@ bool test_DsCrackNames(struct torture_context *tctx,
names[0].str = crack[i].str;
if (crack[i].comment) {
- comment = talloc_asprintf(mem_ctx, "'%s' with name '%s' desired format:%d\n",
- crack[i].comment, names[0].str, r.in.req->req1.format_desired);
+ comment = talloc_asprintf(mem_ctx,
+ "'%s' with name '%s' offered format:%d desired format:%d\n",
+ crack[i].comment, names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
} else {
- comment = talloc_asprintf(mem_ctx, "'%s' desired format:%d\n",
- names[0].str, r.in.req->req1.format_desired);
+ comment = talloc_asprintf(mem_ctx, "'%s' offered format:%d desired format:%d\n",
+ names[0].str,
+ r.in.req->req1.format_offered,
+ r.in.req->req1.format_desired);
}
if (crack[i].skip) {
torture_comment(tctx, "skipping: %s", comment);