Make sure ncacn_ip_tcp client code looks for NBT_NAME_SERVER name types.

Guenther
This commit is contained in:
Günther Deschner 2012-11-23 16:54:01 +01:00
parent 597c8f4325
commit a4ad4da48e
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,40 @@
From 2032f2746d70bbebd1af26a7a046eb1cc61ac175 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Fri, 23 Nov 2012 13:19:53 +0100
Subject: [PATCH] s3-rpc_client: lookup nametype 0x20 in
rpc_pipe_open_tcp_port(). (bug #9426)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The server name type (0x20) is much more likely to be available in the name cache, as
this type gets stored by winbind itself - the primary user of the ncacn_ip_tcp
code currently.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Nov 23 16:30:57 CET 2012 on sn-devel-104
---
source3/rpc_client/cli_pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index edb3876..f8c7b24 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2448,7 +2448,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
result->max_xmit_frag = RPC_MAX_PDU_FRAG_LEN;
result->max_recv_frag = RPC_MAX_PDU_FRAG_LEN;
- if (!resolve_name(host, &addr, 0, false)) {
+ if (!resolve_name(host, &addr, NBT_NAME_SERVER, false)) {
status = NT_STATUS_NOT_FOUND;
goto fail;
}
--
1.7.11.7

View File

@ -1,4 +1,4 @@
%define main_release 168 %define main_release 169
%define samba_version 4.0.0 %define samba_version 4.0.0
%define talloc_version 2.0.7 %define talloc_version 2.0.7
@ -63,6 +63,7 @@ Source201: README.downgrade
Patch0: samba-4.0.0rc6-LogonSamLogon_failover.patch Patch0: samba-4.0.0rc6-LogonSamLogon_failover.patch
Patch1: samba-4.0.0rc6-winbind_default_domain_workaround.patch Patch1: samba-4.0.0rc6-winbind_default_domain_workaround.patch
Patch2: samba-4.0.0rc6-ncacn_ip_tcp_resolve_name.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -416,6 +417,7 @@ the local kerberos library to use the same KDC as samba and winbind use
%patch0 -p1 -b .samlogon_failover %patch0 -p1 -b .samlogon_failover
%patch1 -p1 -b .winbind_default_domain_workaround %patch1 -p1 -b .winbind_default_domain_workaround
%patch2 -p1 -b .ncacn_ip_tcp_resolve_name
%build %build
%global _talloc_lib ,talloc,pytalloc,pytalloc-util %global _talloc_lib ,talloc,pytalloc,pytalloc-util
@ -1314,6 +1316,9 @@ rm -rf %{buildroot}
%{_mandir}/man7/winbind_krb5_locator.7* %{_mandir}/man7/winbind_krb5_locator.7*
%changelog %changelog
* Fri Nov 23 2012 Guenther Deschner <gdeschner@redhat.com> - 2:4.0.0-169.rc5
- Make sure ncacn_ip_tcp client code looks for NBT_NAME_SERVER name types.
* Thu Nov 15 2012 - Andreas Schneider <asn@redhat.com> - 2:4.0.0-168.rc5 * Thu Nov 15 2012 - Andreas Schneider <asn@redhat.com> - 2:4.0.0-168.rc5
- Reduce dependencies of samba-devel and create samba-test-devel package. - Reduce dependencies of samba-devel and create samba-test-devel package.