summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-13 06:28:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:42 -0500
commit6f36f7cd25b9576fbfdbced0525a5a077b1ccdb4 (patch)
treec30c5c710a30d8e5188915b070c79092fdd0f218 /source4/torture
parenta90c731ec5d33028380aeb66b411b5f1682fb874 (diff)
downloadsamba-6f36f7cd25b9576fbfdbced0525a5a077b1ccdb4.tar.gz
samba-6f36f7cd25b9576fbfdbced0525a5a077b1ccdb4.tar.bz2
samba-6f36f7cd25b9576fbfdbced0525a5a077b1ccdb4.zip
r6766: some more cldap tests ...
my best guess now is that w2k3 converts the & in the cldap query to an | for the ldap search. at least it behaves roughly like that. (This used to be commit 1d6ab9aaefee71e3d0f87c1afae8ccdbae1f0e04)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/ldap/cldap.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 5f6ef3f649..b22dc7b47c 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -80,6 +80,7 @@ static BOOL test_cldap_netlogon(TALLOC_CTX *mem_ctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
printf("Trying with a GUID\n");
+ search.in.realm = NULL;
search.in.domain_guid = GUID_string(mem_ctx, &n1.logon4.domain_uuid);
status = cldap_netlogon(cldap, mem_ctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -89,11 +90,17 @@ static BOOL test_cldap_netlogon(TALLOC_CTX *mem_ctx, const char *dest)
search.in.user = NULL;
search.in.domain_guid = GUID_string(mem_ctx, &guid);
status = cldap_netlogon(cldap, mem_ctx, &search);
+ CHECK_STATUS(status, NT_STATUS_NOT_FOUND);
+
+ printf("Trying with a incorrect domain and correct guid\n");
+ search.in.realm = "test.example.com";
+ search.in.domain_guid = GUID_string(mem_ctx, &n1.logon4.domain_uuid);
+ status = cldap_netlogon(cldap, mem_ctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
- printf("Trying with a incorrect domain\n");
+ printf("Trying with a incorrect domain and incorrect guid\n");
search.in.realm = "test.example.com";
- search.in.domain_guid = NULL;
+ search.in.domain_guid = GUID_string(mem_ctx, &guid);
status = cldap_netlogon(cldap, mem_ctx, &search);
CHECK_STATUS(status, NT_STATUS_NOT_FOUND);
@@ -109,6 +116,20 @@ static BOOL test_cldap_netlogon(TALLOC_CTX *mem_ctx, const char *dest)
status = cldap_netlogon(cldap, mem_ctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
+ printf("Trying with a user only\n");
+ search.in.acct_control = -1;
+ search.in.user = "Administrator";
+ search.in.realm = NULL;
+ search.in.domain_guid = NULL;
+ status = cldap_netlogon(cldap, mem_ctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ printf("Trying without any attributes\n");
+ search.in.user = NULL;
+ search.in.host = NULL;
+ status = cldap_netlogon(cldap, mem_ctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
done:
return ret;
}