summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-06-10 17:09:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:55 -0500
commit76ca0f6f3f57c487564697c795da65672bbf4052 (patch)
tree18c473f3522154958bf2f906d470db769bd9d780 /source3/param
parent8018892b3c63fdb7cf0d0a72cba59f847cee718d (diff)
downloadsamba-76ca0f6f3f57c487564697c795da65672bbf4052.tar.gz
samba-76ca0f6f3f57c487564697c795da65672bbf4052.tar.bz2
samba-76ca0f6f3f57c487564697c795da65672bbf4052.zip
r1104: get_called_name is used in the printing subsystem. In case of multi-homed
servers we need to make sure that the clients are given back the IP address they connected to. Volker (This used to be commit 5f482df169eebae87ec769a05e3c3fc6e32af1e3)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2c65ac67d9..03b86a9c18 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4262,7 +4262,10 @@ const char *get_called_name(void)
extern fstring local_machine;
static fstring called_name;
- if (!*local_machine) {
+ if ( (!*local_machine) ||
+ (client_socket_port() == 445) ) {
+ /* Everybody coming in on 445 should be able to live with the
+ * IP address */
fstrcpy(called_name, client_socket_addr());
DEBUG(8,("get_called_name: assuming that client used IP address [%s] as called name.\n",
called_name));