diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/ldap/netlogon.c | 11 |
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"); |