diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-23 01:44:04 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-23 01:44:04 +0000 |
commit | 4962f4d1764c3431f7141e030710873b714566a0 (patch) | |
tree | c0e063e7eae60b35f4898421a5a6bcf473c10d5a | |
parent | 95705e904f5cab36287df1e22724111dfdceea70 (diff) | |
download | samba-4962f4d1764c3431f7141e030710873b714566a0.tar.gz samba-4962f4d1764c3431f7141e030710873b714566a0.tar.bz2 samba-4962f4d1764c3431f7141e030710873b714566a0.zip |
Try to keep existing behaviour for our printing code - never return
global_myname(), always either the name the client called us, or if they
didn't call us anything useful, our IP address.
Jerry, can you check this?
Andrew Bartlett
(This used to be commit 599e70bffbae9930b949c9b82cbc8dfc7c966d78)
-rw-r--r-- | source3/param/loadparm.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a89330fd5b..4bc8d7bfc2 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3994,7 +3994,7 @@ void lp_set_logfile(const char *name) } /******************************************************************* - Return the NetBIOS called name. + Return the NetBIOS called name, or my IP - but never global_myname(). ********************************************************************/ const char *get_called_name(void) @@ -4002,22 +4002,11 @@ const char *get_called_name(void) extern fstring local_machine; static fstring called_name; - if (! *local_machine) - return global_myname(); - - /* - * Windows NT/2k uses "*SMBSERVER" and XP uses "*SMBSERV" - * arrggg!!! but we've already rewritten the client's - * netbios name at this point... - */ - - if (*local_machine) { - if (!StrCaseCmp(local_machine, "_SMBSERVER") || !StrCaseCmp(local_machine, "_SMBSERV")) { - fstrcpy(called_name, get_my_primary_ip()); - DEBUG(8,("get_called_name: assuming that client used IP address [%s] as called name.\n", - called_name)); - return called_name; - } + if (!*local_machine) { + fstrcpy(called_name, get_my_primary_ip()); + DEBUG(8,("get_called_name: assuming that client used IP address [%s] as called name.\n", + called_name)); + return called_name; } return local_machine; |