summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-04-17 06:49:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:18 -0500
commit3441f077166ec6c6df0d9eaf337cde2e75643fbe (patch)
tree6d934d8cae550f38a84817fd33a0a298526a9459 /source4/torture
parent04af17ec63a9bd6baa20f16bdf6a3096fb08f864 (diff)
downloadsamba-3441f077166ec6c6df0d9eaf337cde2e75643fbe.tar.gz
samba-3441f077166ec6c6df0d9eaf337cde2e75643fbe.tar.bz2
samba-3441f077166ec6c6df0d9eaf337cde2e75643fbe.zip
r259: added samr_DeleteGroupMember() IDL and test code
(This used to be commit 747351140b839879abe1a79a005d81ca4b35a658)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/samr.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 9930ba8b19..d4e04cda2c 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -1432,6 +1432,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_AddGroupMember r;
+ struct samr_DeleteGroupMember d;
BOOL ret = True;
uint32 rid;
@@ -1444,7 +1445,17 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.rid = rid;
r.in.flags = 0; /* ??? */
- printf("Testing AddGroupMember\n");
+ printf("Testing AddGroupMember and DeleteGroupMember\n");
+
+ d.in.handle = group_handle;
+ d.in.rid = rid;
+
+ status = dcerpc_samr_DeleteGroupMember(p, mem_ctx, &d);
+ if (!NT_STATUS_EQUAL(NT_STATUS_MEMBER_NOT_IN_GROUP, status)) {
+ printf("DeleteGroupMember gave %s - should be NT_STATUS_MEMBER_NOT_IN_GROUP\n",
+ nt_errstr(status));
+ return False;
+ }
status = dcerpc_samr_AddGroupMember(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -1459,6 +1470,18 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
+ status = dcerpc_samr_DeleteGroupMember(p, mem_ctx, &d);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("DeleteGroupMember failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
+ status = dcerpc_samr_AddGroupMember(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("AddGroupMember failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
return ret;
}