diff options
author | Günther Deschner <gd@samba.org> | 2007-02-27 13:42:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:13 -0500 |
commit | 5c0d13a8ae7dd377f799aaa82555fc37223d3310 (patch) | |
tree | ce7fc8eee1b9e8cc48540ea4211093476919023f | |
parent | 4e00351fd426e6c016fd433887f62deda632f0aa (diff) | |
download | samba-5c0d13a8ae7dd377f799aaa82555fc37223d3310.tar.gz samba-5c0d13a8ae7dd377f799aaa82555fc37223d3310.tar.bz2 samba-5c0d13a8ae7dd377f799aaa82555fc37223d3310.zip |
r21560: Convert name_to_fqdn to BOOL.
Guenther
(This used to be commit 28ce79629bc36929f508c1ccb1d27d48e8898045)
-rw-r--r-- | source3/lib/util.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 5f9eb4fc45..67c9c8d37a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2902,10 +2902,11 @@ BOOL unix_wild_match(const char *pattern, const char *string) } /********************************************************************** - Converts a name to a fully qalified domain name. + Converts a name to a fully qualified domain name. + Returns True if lookup succeeded, False if not (then fqdn is set to name) ***********************************************************************/ -void name_to_fqdn(fstring fqdn, const char *name) +BOOL name_to_fqdn(fstring fqdn, const char *name) { struct hostent *hp = sys_gethostbyname(name); @@ -2927,7 +2928,7 @@ 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, (" to Kerberos authentication problems as localhost.localdomain\n")); DEBUGADD(1, (" may end up being used instead of the real machine FQDN.\n")); full = hp->h_name; } @@ -2938,9 +2939,11 @@ void name_to_fqdn(fstring fqdn, const char *name) DEBUG(10,("name_to_fqdn: lookup for %s -> %s.\n", name, full)); fstrcpy(fqdn, full); + return True; } else { DEBUG(10,("name_to_fqdn: lookup for %s failed.\n", name)); fstrcpy(fqdn, name); + return False; } } |