r26683: Add another testcase. I still don't know what's wrong here.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 7 Jan 2008 10:46:13 +0000 (04:46 -0600)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Jan 2008 04:51:02 +0000 (22:51 -0600)
Andrew Bartlett
(This used to be commit 341929c615e5573887889cf22950a25b536c6fc1)

source4/torture/ldap/cldap.c

index bea4b08c8baee87c63db22a33356181bd094800f..4e58059770f38da45c766b4632c5a08329e5c699 100644 (file)
@@ -80,6 +80,27 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
                CHECK_STATUS(status, NT_STATUS_OK);
        }
 
                CHECK_STATUS(status, NT_STATUS_OK);
        }
 
+       search.in.version = 0x20000006;
+       status = cldap_netlogon(cldap, tctx, &search);
+       CHECK_STATUS(status, NT_STATUS_OK);
+
+       printf("Trying with User=NULL\n");
+
+       search.in.user = NULL;
+       status = cldap_netlogon(cldap, tctx, &search);
+       CHECK_STATUS(status, NT_STATUS_OK);
+       CHECK_STRING(search.out.netlogon.logon5.user_name, "");
+       CHECK_VAL(search.out.netlogon.logon5.type, NETLOGON_RESPONSE_FROM_PDC2);
+
+       printf("Trying with User=Administrator\n");
+
+       search.in.user = "Administrator";
+       status = cldap_netlogon(cldap, tctx, &search);
+       CHECK_STATUS(status, NT_STATUS_OK);
+
+       CHECK_STRING(search.out.netlogon.logon5.user_name, search.in.user);
+       CHECK_VAL(search.out.netlogon.logon5.type, NETLOGON_RESPONSE_FROM_PDC_USER);
+
        search.in.version = 6;
        status = cldap_netlogon(cldap, tctx, &search);
        CHECK_STATUS(status, NT_STATUS_OK);
        search.in.version = 6;
        status = cldap_netlogon(cldap, tctx, &search);
        CHECK_STATUS(status, NT_STATUS_OK);