summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-11-06 12:19:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:50 -0500
commit08964b9de8e3e28ae15000f03c2a9f5223ff8007 (patch)
tree801f15235fea82ab7df2f48b188627135fa973f9
parent512f5ae8817eb378d5d3bdf6ba08c50c8dc3bf8c (diff)
downloadsamba-08964b9de8e3e28ae15000f03c2a9f5223ff8007.tar.gz
samba-08964b9de8e3e28ae15000f03c2a9f5223ff8007.tar.bz2
samba-08964b9de8e3e28ae15000f03c2a9f5223ff8007.zip
r11532: Enable kerberos session setup for winbind smb connections
(This used to be commit f0e4075db5e913d2262058bb7234c446160823d9)
-rw-r--r--source4/libcli/smb_composite/connect.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index 643871a8c4..81a82ad427 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -302,6 +302,15 @@ static NTSTATUS connect_socket(struct composite_context *c,
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);