r11264: Winbind does not rely on the hostname resolution mechanisms of
authorVolker Lendecke <vlendec@samba.org>
Sun, 23 Oct 2005 11:23:55 +0000 (11:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:45:10 +0000 (13:45 -0500)
composite_connect, so in io.in.dest_host I'm setting the IP address. Gensec
does not like that as a target hostname, so if a called name is present, use
that. So we can session setup using kerberos now.

Volker
(This used to be commit c26b432c27954c8dc6ac8e702bd5e34a351d15bd)

source4/libcli/smb_composite/connect.c

index 466d86233a3296d2ac1a7c6a122d7d0d63bf64dd..4e9ee48cb764a1e770e7da89d0b48e257aca264d 100644 (file)
@@ -355,7 +355,11 @@ static NTSTATUS connect_resolve(struct composite_context *c,
 
        conn->in.hostnames = talloc_array(state->conn, const char *, 1);
        NT_STATUS_HAVE_NO_MEMORY(conn->in.hostnames);
-       conn->in.hostnames[0] = state->io->in.dest_host;
+       if (state->io->in.called_name != NULL) {
+               conn->in.hostnames[0] = state->io->in.called_name;
+       } else {
+               conn->in.hostnames[0] = state->io->in.dest_host;
+       }
        
        conn->in.ports = NULL;
        if (state->io->in.port != 0) {