[PATCH] fix smartness og name_to_fqdn() code

Gerald (Jerry) Carter jerry at samba.org
Wed Sep 6 13:21:05 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

simo wrote:
> I'd like to add this patch to handle broken hosts files where the
> machine name is put on the 127.0.0.1 address line.
> 
> Comments?
> 
> Index: lib/util.c
> ===================================================================
> --- lib/util.c  (revision 17933)
> +++ lib/util.c  (working copy)
> @@ -2843,6 +2843,13 @@
>                                 }
>                         }
>                 }
> +               if (full && (StrCaseCmp(full, "localhost.localdomain") == 0)) {
> +                       DEBUG(1, ("WARNING: you hosts file is probably broken!\n"));
> +                       DEBUGADD(1, ("    specifing the real hostname for address 127.0.0.1 is wrong!\n"));
> +                       DEBUGADD(1, ("    will not return localhost.localdomain as the FQDN for this host.\n"));
> +                       full = hp->h_name;
> +               }
> +
>                 if (!full) {
>                         full = hp->h_name;
>                 }
> 

Simo,  I'd change the DBUG message to say that this
will likely break Kerberos authentication in some
circumstances.  Other than that, it looks ok to me.





cheers, jerry
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE/stAIR7qMdg1EfYRApPZAKCJ33H/2tDu4iqm4CMwlcXB/KBk4gCgyl/U
tYKd3mui8MQzPj842mkZqjY=
=F6jx
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list