Less bogus domain name handling.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@611 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -75,6 +75,8 @@ ruserpass(char *host, char **aname, char **apass, char **aacct)
|
||||
strcpy(myhostname, "");
|
||||
if((mydomain = strchr(myhostname, '.')) == NULL)
|
||||
mydomain = myhostname;
|
||||
else
|
||||
mydomain++;
|
||||
hdir = getenv("HOME");
|
||||
if (hdir == NULL)
|
||||
hdir = ".";
|
||||
@@ -107,11 +109,13 @@ next:
|
||||
if (strcasecmp(hostname, tokval) == 0)
|
||||
goto match;
|
||||
if ((tmp = strchr(hostname, '.')) != NULL &&
|
||||
tmp++ &&
|
||||
strcasecmp(tmp, mydomain) == 0 &&
|
||||
strncasecmp(hostname, tokval, tmp-hostname) == 0 &&
|
||||
tokval[tmp - hostname] == '\0')
|
||||
goto match;
|
||||
if ((tmp = strchr(host, '.')) != NULL &&
|
||||
tmp++ &&
|
||||
strcasecmp(tmp, mydomain) == 0 &&
|
||||
strncasecmp(host, tokval, tmp - host) == 0 &&
|
||||
tokval[tmp - host] == '\0')
|
||||
|
||||
Reference in New Issue
Block a user