[OpenAFS-devel] Weird interaction between libnss-afs and aklog

Jakub Witkowski jpw@wszib.edu.pl
Tue, 24 Nov 2009 14:19:43 +0100


Hello,

I have been playing around with libnss-afs with the intention of
simplifying our afs student workstations.

During tests, I ran into a weird interaction between libnss-afs and
aklog; while nss-afs was set, aklog was dumping core; when it was
absent, aklog worked fine. What was even more interesting was that
aklog actually succeeded in setting tokens but was crashing right
afterwards. At the same time, any other tools for checking user data
worked perfectly.

After some hunting, I narrowed the problem down to this line in
aklog_main.c:

 if ((pwd = getpwuid(getuid())) != NULL)

which was commented with following text:

/*
 * Local hack - if the person has a file in their home
 * directory called ".xlog", read that for a list of
 * extra cells to authenticate to
 */

Commenting the whole block out removed the problem.

My question is, is this a sign of some bug lurking in libnss-afs? 
If not, can this code be made optional or reworked to something a
little more robust?

Thanks,

Jakub Witkowski.