Author: vlendec
Date: 2005-11-06 12:19:34 +0000 (Sun, 06 Nov 2005)
New Revision: 11532

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11532

Log:
Enable kerberos session setup for winbind smb connections
Modified:
   branches/SAMBA_4_0/source/libcli/smb_composite/connect.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/smb_composite/connect.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/smb_composite/connect.c    2005-11-06 
01:55:13 UTC (rev 11531)
+++ branches/SAMBA_4_0/source/libcli/smb_composite/connect.c    2005-11-06 
12:19:34 UTC (rev 11532)
@@ -302,6 +302,15 @@
        state->transport = smbcli_transport_init(state->sock, state, True);
        NT_STATUS_HAVE_NO_MEMORY(state->transport);
 
+       if (state->io->in.called_name != NULL) {
+               /* If connecting to an IP address, we might want the real name
+                * of the host for later kerberos. The called name is a better
+                * approximation */
+               state->sock->hostname =
+                       talloc_strdup(state->sock, io->in.called_name);
+               NT_STATUS_HAVE_NO_MEMORY(state->sock->hostname);
+       }
+
        make_nbt_name_client(&calling, 
cli_credentials_get_workstation(io->in.credentials));
 
        nbt_choose_called_name(state, &called, io->in.called_name, 
NBT_NAME_SERVER);

Reply via email to