aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2007-04-20 21:36:46 +0000
committerChong Yidong <[email protected]>2007-04-20 21:36:46 +0000
commit923721f42588eae79a7f79cce5b411301f9451b4 (patch)
treefd5197f4c92898e8e0c974d78aee09962f673566 /src/sysdep.c
parent8ea8a516c383f09cd69fe3196e163547a887da4b (diff)
(init_system_name): Don't accept localhost.localdomain.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 20d60400dc..27e90349cb 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2433,7 +2433,9 @@ init_system_name ()
/* We still don't have a fully qualified domain name.
Try to find one in the list of alternate names */
char **alias = hp->h_aliases;
- while (*alias && !index (*alias, '.'))
+ while (*alias
+ && (!index (*alias, '.')
+ || !strcmp (*alias, "localhost.localdomain")))
alias++;
if (*alias)
fqdn = *alias;