From f560ee201da836e936ad7386eef8f22b7e78e07e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 14 Sep 2006 16:29:07 +0000 Subject: r18529: warn the user that putting the machine host name on the 127.0.0.1 line in /etc/hosts is not ok for Kerberos. (This used to be commit 85126391e11006514af8e6c6b88eb7fa21abf49a) --- source3/lib/util.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/util.c b/source3/lib/util.c index 1a75c11e9a..086b3c7068 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2847,6 +2847,14 @@ void name_to_fqdn(fstring fqdn, const char *name) } } } + if (full && (StrCaseCmp(full, "localhost.localdomain") == 0)) { + DEBUG(1, ("WARNING: your /etc/hosts file may be broken!\n")); + DEBUGADD(1, (" specifing the machine hostname for address 127.0.0.1 may lead\n")); + DEBUGADD(1, (" to Kerberos authentication probelms as localhost.localdomain\n")); + DEBUGADD(1, (" may end up to be used instead of the real machine FQDN.\n")); + full = hp->h_name; + } + if (!full) { full = hp->h_name; } -- cgit