When generating localhost entries in /etc/hosts, put localhost before
localhost.domain so that naive users of gethost* think 1:: and 127.0.0.1 are "localhost" which is what the user expects. This also matches the sample hosts file in src/etc/hosts.
This commit is contained in:
parent
384555d978
commit
0fffba68bd
@ -636,8 +636,8 @@ configResolv(dialogMenuItem *ditem)
|
||||
return DITEM_FAILURE;
|
||||
/* Add an entry for localhost */
|
||||
if (dp) {
|
||||
fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp);
|
||||
fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp);
|
||||
fprintf(fp, "::1\t\t\tlocalhost localhost.%s\n", dp);
|
||||
fprintf(fp, "127.0.0.1\t\tlocalhost localhost.%s\n", dp);
|
||||
} else {
|
||||
fprintf(fp, "::1\t\t\tlocalhost\n");
|
||||
fprintf(fp, "127.0.0.1\t\tlocalhost\n");
|
||||
|
Loading…
Reference in New Issue
Block a user