https://fedorahosted.org/freeipa/ticket/2112

Machines with hostname 'localhost.localdomain' are refused from joining
IPA domain and proper error message is shown.

--
Regards,

Ondrej Hamada
FreeIPA team
jabber: oh...@jabbim.cz
IRC: ohamada

From 0d91a4ba654ba47759cdecdd60bc7d938d11313b Mon Sep 17 00:00:00 2001
From: Ondrej Hamada <oham...@redhat.com>
Date: Mon, 16 Jan 2012 12:30:29 +0100
Subject: [PATCH] localhost.localdomain clients refused to join

Machines with hostname 'localhost.localdomain' are refused from joining
IPA domain and proper error message is shown.

https://fedorahosted.org/freeipa/ticket/2112
---
 ipa-client/ipa-join.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ipa-client/ipa-join.c b/ipa-client/ipa-join.c
index c174e2c157d0878dedf0d302e547ff176deb9e98..95195535b4611f022df90d1e0e10f7e83b4c6c80 100644
--- a/ipa-client/ipa-join.c
+++ b/ipa-client/ipa-join.c
@@ -937,6 +937,12 @@ join(const char *server, const char *hostname, const char *bindpw, const char *b
         goto cleanup;
     }
 
+    if (!strcmp(host, "localhost.localdomain")) {
+        fprintf(stderr, _("The hostname must not be: %s\n"), host);
+        rval = 16;
+        goto cleanup;
+    }
+
     if (bindpw)
         rval = join_ldap(ipaserver, host, &hostdn, bindpw, basedn, &princ, &subject, quiet);
     else {
-- 
1.7.6.5

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to