[OpenAFS] Cellname without dots

Frank Burkhardt fbo2@gmx.net
Tue, 9 Aug 2005 16:19:25 +0200


--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

@home I've got a small private AFS-cell (Cellname: 'alpha') - all computers
are running the most recent Debian Sid (unstable) and OpenAFS-1.3.82.

After upgrading glibc from (i think) 2.3.2 to 2.3.5 the resolver's behaviour
changed and my AFS-clients were unable to read the cell's database server
list from DNS. Reason is res_search() which is called by afsd with the AFS-cellname
that doesn't contain any dot in my case. The resolver now looks for an
AFSDB-DNS-record of 'alpha.alpha' ( cellname + '.' + domainname ) and fails.
The real AFSDB-record is 'alpha' .

I tried to add the line 'options ndots:0' to /etc/resolv.conf (see
'man resolv.conf') but it doesn't change the resolver's behaviour. I see 3
different solutions to the problem:

   1. change the cell's name to something dotted,
   2. patch libc or
   3. patch openafs

1. It's not a real solution - maybe there are other cell's in non-public
   networks whose names don't contain dots.
2. I'm much to fearful when it comes to changing libc-source.
3. Adding a '.' to the cellname before calling res_search() fixes the
   problem because this prevents the libc from automatically adding
   additional domain components. But other programs (i.e. aklog)
   need recompiling against the modified static openafs-libs.

Is there an easier solution to this? If not: There's a patch for
src/auth/cellconfig.c attached to this mail. Could someone with cvs access
please approve the patch and add it to the openafs-source?

Regards,

Frank

--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cellconfig.c.patch"

742a743,744
>     char *dotcellname;
>     int cellnamelength;
753c755,762
<     len = res_search(acellName, C_IN, T_AFSDB, answer, sizeof(answer));
---
>     cellnamelength=strlen(acellName);
>     
>     dotcellname=malloc(cellnamelength+2);
>     memcpy(dotcellname,acellName,cellnamelength);
>     dotcellname[cellnamelength]='.';
>     dotcellname[cellnamelength+1]=0;
>     len = res_search(dotcellname, C_IN, T_AFSDB, answer, sizeof(answer));
>     free(dotcellname);

--CE+1k2dSO48ffgeK--