summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-01 10:12:04 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-05 20:59:34 +0100
commite0ba3735e9f43a4e8764d2a0e2d170bd6699ef1d (patch)
treef7161815ca417cb84c779e9f192565d6f98915e4
parentb1c8a7e872515471ed0ae9aca92ddd92ed762fcf (diff)
downloadsamba-e0ba3735e9f43a4e8764d2a0e2d170bd6699ef1d.tar.gz
samba-e0ba3735e9f43a4e8764d2a0e2d170bd6699ef1d.tar.bz2
samba-e0ba3735e9f43a4e8764d2a0e2d170bd6699ef1d.zip
s4:torture/netlogon: Test with attrs: "netlogon *"
-rw-r--r--source4/torture/ldap/netlogon.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/torture/ldap/netlogon.c b/source4/torture/ldap/netlogon.c
index 5605570396..e09f30a396 100644
--- a/source4/torture/ldap/netlogon.c
+++ b/source4/torture/ldap/netlogon.c
@@ -450,6 +450,7 @@ static bool test_netlogon_extra_attrs(struct torture_context *tctx,
"netlogon",
"supportedCapabilities"
};
+ const char *attrs2[] = { "netlogon", "*" };
int num_attrs = ARRAY_SIZE(attrs);
/* Additional attributes may be requested next to netlogon */
@@ -465,7 +466,15 @@ static bool test_netlogon_extra_attrs(struct torture_context *tctx,
torture_assert(tctx, filter != NULL, "OOM");
status = ldap_rootdse(conn, tctx, filter, attrs, num_attrs, &res);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(res->num_attributes, ARRAY_SIZE(attrs));
+ CHECK_VAL(res->num_attributes, num_attrs);
+
+ /* netlogon + '*' attr return zero results */
+ torture_comment(tctx, "Requesting netlogon and '*' attributes\n");
+ status = ldap_rootdse(conn, tctx, filter, attrs2, ARRAY_SIZE(attrs2), &res);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ struct ldb_message msg = { NULL, res->num_attributes, res->attributes };
+ torture_assert(tctx, ldb_msg_find_element(&msg, "netlogon") != NULL,
+ "Attribute netlogon not found in Result Entry\n");
/* Wildcards are not allowed in filters when netlogon is requested. */
torture_comment(tctx, "Requesting netlogon with invalid attr filter\n");