[OpenAFS] minor bug: -afsdb does not understand CNAME

Russ Allbery rra@stanford.edu
Mon, 12 Dec 2005 11:07:06 -0800


Adam Megacz <megacz@cs.berkeley.edu> writes:

> I take it that afsd doesn't use the usual gethostbyname() to resolve the
> hostname it gets after pulling an AFSDB record...

It does indeed use gethostbyname():

            if ((afsdb_type == 1) && (server_num < MAXHOSTSPERCELL) &&
                /* Do we want to get TTL data for the A record as well? */
                (he = gethostbyname(host))) {
                afs_int32 ipaddr;
                memcpy(&ipaddr, he->h_addr, he->h_length);
                acellInfo->hostAddr[server_num].sin_addr.s_addr = ipaddr;
                strncpy(acellInfo->hostName[server_num], host,
                        sizeof(acellInfo->hostName[server_num]));
                server_num++;

                if (!minttl || ttl < minttl)
                    minttl = ttl;
            }

(src/auth/cellconfig.c).

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>