artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa50f5d
)
Attempt to get the canonical name of a host before doing realm lookup, it
author
tholo
<tholo@openbsd.org>
Sat, 9 Mar 1996 20:11:52 +0000
(20:11 +0000)
committer
tholo
<tholo@openbsd.org>
Sat, 9 Mar 1996 20:11:52 +0000
(20:11 +0000)
might be a CNAME which does not match anything we know about
kerberosIV/krb/getrealm.c
patch
|
blob
|
history
diff --git
a/kerberosIV/krb/getrealm.c
b/kerberosIV/krb/getrealm.c
index
f4bd245
..
4b3e0e9
100644
(file)
--- a/
kerberosIV/krb/getrealm.c
+++ b/
kerberosIV/krb/getrealm.c
@@
-28,6
+28,7
@@
or implied warranty.
*/
#include "krb_locl.h"
+#include <netdb.h>
#define MATCH_SUBDOMAINS 0
@@
-64,8
+65,12
@@
krb_realmofhost(host)
FILE *trans_file;
char trans_host[MAXHOSTNAMELEN+1];
char trans_realm[REALM_SZ+1];
+ struct hostent *hp;
int retval;
+ if ((hp = gethostbyname(host)) != NULL)
+ host = hp->h_name;
+
domain = strchr(host, '.');
/* prepare default */