summaryrefslogtreecommitdiff
path: root/source4/torture/libnet
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-06-11 16:02:10 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-06-11 17:46:36 +0300
commitc65eb4852c2c401149b840884e76a21ff7cd37c7 (patch)
treed9ad177d44b17d2126bd5b36735f0af11e7862ee /source4/torture/libnet
parent9baa73053e9119991d3ad6c72b153a006e153b89 (diff)
downloadsamba-c65eb4852c2c401149b840884e76a21ff7cd37c7.tar.gz
samba-c65eb4852c2c401149b840884e76a21ff7cd37c7.tar.bz2
samba-c65eb4852c2c401149b840884e76a21ff7cd37c7.zip
s4/test-libnet: Re-align code a bit - more readable this way IMO
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r--source4/torture/libnet/libnet_group.c8
-rw-r--r--source4/torture/libnet/libnet_user.c4
-rw-r--r--source4/torture/libnet/utils.c40
3 files changed, 28 insertions, 24 deletions
diff --git a/source4/torture/libnet/libnet_group.c b/source4/torture/libnet/libnet_group.c
index 6f4aa0eab6..6acb3d2f60 100644
--- a/source4/torture/libnet/libnet_group.c
+++ b/source4/torture/libnet/libnet_group.c
@@ -83,7 +83,8 @@ bool torture_groupinfo_api(struct torture_context *torture)
goto done;
}
- if (!test_group_cleanup(torture, ctx->samr.pipe->binding_handle, mem_ctx, &ctx->samr.handle, TEST_GROUPNAME)) {
+ if (!test_group_cleanup(torture, ctx->samr.pipe->binding_handle,
+ mem_ctx, &ctx->samr.handle, TEST_GROUPNAME)) {
torture_comment(torture, "cleanup failed\n");
ret = false;
goto done;
@@ -133,7 +134,7 @@ bool torture_grouplist(struct torture_context *torture)
for (i = 0; i < req.out.count; i++) {
torture_comment(torture, "\tgroup: %s, sid=%s\n",
- req.out.groups[i].groupname, req.out.groups[i].sid);
+ req.out.groups[i].groupname, req.out.groups[i].sid);
}
} while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
@@ -189,7 +190,8 @@ bool torture_creategroup(struct torture_context *torture)
goto done;
}
- if (!test_group_cleanup(torture, ctx->samr.pipe->binding_handle, mem_ctx, &ctx->samr.handle, TEST_GROUPNAME)) {
+ if (!test_group_cleanup(torture, ctx->samr.pipe->binding_handle,
+ mem_ctx, &ctx->samr.handle, TEST_GROUPNAME)) {
torture_comment(torture, "cleanup failed\n");
ret = false;
goto done;
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index 6850b0e7f3..9dfb1b0ac4 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -369,7 +369,7 @@ bool torture_modifyuser(struct torture_context *torture)
cleanup:
if (!test_user_cleanup(torture, ctx->samr.pipe->binding_handle,
- torture, &ctx->samr.handle, TEST_USERNAME)) {
+ torture, &ctx->samr.handle, TEST_USERNAME)) {
torture_comment(torture, "cleanup failed\n");
ret = false;
goto done;
@@ -493,7 +493,7 @@ bool torture_userlist(struct torture_context *torture)
for (i = 0; i < req.out.count; i++) {
torture_comment(torture, "\tuser: %s, sid=%s\n",
- req.out.users[i].username, req.out.users[i].sid);
+ req.out.users[i].username, req.out.users[i].sid);
}
} while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
diff --git a/source4/torture/libnet/utils.c b/source4/torture/libnet/utils.c
index 09298054dc..dcf284bb98 100644
--- a/source4/torture/libnet/utils.c
+++ b/source4/torture/libnet/utils.c
@@ -38,11 +38,11 @@
* @param _dom_sid [out] If NULL, Domain SID won't be returned
*/
bool test_domain_open(struct torture_context *tctx,
- struct dcerpc_binding_handle *b,
- struct lsa_String *domname,
- TALLOC_CTX *mem_ctx,
- struct policy_handle *_domain_handle,
- struct dom_sid2 *_dom_sid)
+ struct dcerpc_binding_handle *b,
+ struct lsa_String *domname,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *_domain_handle,
+ struct dom_sid2 *_dom_sid)
{
struct policy_handle connect_handle;
struct policy_handle domain_handle;
@@ -58,10 +58,10 @@ bool test_domain_open(struct torture_context *tctx,
r1.out.connect_handle = &connect_handle;
torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_Connect_r(b, mem_ctx, &r1),
- "Connect failed");
+ dcerpc_samr_Connect_r(b, mem_ctx, &r1),
+ "Connect failed");
torture_assert_ntstatus_ok(tctx, r1.out.result,
- "Connect failed");
+ "Connect failed");
r2.in.connect_handle = &connect_handle;
r2.in.domain_name = domname;
@@ -165,7 +165,8 @@ done:
*/
bool test_user_cleanup(struct torture_context *tctx,
struct dcerpc_binding_handle *b,
- TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *domain_handle,
const char *user_rdn)
{
struct samr_LookupNames r1;
@@ -300,7 +301,8 @@ bool test_user_create(struct torture_context *tctx,
* Deletes a Group using SAMR interface
*/
bool test_group_cleanup(struct torture_context *tctx,
- struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
+ struct dcerpc_binding_handle *b,
+ TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle,
const char *name)
{
@@ -323,10 +325,10 @@ bool test_group_cleanup(struct torture_context *tctx,
torture_comment(tctx, "group account lookup '%s'\n", name);
torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_LookupNames_r(b, mem_ctx, &r1),
- "LookupNames failed");
+ dcerpc_samr_LookupNames_r(b, mem_ctx, &r1),
+ "LookupNames failed");
torture_assert_ntstatus_ok(tctx, r1.out.result,
- "LookupNames failed");
+ "LookupNames failed");
rid = r1.out.rids->ids[0];
@@ -338,10 +340,10 @@ bool test_group_cleanup(struct torture_context *tctx,
torture_comment(tctx, "opening group account\n");
torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_OpenGroup_r(b, mem_ctx, &r2),
- "OpenGroup failed");
+ dcerpc_samr_OpenGroup_r(b, mem_ctx, &r2),
+ "OpenGroup failed");
torture_assert_ntstatus_ok(tctx, r2.out.result,
- "OpenGroup failed");
+ "OpenGroup failed");
r3.in.group_handle = &group_handle;
r3.out.group_handle = &group_handle;
@@ -349,10 +351,10 @@ bool test_group_cleanup(struct torture_context *tctx,
torture_comment(tctx, "deleting group account\n");
torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_DeleteDomainGroup_r(b, mem_ctx, &r3),
- "DeleteGroup failed");
+ dcerpc_samr_DeleteDomainGroup_r(b, mem_ctx, &r3),
+ "DeleteGroup failed");
torture_assert_ntstatus_ok(tctx, r3.out.result,
- "DeleteGroup failed");
+ "DeleteGroup failed");
return true;
}