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-01 12:24:02 +0100
commitb3272bfd62a21e8e3d9624c3d70bae40f8e667f6 (patch)
tree97ab00622ae5babfe1ddbea05b5f4a23c002d3e7
parent6c6d1ab084ae74149c38fb4ceef40120f924942c (diff)
downloadsamba-b3272bfd62a21e8e3d9624c3d70bae40f8e667f6.tar.gz
samba-b3272bfd62a21e8e3d9624c3d70bae40f8e667f6.tar.bz2
samba-b3272bfd62a21e8e3d9624c3d70bae40f8e667f6.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");