diff options
author | Jeremy Allison <jra@samba.org> | 2004-06-22 00:48:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:00 -0500 |
commit | f0f2e28958cb9abfed216c71f291f19ea346d630 (patch) | |
tree | 47184afdba976e2716ec2de5c50e4bf7db92895a /source/lib/util.c | |
parent | be8a2dc00dd876c4b596600ae72d4ac05f9ebe64 (diff) | |
download | samba-f0f2e28958cb9abfed216c71f291f19ea346d630.tar.gz samba-f0f2e28958cb9abfed216c71f291f19ea346d630.tar.xz samba-f0f2e28958cb9abfed216c71f291f19ea346d630.zip |
r1215: Intermediate checkin of the new keytab code. I need to make sure I
haven't broken krb5 ticket verification in the mainline code path,
also need to check with valgrind. Everything now compiles (MIT, need
to also check Heimdal) and the "net keytab" utility code will follow.
Jeremy.
Diffstat (limited to 'source/lib/util.c')
-rw-r--r-- | source/lib/util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 54cbc36772e..554f5ee79da 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -2435,6 +2435,21 @@ BOOL unix_wild_match(const char *pattern, const char *string) return unix_do_match(p2, s2) == 0; } +/********************************************************************** + Converts a name to a fully qalified domain name. +***********************************************************************/ + +void name_to_fqdn(fstring fqdn, const char *name) +{ + struct hostent *hp = sys_gethostbyname(name); + if ( hp && hp->h_name && *hp->h_name ) { + DEBUG(10,("name_to_fqdn: lookup for %s -> %s.\n", name, hp->h_name)); + fstrcpy(fqdn,hp->h_name); + } else { + DEBUG(10,("name_to_fqdn: lookup for %s failed.\n", name)); + fstrcpy(fqdn, name); + } +} #ifdef __INSURE__ |