r6793: Move auth_sam to use the dnsDomain rather than the
authorAndrew Bartlett <abartlet@samba.org>
Sun, 15 May 2005 03:24:48 +0000 (03:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:44 +0000 (13:16 -0500)
soon-to-be-depricated 'realm'.

Add torture test for this behaviour.

Andrew Bartlet

source/auth/auth_sam.c
source/torture/rpc/samlogon.c

index 1e6c8653616063ddfa1898a72c0d93fda9d2cd88..947de1ef8c441c1ea133d12d827372c45728d00a 100644 (file)
@@ -215,7 +215,7 @@ static NTSTATUS authsam_search_account(TALLOC_CTX *mem_ctx, void *sam_ctx,
        if (domain_name) {
                /* find the domain's DN */
                ret_domain = gendb_search(sam_ctx, mem_ctx, NULL, &msgs_domain, domain_attrs,
-                                         "(&(|(realm=%s)(flatname=%s))(objectclass=domain))", 
+                                         "(|(&(dnsDomain=%s)(objectClass=domainDNS))(&(flatname=%s)(objectclass=domain)))", 
                                          domain_name, domain_name);
                if (ret_domain == -1) {
                        return NT_STATUS_INTERNAL_DB_CORRUPTION;
index 9a9c3039d2f69841db88d5c18999fd8e70da8ffc..104583058a08a921c27c432ebe026d104797bf0d 100644 (file)
@@ -1259,6 +1259,12 @@ BOOL torture_rpc_samlogon(void)
                        cli_credentials_get_password(cmdline_credentials),
                        True
                },
+               {
+                       cli_credentials_get_realm(cmdline_credentials),
+                       cli_credentials_get_username(cmdline_credentials),
+                       cli_credentials_get_password(cmdline_credentials),
+                       True
+               },
                {
                        NULL,
                        talloc_asprintf(mem_ctx,