Signed-off-by: Steve Dickson <steved@redhat.com>
#ifdef HAVE_INNETGR
{
char *dot;
#ifdef HAVE_INNETGR
{
char *dot;
struct hostent *nhp = NULL;
struct sockaddr_in addr;
struct hostent *nhp = NULL;
struct sockaddr_in addr;
if (innetgr(cname+1, hname, NULL, NULL))
return 1;
if (innetgr(cname+1, hname, NULL, NULL))
return 1;
+ /* try the aliases as well */
+ for (i = 0; hp->h_aliases[i]; i++) {
+ if (innetgr(cname+1, hp->h_aliases[i], NULL, NULL))
+ return 1;
+ }
+
/* If hname is ip address convert to FQDN */
if (inet_aton(hname, &addr.sin_addr) &&
(nhp = gethostbyaddr((const char *)&(addr.sin_addr),
/* If hname is ip address convert to FQDN */
if (inet_aton(hname, &addr.sin_addr) &&
(nhp = gethostbyaddr((const char *)&(addr.sin_addr),