[OpenAFS] little oddity in 1.4.2
Marcus Watts
mdw@umich.edu
Tue, 31 Oct 2006 14:01:54 -0500
Juha =?UTF-8?B?SsOkeWtrw6Q=?= <juhaj@iki.fi> sent:
...
> > >> Well, that's definitely broken. Use of -localauth shouldn't have
> > >> affected this; it should figure out what the cell is
> > >> from /etc/openafs/ThisCell and then look up the servers
> > >> from /etc/openafs/CellServDB and it sounds like it's not doing that
> > >> properly.
> > Well, I've not seen this problem in my testing on Debian, so I'm really
> > not sure.
>
> Well, which ThisCell should it be using? It seems as if Scott's original
> suggestion about an extra newline in ThisCell is the thing, after all.
> It's, however, /etc/openafs/server/ThisCell, not /etc/openafs/ThisCell.
> After adding an extra newline there, even -localauth works fine.
...
I don't think extra or missing newlines should make any difference.
The logic that's in 1.4.2 for this is the moral equivalent of:
if (p = strchr(word, '\n')) *p = 0;
which is to say: if there's a newline, zap it. Ignore any other white
space. If ThisCell has no newline, 1 newline, or even two or more, the
same C string results, and everything else works as expected.
I still think it's *much* more likely there was an extra space
in the original ThisCell, that was likely typed by the original person
installing it, silently installed by the debian installer, and completely
harmless with the old fscanf. Somewhere in the process of inserting
the newline, the space probably disappeared. Of course, this is all
guesswork on our part - we don't *have* the old or new files to look at.
Here's an interesting illustration of just how stealthy that extra space
could be:
% echo -n 'tfy.utu.fi' | od -c
0000000 t f y . u t u . f i
0000012
% echo -n 'tfy.utu.fi ' | od -c
0000000 t f y . u t u . f i
0000013
%
Now, one of these has an extra space at the end, which you can't
see unless your mailer has extra-interesting output processing.
The only thing you *can* see is the count, which is in octal
just to be even more confusing.
-Marcus