summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-03 17:41:43 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-03 17:45:58 +0100
commita21b49bb389f8f98fe43a6abe3b0fde51ec43210 (patch)
tree4303549525a12a1e5e794825fa7e4cf429234bb6
parent051eb0b575d715e5b7bbd03a201aa88167ccee4f (diff)
downloadsamba-a21b49bb389f8f98fe43a6abe3b0fde51ec43210.tar.gz
samba-a21b49bb389f8f98fe43a6abe3b0fde51ec43210.tar.bz2
samba-a21b49bb389f8f98fe43a6abe3b0fde51ec43210.zip
s4:torture/rpc/samr - Fix up SAMR-USERS test
"QueryDomainInfo" returns only global groups, "QueryDisplayInfo" also universal ones. Consider MS-SAMR 3.1.5.5.1.1 and 3.1.5.3.1.
-rw-r--r--source4/torture/rpc/samr.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index d3621e4a30..13a56f0f7b 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -6288,17 +6288,23 @@ static bool test_QueryDisplayInfo(struct dcerpc_pipe *p,
if (!NT_STATUS_IS_OK(status)) {
torture_warning(tctx, "QueryDomainInfo level %u failed - %s\n",
r.in.level, nt_errstr(status));
- ret = false;
- break;
+ ret = false;
+ break;
}
switch (r.in.level) {
case 1:
case 4:
if (info->general.num_users < r.in.start_idx) {
- torture_warning(tctx, "QueryDomainInfo indicates that QueryDisplayInfo returned more users (%d/%d) than the domain %s is said to contain!\n",
- r.in.start_idx, info->general.num_groups,
- info->general.domain_name.string);
- ret = false;
+ /* On AD deployments this numbers don't match
+ * since QueryDisplayInfo returns universal and
+ * global groups, QueryDomainInfo only global
+ * ones. */
+ if (torture_setting_bool(tctx, "samba3", false)) {
+ torture_warning(tctx, "QueryDomainInfo indicates that QueryDisplayInfo returned more users (%d/%d) than the domain %s is said to contain!\n",
+ r.in.start_idx, info->general.num_groups,
+ info->general.domain_name.string);
+ ret = false;
+ }
}
if (!seen_testuser) {
struct policy_handle user_handle;
@@ -6313,10 +6319,16 @@ static bool test_QueryDisplayInfo(struct dcerpc_pipe *p,
case 3:
case 5:
if (info->general.num_groups != r.in.start_idx) {
- torture_warning(tctx, "QueryDomainInfo indicates that QueryDisplayInfo didn't return all (%d/%d) the groups in %s\n",
- r.in.start_idx, info->general.num_groups,
- info->general.domain_name.string);
- ret = false;
+ /* On AD deployments this numbers don't match
+ * since QueryDisplayInfo returns universal and
+ * global groups, QueryDomainInfo only global
+ * ones. */
+ if (torture_setting_bool(tctx, "samba3", false)) {
+ torture_warning(tctx, "QueryDomainInfo indicates that QueryDisplayInfo didn't return all (%d/%d) the groups in %s\n",
+ r.in.start_idx, info->general.num_groups,
+ info->general.domain_name.string);
+ ret = false;
+ }
}
break;