svn commit: samba r21560 - in branches: SAMBA_3_0/source/lib
SAMBA_3_0_25/source/lib
gd at samba.org
gd at samba.org
Tue Feb 27 13:42:15 GMT 2007
Author: gd
Date: 2007-02-27 13:42:15 +0000 (Tue, 27 Feb 2007)
New Revision: 21560
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21560
Log:
Convert name_to_fqdn to BOOL.
Guenther
Modified:
branches/SAMBA_3_0/source/lib/util.c
branches/SAMBA_3_0_25/source/lib/util.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util.c 2007-02-27 13:41:56 UTC (rev 21559)
+++ branches/SAMBA_3_0/source/lib/util.c 2007-02-27 13:42:15 UTC (rev 21560)
@@ -2902,10 +2902,11 @@
}
/**********************************************************************
- 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 @@
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 @@
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;
}
}
Modified: branches/SAMBA_3_0_25/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0_25/source/lib/util.c 2007-02-27 13:41:56 UTC (rev 21559)
+++ branches/SAMBA_3_0_25/source/lib/util.c 2007-02-27 13:42:15 UTC (rev 21560)
@@ -2902,10 +2902,11 @@
}
/**********************************************************************
- 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 @@
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 @@
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;
}
}
More information about the samba-cvs
mailing list