r11533: Be a bit less intrusive
authorVolker Lendecke <vlendec@samba.org>
Sun, 6 Nov 2005 12:24:33 +0000 (12:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:45:50 +0000 (13:45 -0500)
source/libcli/smb_composite/connect.c

index 81a82ad4276b714e1c376486a5053356ced29981..785b0d076bd2b4f76471a750c7ee7355c84eaa9e 100644 (file)
@@ -302,7 +302,8 @@ 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 (is_ipaddress(state->sock->hostname) &&
+           (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 */